Andrey Shitov
ae3eea8ae8
Add functions for iterating utf-8 strings.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-03 13:24:27 +03:00
Evgeny Gavrin
0787d76b62
Fix generation of empty completion value in ecma_reject_put.
...
Related issue: #114
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-02 19:31:38 +03:00
Evgeny Gavrin
69fe6199c0
Add syntax check for return from global scope/eval.
...
Related issue: #129
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-02 19:12:41 +03:00
Ruben Ayrapetyan
e8659f373c
Rename ECMA_CHAR_NULL to LIT_CHAR_NULL, move it to jerry-core/lit/lit-char-helpers.h.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-02 17:38:34 +03:00
Ruben Ayrapetyan
2a78d24fce
Add preprocessor definitions for various character codes, referenced in ECMA-262, and helpers for checking if a character falls into a ECMA-defined character category; remove lit_char_is_carriage_return and lit_char_is_new_line helpers.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-02 17:38:32 +03:00
Ruben Ayrapetyan
7d53133fcb
Add unicode characters ranges, listed per category.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-02 17:37:21 +03:00
Ruben Ayrapetyan
c37964f7a9
Move helpers from ecma-helpers-char.cpp to lit-char-helpers.cpp, rename them correspondingly.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-02 17:36:48 +03:00
Szilard Ledan
017aa6b684
Change Date helpers to handle NaN
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-02 09:15:03 +02:00
Evgeny Gavrin
56e7ead9f9
Fix build for GCC 4.7.
...
Related issue: #1
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-01 20:52:37 +03:00
Ruben Ayrapetyan
0c7801b996
Fix setup of argument variables in case parameter names are duplicated.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-01 15:07:00 +03:00
Ruben Ayrapetyan
134491453b
Fix ecma_op_get_value_object_base (GetValue, 8.7.1) for case HasPrimitiveBase (ref) is true.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-01 14:57:06 +03:00
Ruben Ayrapetyan
b45302ee07
Fix propagation of strict mode.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-01 14:44:12 +03:00
Ruben Ayrapetyan
438d2c2930
Fix ecma-property construction: perform operations that could invoke GC before linking property into an object's property list to avoid start of GC in the middle of property construction.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-01 14:23:48 +03:00
Dániel Bátyai
713b433c42
Implement Number.prototype.toPrecision()
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-01 11:15:18 +02:00
Dániel Bátyai
53cbb55f25
Implement Number.prototype.toExponential()
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-01 10:51:55 +02:00
Ruben Ayrapetyan
71bac03d51
Fix construction of Arguments object: add handler for 'caller' property that throws TypeError upon read or write access.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 19:18:53 +03:00
Ruben Ayrapetyan
ec02ace0e9
Fix syntax check for duplicate parameter names in a strict mode function.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 15:22:21 +03:00
Evgeny Gavrin
be2de16a4e
Fix build error using GCC 4.7.4
...
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-06-30 15:03:36 +03:00
Ruben Ayrapetyan
4870550c8a
Fix false-positive unexpected EOF in preparse_scope.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 14:52:20 +03:00
Ruben Ayrapetyan
0422e2230d
Fix syntax check for case 'eval' or 'arguments' identifiers are used for name of function in strict mode.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 14:36:18 +03:00
Ruben Ayrapetyan
7b90d54490
Fix raise of several nested jumpable borders at one label.
...
Related issue: #164
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 14:25:51 +03:00
Ruben Ayrapetyan
2aa04859ef
Fix handling of an exception raised during arguments list evaluation.
...
Related issues: #260 , #261 , #262 , #263 , #264 , #265 , #266 , #267
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 10:11:01 +03:00
Andrey Shitov
fd9ff8e3bd
Add core unicode functionality.
...
Add utf-8 processing routines.
Change ecma_char_t from char/uint16_t to uint16_t.
Apply all utf-8 processing routines.
Change char to jerry_api_char in API functions' declarations.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-29 23:27:58 +03:00
Andrey Shitov
c4b0cd2196
Change ecma_length_t and jerry_api_length_t from uint16_t to uint32_t.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-29 23:27:58 +03:00
Andrey Shitov
a0c5974ab8
Move char type definitions and magic string processing functions to literal component.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-29 23:27:58 +03:00
Szilard Ledan
07148d319b
Implement Date object helper functions
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-06-29 18:09:39 +02:00
Ruben Ayrapetyan
a56693e00c
Fix syntax error check for assignment of 'eval' and 'arguments' in strict mode code.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 18:11:24 +03:00
Ruben Ayrapetyan
984e269db6
Fix direct call to eval from strict mode code.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 18:04:42 +03:00
Ruben Ayrapetyan
6573ffd632
Fix several issues in parse of variable declarations.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:56:42 +03:00
Ruben Ayrapetyan
9e3f123cd5
Fix character code values for "<LF>" and "<CR>" characters in ecma-char helpers.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:49:57 +03:00
Ruben Ayrapetyan
3d31bfec92
Fix parse of nested switch statements.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:42:37 +03:00
Ruben Ayrapetyan
6e2733dbfd
Reduce register pressure by reusing registers, allocated for argument preparation instruction sequence.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:23:51 +03:00
Ruben Ayrapetyan
dc095bb902
Enhancement of argument list parsing loop: removing break / continue operators, so that every iteration passes start and end of loop body.
...
The change makes possible simple notification of byte-code generator about start / end of byte-code generation for an argument.
As register values are not passed between byte-code sequences that prepare different arguments, the change would make possible for byte-code generator to reuse registers allocated for the code sequences.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:23:51 +03:00
Ruben Ayrapetyan
1dc7ed64d6
Fix get_variable_value invocation in opfunc_call_n; enhancement of exception handling in opfunc_obj_decl.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:23:51 +03:00
Ruben Ayrapetyan
06dffdec8f
Remove exit completion value type.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 10:24:18 +03:00
Ruben Ayrapetyan
447358cd4a
Remove intrinsics support from parser.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 10:24:18 +03:00
Evgeny Gavrin
3e86875333
Fix incorrect assertion ecma_op_from_property_descriptor.
...
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-06-28 19:53:29 +03:00
Ruben Ayrapetyan
507411f0a0
Implement parse of for-in statement.
...
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-26 20:21:59 +03:00
Ruben Ayrapetyan
b988fe2fce
Introduce for-in opcode; implement handler for the opcode.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-26 20:10:31 +03:00
Ruben Ayrapetyan
6c6e740c7a
Fix check of run scope bounds in vm_loop.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-26 20:10:31 +03:00
Ruben Ayrapetyan
9b414deb8d
Introduce explicit description of registers (temporary variables) ranges.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-26 20:10:31 +03:00
László Langó
e027b4d65d
Enable regular expressions.
...
- add regular expressions support to JS parser and interpreter;
- add tests for regular expressions.
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:31:10 +02:00
László Langó
f992f5d92e
Add RegExp object constructor, regular expression matching procedures, RegExp and RegExp.prototype built-in objects.
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:31:06 +02:00
László Langó
4ffcb4d464
Add parser and compiler of regular expressions.
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:31:03 +02:00
László Langó
1f9add4735
Add ecma_char_is_word_char helper (part of IsWordChar abstract operation, ECMA-262 v5, 15.10.2.6); move hex_to_int from lexer to jerry-core/ecma/base/ecma-helpers-char.cpp, renaming it to ecma_char_hex_to_int.
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:31:00 +02:00
László Langó
50b64bfad2
Add ecma_new_ecma_string version that takes buffer with specified number of characters, instead of zero-terminated string.
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:30:57 +02:00
László Langó
d0e9edc16d
Fix comments in jerry-core/ecma/base/ecma-helpers.h.
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:30:53 +02:00
László Langó
6511f0e1ba
Add ecma_raise_* helpers for raising ECMA exceptions.
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:30:23 +02:00
Ruben Ayrapetyan
f849cc6283
Fix parse of simple for statement.
...
Related issue: #156
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-25 20:29:36 +03:00
Ruben Ayrapetyan
601f1eea58
Introduce jsp_skip_braces function for skiping blocks, surrounded with braces.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-25 20:29:36 +03:00