Ruben Ayrapetyan
7d4569a6ff
Fix valgrind false-positive warning in mem_heap_get_chunked_block_start.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
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 [email protected]
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 [email protected]
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 [email protected]
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 [email protected]
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 [email protected]
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 [email protected]
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 [email protected]
2015-06-18 19:05:45 +02:00
Ruben Ayrapetyan
53156771dc
Update API for invocation of functions and constructors.
...
With the change, if exception is thrown in `jerry_api_function_call` and `jerry_api_construct_object`, the exception object is returned to the caller.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-17 19:14:34 +03:00
Peter Gal
5dc44b1362
Fix MCU script transformation logic.
...
The old script behaved incorrectly as it replaced all '*' occurrences
with the list of files in the given directory.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal [email protected]
2015-06-17 17:55:56 +02:00
Dániel Bátyai
7508b803cf
Implement parseFloat()
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai [email protected]
2015-06-17 16:42:07 +02:00
Dániel Bátyai
35840a4b6d
Implement parseInt()
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai [email protected]
2015-06-17 16:41:57 +02:00
Ruben Ayrapetyan
de7b72d726
Add configuration for ARMv7 softfloat build; update setjmp / longjmp ARMv7 implementation to handle the softfloat-mode properly.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-17 17:03:42 +03:00
Ruben Ayrapetyan
b008867d81
Implement setjmp / longjmp in jerry-libc.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-17 17:03:42 +03:00
Ruben Ayrapetyan
f115f731c3
Switch unit tests to jerry-libc.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-17 17:03:42 +03:00
Ruben Ayrapetyan
6d6c913bdc
Move random number generator from Math.random to jerry-libc, replace the logic with call to rand in Math.random.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-17 17:02:50 +03:00
Ruben Ayrapetyan
30277153b9
Fix strncmp, fread and fwrite in jerry-libc.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-17 17:02:50 +03:00
Ruben Ayrapetyan
630a1e8eba
Move architecture-depedendent libc internal headers to jerry-libc/arch folder.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-17 17:02:49 +03:00
Andrey Shitov
a293e21147
Introduce JERRY_DISABLE_HEAVY_DEBUG preprocessor definiton to speed up debug version of the engine.
...
Heavy debug is enabled only for unit tests.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov [email protected]
2015-06-17 11:29:35 +03:00
László Langó
d803c3bc82
Init commit for Date object.
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan [email protected]
JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected]
2015-06-16 18:05:31 +02:00
Ruben Ayrapetyan
8a9633dba0
Fix style in jerry-core/jerry.cpp, and doxygen titles in jerry-core/jerry.cpp and jerry-core/jerry-extension.h.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-15 16:13:56 +03:00
Evgeny Gavrin
bd9a00d254
Rename tests in ./tests/jerry/* directory to match the style of filenames in the project.
...
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin [email protected]
2015-06-15 14:44:45 +03:00
Ruben Ayrapetyan
5d5e75fad6
Implementing 'eval' routine of built-in Global object.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-13 18:17:23 +03:00
Ruben Ayrapetyan
b310d76dec
Introducing interpreter context flag, indicating if there is call of 'Direct call to eval' form in process, and interfaces for accessing the flag and 'strict mode' flag.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-13 18:17:23 +03:00
Ruben Ayrapetyan
446e8bf989
Replacing 'this_arg' meta opcode with more general 'call site additional information' meta opcode with flags describing the call site features, and, optionally, 'this' argument.
...
Introducing opcode_call_flags_t for argument of the new meta opcode, currently with two flags: 'have this argument' and '"direct call to eval" form'.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-13 18:17:23 +03:00
Ruben Ayrapetyan
6fadcd3f84
Implementing [[Construct]] of built-in Function object.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-13 18:17:23 +03:00
Ruben Ayrapetyan
d18de24e1e
Adding interpreter invocation to ecma_op_eval_chars_buffer.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-13 18:17:20 +03:00
Ruben Ayrapetyan
534ee426ee
Extracting part of ecma_op_eval to ecma_op_eval_chars_buffer that with 'code' argument represented as array of characters instead of ecma-string.
...
Updating jerry_api_eval to use ecma_op_eval_chars_buffer, so removing redundant conversion of character array to ecma-string.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-13 18:01:31 +03:00
Ruben Ayrapetyan
8ea0e23ea3
Support of multiple bytecode arrays in interpreter and ecma-runtime.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-13 18:01:31 +03:00
Andrey Shitov
3577261261
Add support for eval in parser.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov [email protected]
2015-06-13 18:01:30 +03:00
Ruben Ayrapetyan
57c6c377af
Small enhancements of unit tests implementation style and fix of the tests' modules naming style.
...
- introducing TEST_RANDOMIZE macro for randomization of source data used in unit tests;
- replacing assert with JERRY_ASSERT;
- renaming test_* to test-*.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-13 16:10:36 +03:00
Kristof Kosztyo
013bce85fc
Fix ecma_get_property_descriptor_from_property function
...
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo [email protected]
2015-06-12 16:51:57 +02:00
Peter Gal
62cb842434
Implement Function.prototype.toString.
...
JerryScript-DCO-1.0-Signed-off-by: Peter Gal [email protected]
2015-06-12 14:54:03 +02:00
Zsolt Borbély
7952b1cae7
Implement Function.prototype.apply()
...
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély [email protected]
2015-06-12 13:02:21 +02:00
Laszlo Vidacs
72eb14f741
String.prototype.concat()
...
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs [email protected]
2015-06-12 12:46:36 +02:00
Peter Gal
36c80f2cf5
Remove nullptr usages and use NULL instead
...
Related issue: #119
JerryScript-DCO-1.0-Signed-off-by: Peter Gal [email protected]
2015-06-11 18:38:48 +02:00
Andrey Shitov
53801e3b41
Replace array of literals with literal storage.
...
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin [email protected]
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov [email protected]
2015-06-10 21:40:10 +03:00
Andrey Shitov
340a9ef002
Add literal storage, literal_t type and functions for its processing.
...
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin [email protected]
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov [email protected]
2015-06-10 21:40:10 +03:00
Andrey Shitov
528a333e17
Implement recordset iterators
...
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin [email protected]
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov [email protected]
2015-06-10 21:40:00 +03:00
Kristof Kosztyo
6ebb32452e
Refactor the Object.defineProperties function
...
Fix assert and corner cases in Object.defineProperties function.
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo [email protected]
2015-06-10 15:36:11 +02:00
Peter Gal
f6b875c36c
Use __func__ instead of __FUNCTION__
...
The __FUNCTION__ is not part of the C99/C++11 standard.
So replace all occurrences with the standard __func__.
Side note: GCC 5.1 warns when using -Wpedantic -std=c99
and __FUNCTION__.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal [email protected]
2015-06-09 18:03:42 +02:00
Ruben Ayrapetyan
d988da8edf
Fix precommit on x86_64 machine with g++ 4.8.2 compiler (issue appeared because pre-commit testing was not performed in the combination).
...
Related issue: #161
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-09 15:17:38 +03:00
SaeHie Park
43ec3a33cf
Enable pretty-printer for unittests also
...
* dump string literals with test_api to see jerry_register_external_magic_strings is working ok
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park [email protected]
2015-06-09 07:50:43 +09:00
SaeHie Park
723924f36f
New External Magic String API to save heap memory
...
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park [email protected]
2015-06-09 07:50:43 +09:00
SaeHie Park
603fa56acf
Add vm_finalize() to clean program pointer for embed systems
...
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park [email protected]
2015-06-09 07:50:43 +09:00
Andrey Shitov
55b43071d1
Add indentation checks for code inside classes and fix appeared issues.
...
Fix asserts in test_recordset.cpp.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov [email protected]
2015-06-09 00:30:20 +03:00
Zsolt Borbély
cefeea06f6
Implement Object.getPrototypeOf()
...
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély [email protected]
2015-06-08 16:43:30 +02:00
Ruben Ayrapetyan
385b988e69
Fix of memory leak in ecma_op_function_construct_simple_or_external.
...
Related issue: #121
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-08 16:23:22 +03:00
Ruben Ayrapetyan
64522db972
Fix of checksum check in tools/prerequisites.sh.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-08 16:15:46 +03:00
Ruben Ayrapetyan
2270db9414
Removing 'nestings' from parser.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
2015-06-05 20:18:29 +03:00