23 Commits

Author SHA1 Message Date
Robert Fancsik
1f20bb3fe5 Remove unnecessary cbc_code_flag (#2443)
The removed flag can be substituted with the combination of two existing ones.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-07-31 20:15:27 +02:00
Zoltan Herczeg
9513f3792d Reduce with stack consumption by 1. (#2430)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-07-18 15:52:00 +02:00
Robert Fancsik
43aae199ce Implement ES2015 class feature (part I.) (#2404)
This patch is the first milestone of the implementation of this new language element.

Currently supported:
 - Class statement
 - Class expression
 - Static methods

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2018-07-13 01:20:08 +09:00
Zoltan Herczeg
acdbbf2261
Add literal property to the byte code list. (#2397)
Initializing a property with a constant is frequent in object initializers.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-06-20 09:06:59 +02:00
Zoltan Herczeg
5560c76b41 Convert certain push number opcodes to literals (#2328)
Binary operations are much faster with literal arguments.
The byte immediates are still kept for other cases, e.g. array declarations.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-05-18 17:22:53 +09:00
Zoltan Herczeg
5e097dc354 Add line info support. (#2286)
Add line info data to byte, which allows getting a backtrace info directly
from the engine. Snapshots are not supported.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-04-19 09:12:54 +09:00
Zoltan Herczeg
bb84466fcf Support static snapshots. (#2239)
Unlike normal snapshots, no part of a static snapshot is loaded into
the RAM when executed from ROM. Static snapshots rely heavily on
external magic strings.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-03-20 07:46:52 +09:00
Zoltan Herczeg
51e3c4455a Implement direct strings. (#2196)
Direct strings are a new type of direct ecma-values (no memory allocation
is needed for encoding them) in JerryScript. Currently magic strings,
external magic strings and uint values are encoded as direct strings.

The constant pool of JerryScript byte-code is changed to hold ecma-values
rather than cpointers to support direct strings.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-02-23 08:21:46 +09:00
Zoltan Herczeg
b9560b7c70 Rework ecma collection. (#2153)
Greatly simplify the iterator part and make it compatible with 32 bit cpointers.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-01-10 15:55:56 +01:00
Daniel Balla
7ad3edde08 Fix typo in byte-code.h (#2100)
Fixing a typo in byte-code.h, plus removing unnecessary guarding around it.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2017-11-15 17:01:01 +01:00
Zoltan Herczeg
9f0cf9ef1c Implement this binding for arrow functions.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-10-06 09:07:13 +09:00
Zsolt Borbély
07c86ece54 Fix alignment in case of enabled 32bit compressed pointers (#1764)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-04-24 13:02:14 +02:00
Zsolt Borbély
5449b0f40b Always define debugger-related opcodes (#1734)
This change makes the generated snapshot independent from buildconfig.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-04-18 18:20:20 +09:00
Zoltan Herczeg
b5a91069fd Fix multiple debugger issues. (#1640)
- Wait for free byte code pointers during garbage collection.
- Detect incorrect free requests in the debugger server.
- Ignore byte code blocks loaded from snapshot.
- Use memmove instead of memcpy to avoid receive buffer corruption.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-06 11:13:25 +01:00
Levente Orban
025a99ccbb Initial version of JerryScript debugger (#1557)
The debugger supports setting breakpoints, execution control (step, next, continue)
and getting backtrace. The communication is WebSocket-based, so a browser can
communicate with JerryScript without any intermediate application.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-02-14 15:03:01 +01:00
Tilmann Scheller
0511091e8a Streamline copyright notices across the codebase. (#1473)
Since the project is now hosted at the JS Foundation we can move to unified copyright notices for the project.

Starting with this commit all future contributions to the project should only carry the following copyright notice (except for third-party code which requires copyright information to be preserved):

"Copyright JS Foundation and other contributors, http://js.foundation" (without the quotes)

This avoids cluttering the codebase with contributor-specific copyright notices which have a higher maintenance overhead and tend to get outdated quickly. Also dropping the year from the copyright notices helps to avoid yearly code changes just to update the copyright notices.

Note that each contributor still retains full copyright ownership of his/her contributions and the respective authorship is tracked very accurately via Git.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-12-08 06:39:11 +01:00
Zoltan Herczeg
eed84a7dd9 Parser improvements.
The number of delete opcodes is reduced to two from six. The
range of numbers which can be included in the byte code is
doubled from (-127,127) to (-256,256).

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-10 01:18:17 -07:00
Zoltan Herczeg
d953fbb7be Branch opcodes have no result and either they have a stack argument
or no arguments at all. To improve the performance, the branch argument
flag is changed into a get argument type which eliminates a flag check
for all executed opcodes. Furthermore branch opcodes skip the put result
phase by changing the "break" to "continue" statements.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-09 01:20:36 -07:00
Zoltan Herczeg
ac3aa30c82 Micro optimizations of the virtual machine:
- Branch argument information is encoded in the vm byte
   code data, so CBC flags are not loaded anymore
 - The free_flags variable is removed from the vm_loop
 - Two cases are removed from "get arguments", argument
   processing is simplified
 - The two opcode tables are merged to one
 - The VM_OC_POP opcode has no result, so the break is changed to continue.
 - The VM_OC_PUSH_NUMBER can use ecma_make_integer_value.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-24 02:29:49 -07:00
Zoltan Herczeg
d190ca44ae Storing byte code size in the byte code header. This reduces the
memory consumption, because the new allocator uses less memory if
the size as available when a block is freed. Snapshot generation
is also simplified.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-03-16 02:58:10 -07:00
Zoltan Herczeg
1200be42b4 Non-recursive vm_loop to reduce stack usage.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-03-02 01:52:55 -08:00
Akos Kiss
866ef5bcf3 Add some more consts to get data moved from .data to .rodata
We already had some `const`s but it was still not enough.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-22 13:04:34 +01:00
Zoltan Herczeg
4d2dd22ced Compact Byte Code parser and executor for Jerry.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Tamas Gergely tgergely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-02-05 01:15:49 -08:00