Robert Sipka
80811c8332
Warning fixes.
...
ISO C99 doesn’t support unnamed structs/unions.
Comparison of distinct pointer types lacks a cast.
Dereferencing type-punned pointer will break strict-aliasing rules.
Type of bit-field ‘ext’ is a GCC extension.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-16 13:56:07 +01:00
Akos Kiss
7dc065842b
Remove jerry_port_ functions from test-common.h
...
They are identical to the functions with the same name in
jerry-port.cpp and cause duplicate symbol link errors on OS X.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-16 10:39:21 +01:00
Robert Sipka
977bfa5d2c
Remove g++ support from the [C]Make files.
...
Move all '.cpp' files to '.c'.
Rename comments from 'cpp' to 'c'.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-15 12:49:12 +01:00
Robert Sipka
ec5859f4e8
Add some fixes required by the C99 standard.
...
Use c-style cast instead of reinterpret_cast.
Use identifiers for function parameters.
Use type cast to avoid conversion error.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-15 12:48:47 +01:00
László Langó
d038284bff
Style fix: fix comments at the end of function definitions.
...
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-05 13:46:51 +01:00
László Langó
b1acf1a562
Style fix: align pointer dereference operator to right
...
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-05 13:06:34 +01:00
Zidong Jiang
dfb22c3441
refactor rcs_chunked_list and remove its c++ features
...
issue #806
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-02-05 11:11:36 +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
Ruben Ayrapetyan
b0d6107410
Improve algorithm of collecting empty pools.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2016-01-18 15:51:09 +03:00
Xin Hu
3b3bc98bec
Add ecma_get_chars_collection_length unit test
...
JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-01-13 18:40:34 +03:00
Roland Takacs
21f561f8ef
Refactor literal-storage to not use C++ features
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-01-13 15:19:07 +01:00
Andrey Shitov
50d124bfc3
Parser optimizations.
...
- parser is now non-recursive (i.e. parse function is not called recursively in any case);
- byte-code is now more compact:
- constants are now not immediately dumped upon occurence, but later - where necessary;
- assignments are combined with unary / binary operations;
- binary operations are encoded more compactly in many cases;
- byte-code arrays are now allocated separately for each scope (so, GC of the scopes now becomes possible);
- byte-code is dumped directly into corresponding byte-code arrays:
- linked lists of op_meta are not now used for main code of a scope.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-12-23 14:21:10 +03:00
SaeHie Park
fe2a76fced
Fix Unittests build fails when LTO is disabled
...
Related issue: #774
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-12-10 10:28:16 +09:00
SaeHie Park
8fbde244e9
Move log message output(fprintf, puthcar) to target code
...
Related issue #752
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-12-08 07:48:16 +09:00
Ilyong Cho
1c21e16c7b
Adding Jerry api for triggering gc.
...
JerryScript-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com
2015-12-02 12:26:07 +03:00
pius.lee
ece246ef9e
Add foreach function for inquiry properties into obj
...
JerryScript-DCO-1.0-Signed-off-by: pius.lee pius.lee@samsung.com
2015-12-02 12:20:12 +03:00
Ruben Ayrapetyan
90122d9f33
Fix configuration of recordset's and literal storage's parameters according to MEM_ALIGNMENT_LOG and MEM_CP_WIDTH changes.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-09 21:24:03 +03:00
Zsolt Borbély
eaca37c4c9
Simplify severity mechanism in mem allocator.
...
Related issue: #63
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-11-04 17:06:43 +01:00
Ruben Ayrapetyan
9194240ada
Fix memory leak in jerry_api_set_object_native_handle.
...
Related issue: #683
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-03 16:41:19 +03:00
Ruben Ayrapetyan
1fe2817457
Introduce parser-time optimization that moves function's argument values to registers.
...
For functions with the optimization applied:
- vm puts arguments values immediately to registers without putting them to variables in lexical environment;
- number of arguments is extracted from corresponding 'reg_var_decl' instruction's argument;
- for functions that also don't have local variables, lexical environments are not created.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 17:15:13 +03:00
Ruben Ayrapetyan
f2c3e59bbe
Change reg_var_decl instruction arguments to [number of registers for temporaries; number of register for local variables].
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-23 15:45:28 +03:00
Dániel Bátyai
579b1edaa5
Refactor builtins to handle CESU-8 encoded strings.
...
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-10-15 16:01:10 +02:00
Dániel Bátyai
dcd610b305
Change internal encoding of strings to CESU-8
...
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-10-15 13:39:00 +02:00
Andrey Shitov
311cc65b33
Implement snapshot functionality.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-09-09 18:07:24 +03:00
Andrey Shitov
443673fc5d
Update bytecode header structure so that bytecode could be stored independently from hash table and bytecode header.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-09-09 18:07:20 +03:00
Ruben Ayrapetyan
a00079e8ff
Reduce number of operand type handling conditional blocks in byte-code dumper, by extracting them to several separate routines that can be used for most cases, remove getop_* routines from vm.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-28 16:19:49 +03:00
Ruben Ayrapetyan
173becc3ac
Rename idx_t -> vm_idx_t, opcode_special_reg_t -> vm_reg_t, INVALID_VALUE -> VM_IDX_EMPTY / VM_IDX_REWRITE_GENERAL_CASE, LITERAL_TO_REWRITE -> VM_IDX_REWRITE_LITERAL_UID.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-28 16:18:58 +03:00
Ruben Ayrapetyan
10e5f3530d
Remove heap allocator's block headers, replacing them with bitmap at start of heap.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 21:42:26 +03:00
Ruben Ayrapetyan
589ebb1802
Remove comparison of unused instruction operands fields (the fields could be uninitialized).
...
Related issue: #585
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 18:41:04 +03:00
Ruben Ayrapetyan
5b9ce05491
Introduce parser-time optimization that replaces a function's local variables with registers.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 17:42:45 +03:00
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