Ruben Ayrapetyan
8f594aebfa
Improvement of pool allocator.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-13 19:06:53 +03:00
Andrey Shitov
d6ad1c467e
Fix semicolon check after variable declaration list.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-11 14:23:11 +03:00
chunseok lee
d31eb3c4cb
Jerry API for array creation and manipulation
...
1. jerry_api_create_array_object : create array object of given size
2. jerry_api_set_array_index_value : set value at given index
3. jerry_api_get_array_index_value : get value at given index
JerryScript-DCO-1.0-Signed-off-by: chunseok lee chunseok.lee@samsung.com
2015-08-11 15:02:56 +09:00
Andrey Shitov
9766feda2e
Change jerry_api_string_to_char_buffer so it doesn't add '\0' to the end of output buffer.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-28 15:54:55 +03:00
Ruben Ayrapetyan
502f4c4623
Split opcode and instruction entities and perform related renamings: opcode_t is now vm_instr_t, opcode position is instruction position, etc.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-28 13:43:43 +03:00
Ruben Ayrapetyan
1990762cf0
Add opcode description table containing an opcode's name, name and possible type of the opcode's arguments.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-28 13:43:43 +03:00
Szilard Ledan
7c1622855d
Fix the infinite loop in ecma_date_year_from_time
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-21 14:04:44 +02:00
Szilard Ledan
9edae36b00
Fix assertion fail in ecma_date_make_day
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-21 14:04:44 +02:00
Ruben Ayrapetyan
44b7b95781
Add support of ReferenceError early error to parser.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 17:00:45 +03:00
Andrey Shitov
4f58104981
Fix checking of semicolons in expression statements.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-15 13:15:25 +03:00
Ruben Ayrapetyan
6fe78cc994
Temporary workaround (until parser is refactored) for fixing evaluation of simple 'identifier'-like expressions.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 12:52:42 +03:00
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
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
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
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
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
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
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
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
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 r.ayrapetyan@samsung.com
2015-06-17 19:14:34 +03:00
Ruben Ayrapetyan
b008867d81
Implement setjmp / longjmp in jerry-libc.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
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 r.ayrapetyan@samsung.com
2015-06-17 17:03:42 +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 a.shitov@samsung.com
2015-06-17 11:29:35 +03:00
Ruben Ayrapetyan
d18de24e1e
Adding interpreter invocation to ecma_op_eval_chars_buffer.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-13 18:17:20 +03:00
Andrey Shitov
3577261261
Add support for eval in parser.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
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 r.ayrapetyan@samsung.com
2015-06-13 16:10:36 +03:00
Andrey Shitov
53801e3b41
Replace array of literals with literal storage.
...
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
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 e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-10 21:40:10 +03:00
Andrey Shitov
528a333e17
Implement recordset iterators
...
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-10 21:40:00 +03: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 r.ayrapetyan@samsung.com
2015-06-09 15:17:38 +03:00
SaeHie Park
723924f36f
New External Magic String API to save heap memory
...
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
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 a.shitov@samsung.com
2015-06-09 00:30:20 +03:00
Ruben Ayrapetyan
b1a31c8144
Adding scope's code flags indicating whether the scope's code reference 'arguments' and 'eval' identifiers.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Ruben Ayrapetyan
cb600da269
Introducing 'scope flags' opcode containing set of flags that indicate various properties of a scope; replacing 'strict mode' meta opcode with a flag in the flags set.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Ilyong Cho
0c058747f1
Implemented jerry_api_create_error()
...
JerryScript-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com
2015-05-20 19:59:46 +09:00
Ruben Ayrapetyan
584149112d
Recordset dynamic storage.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-15 18:31:18 +03:00
Ruben Ayrapetyan
82f9afcde9
Speeding up procedure for getting start of a heap block's data space for one-chunked blocks, removing general blocks support from the procedure.
...
- heap area is aligned on heap chunk size;
- mem_heap_get_block_start is renamed to mem_heap_get_chunked_block_start,
now this interface is applicable only to one-chunked blocks,
and is significantly faster - instead of iterating list of heap blocks
to find block header, it just aligns value of pointer to heap chunk size.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-15 14:45:19 +03:00
Andrey Shitov
9763a93df3
Add new coding style rules and fix appeared issues.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-05-14 14:44:57 +03:00
Ruben Ayrapetyan
51ddb25344
Adding missing long-term allocation requests to heap unit test.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-13 22:38:51 +03:00
SaeHie Park
da86a52fe9
Fix object free callback.
...
- remove jerry_set_object_free_callback()
- change jerry_api_set_object_native_handle() with object_free_callback
- related issue: https://github.com/Samsung/jerryscript/issues/17
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-05-10 17:55:26 +09:00
SaeHie Park
5ec3e2f59a
Native callback in embedding jerry when object is to be freed.
...
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-05-04 19:59:58 +09:00
Ruben Ayrapetyan
9a7a644f50
Removing mem_heap_try_to_resize_block interface.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:51 +03:00
Ruben Ayrapetyan
18079fb4d3
Implementing API for invocation of a function object as a constructor.
2015-04-10 09:55:04 +03:00
Ruben Ayrapetyan
36424c0fd2
Removing contexts arguments from Jerry API; introducing jerry_push_ctx and jerry_pop_ctx interfaces; putting context-related API part under #ifdef CONFIG_JERRY_ENABLE_CONTEXTS (supposed to be implemented later, when becomes necessary).
2015-04-08 15:37:23 +03:00
Andrey Shitov
7c67606b00
Parser refactoring. Remove deserializer notion.
2015-04-07 13:05:19 +03:00
Ruben Ayrapetyan
469ef4e622
Implementing API for associating native handle (uintptr_t) values with JS objects.
2015-04-07 13:01:01 +03:00
Ruben Ayrapetyan
fc2dbf3b0b
Introducing mem_heap_get_block_start routine for determining beginning of data space in a heap-allocated block.
2015-04-07 12:58:15 +03:00