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
Ruben Ayrapetyan
5f174cf8bf
Remove 'process_keyword_names' stage, as keyword literals now can be registered during main parse stage.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-25 20:29:36 +03:00
Zsolt Borbély
1c19e5c8ab
Fix the Object.getPrototypeOf function.
...
Related issue: #208
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-06-25 16:32:53 +02:00
Ruben Ayrapetyan
d7ecd4a467
Fix raise of syntax errors for unmatched braces.
...
Related issue: #43 , #183
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-25 16:47:45 +03:00
Ruben Ayrapetyan
4ff9e79b02
Generate anonymous function expressions for getters / setters of an object literal.
...
Related issue: #234
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-24 15:37:42 +03:00
SaeHie Park
c603d10360
Adjust nuttx heap size to 80K
...
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-06-24 07:05:56 +09:00
Peter Gal
77b01a6473
Provide assert as an external method.
...
Removed the internal assert implementation from the engine
and provide externally an assert function via api calls.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-23 18:08:51 +02:00
Kristof Kosztyo
61ab205130
Implement Object.create function
...
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-23 17:46:59 +02:00
Zsolt Borbély
3f28cb3bf8
Fix the indexing of Array builtin functions.
...
The index-dependant builtins didn't handle correctly the positive Infinity value.
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-06-23 17:29:46 +02:00
Laszlo Vidacs
caa1617ea2
Implement String.prototype.trim()
...
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-23 16:54:42 +02:00
Ruben Ayrapetyan
913519dd5c
Fix of ToUInt32 (ecma_number_to_uint32) and ToInt32 (ecma_number_to_int32) conversion routines.
...
Related issue: #160
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 15:33:03 +03:00
Ruben Ayrapetyan
1efaefaabe
Extract part of ecma_op_number_remainder (ECMA-262 v5, 11.5.3), corresponding to item 6 (actual remainder calculation, without handling of NaN. Infinity and zero values), as ecma_number_calc_remainder.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 15:33:03 +03:00
Dániel Bátyai
7d3bb85ccb
Fix buffer size in Number.prototype.toFixed()
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-06-23 14:14:39 +02:00
Evgeny Gavrin
216dc251ec
Remove support of plug-in mechanism.
...
This API is obsolete and can be fully replaced with existing `api.h`.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-06-23 13:56:46 +03:00
Ruben Ayrapetyan
ab2abfa8b3
Fix receiving of byte-code instructions from serializer.
...
Related issue: #203
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 13:49:46 +03:00
Ruben Ayrapetyan
d1055f98e5
Add set_variable_value to opfunc_native_call.
...
Related issue: #117
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 13:16:42 +03:00
Ruben Ayrapetyan
611811678e
Remove invalid assertion in ecma_builtin_global_object_eval.
...
The removed assertion checked that `this` argument can't be equal to `undefined` in direct call to eval.
Actually, `this` can be not equal to `undefined` in case direct call to eval is performed from `with` block.
Related issue: #212
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 13:09:55 +03:00
Ruben Ayrapetyan
a536073da4
Add literal registration in parse_member_expression (TOK_KEYWORD case).
...
Related issue: #116
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 12:39:45 +03:00
Ruben Ayrapetyan
89a7449913
Fix invalid assertion condition in jump opcode handlers.
...
Related issue: #120
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 12:31:45 +03:00
Ruben Ayrapetyan
0db82a56d2
Fix exception handling in opfunc_native_call (OPCODE_NATIVE_CALL_PRINT case).
...
Related issue: #122
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 12:09:18 +03:00
Ruben Ayrapetyan
81d13b0676
Fix incorrect interchange of interfaces taking to ecma values and ecma completion values.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 11:38:13 +03:00
Szilard Ledan
bac7908448
Add fmod function to the fdlibm
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-06-22 12:55:26 +02:00
Kristof Kosztyo
e3861d7cd1
Implement Object.freeze and Object.isFrozen function
...
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-22 10:03:18 +02:00
Kristof Kosztyo
2ee469ee65
Implement Object.seal and Object.isSealed function
...
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-22 09:25:10 +02:00
Tamas Czene
4836d3b615
Implemented Number.prototype.toFixed()
...
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Tamas Czene tczene.u-szeged@partner.samsung.com
2015-06-19 17:34:48 +02:00
Ruben Ayrapetyan
7d4569a6ff
Fix valgrind false-positive warning in mem_heap_get_chunked_block_start.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 18:00:37 +03:00
Ruben Ayrapetyan
a4e54e736e
Support syntax error feedback in parser.
...
Now, parser correctly finishes parse procedure if syntax of source code is incorrect (syntax correctness is indicated using return value):
- parser-internal memory management is performed using jsp_mm_alloc / jsp_mm_free;
- upon detection of incorrect syntax, all parser-allocated memory regions are deallocated using jsp_mm_free_all and parse finishes with corresponding return value.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 17:05:15 +03:00
Ruben Ayrapetyan
85f12de139
Introduce parser-specific managed memory allocator with interface jsp_mm_free_all that, upon call, frees all memory allocated with the allocator.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 16:25:34 +03:00
Ruben Ayrapetyan
9b0f5d439d
Introduce jsp_label_remove_all_labels interface that removes all jump labels registered at the moment of call for usage upon raise of SyntaxError during parse.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 16:25:34 +03:00
Ruben Ayrapetyan
bd9d1d4afd
Improve allocation of memory for byte-code array and literal identifiers hash table.
...
- literal identifiers hash table and byte-code array are now allocated in one heap block instead of four blocks;
- memory regions with the hash tables and arrays are now linked into linked list using headers at start of the regions instead of using array_list.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 16:25:34 +03:00
Ruben Ayrapetyan
4e563932f1
Remove parser_init / parser_free interfaces (corresponding actions are now performed in parser_parse_program); introduce boolean return value in parser invocation interfaces that would indicate whether SyntaxError was raised during parse.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 16:25:34 +03:00
Ruben Ayrapetyan
2bf25f10eb
Move jerry-core/parser/collections to jerry-core/parser/js/collections.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 16:25:34 +03:00
Zoltan Herczeg
6027906f96
Add support for URI encoding / decoding.
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-06-18 19:05:45 +02:00