826 Commits

Author SHA1 Message Date
Roland Takacs
764d74561d Remove the placement 'new' operator.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-05 12:50:38 +01:00
Roland Takacs
3f5451423c Add lit_storage prefix for functions in lit-literal-storage.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-05 12:43:30 +01:00
Zidong Jiang
9ab24b3241 remove the c++ syntax, struct::xxx
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-02-05 12:33:27 +01:00
Xin Hu
87a7887a81 Replace uint32_t magic string lengths with uint8_t
JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-02-05 11:31:54 +01:00
Xin Hu
4062694059 ecma_string_get_size performance improvemen
- replace if with switch

JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-02-05 11:23:53 +01:00
Xin Hu
1466a5b317 ecma_compare_ecma_strings_longpath performance improvement
- use switch to replace if

JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-02-05 11:17: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
Roland Takacs
d60bd93da3 Use 'const' instead of 'constexpr'.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-05 11:00:25 +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
Sung-Jae Lee
eda775a8ca Fix build break on OSX: Invalid type comparision.
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2016-01-29 22:40:55 +09:00
Roland Takacs
70a67797d2 Refactor opcodes-dumper to not use C++ features.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-01-20 10:58:06 +01: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
73a5fd78a7 Remove redundant code in lit_charset_literal_get_length
JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-01-15 13:07:05 +03:00
Hanjoung Lee
f6bd5afa42 Fix linked-list removal of last element
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2016-01-14 19:47:16 +09:00
SaeHie Park
f574597a06 Workaround fix for Xtensa (ESP8266) memory alignment exception error
Related issue: https://github.com/Samsung/jerryscript/issues/675

JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2016-01-14 07:26:28 +09:00
Xin Hu
7255d648d7 lit_get_unicode_char_size_by_utf8_first_byte performance improvement
- inline

JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-01-13 19:09:49 +03:00
István Kádár
636ded489f JerryScript api improvemts accordign to jerry_api_value_t struct.
JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
2016-01-13 18:45:52 +03:00
Xin Hu
b31b79c333 ecma_get_chars_collection_length optimization
JerryScript-DCO-1.0-Signed-off-by: Xin Hu Xin.A.Hu@intel.com
2016-01-13 18:35:44 +03:00
Ruben Ayrapetyan
6d1bf13948 Fix incorrect assertion in bc_load_bytecode_data.
Related issue: #797

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2016-01-13 18:30:33 +03:00
pius lee
7868b0ae68 Fix Failed JSON stringify with NaN
http://www.ecma-international.org/ecma-262/5.1/#sec-15.12.3
Depending to Note4, NaN is reprensented as the String null

JerryScript-DCO-1.0-Signed-off-by: pius lee idkiller@gmail.com
2016-01-13 18:16:02 +03:00
pius.lee
cc60b0b3a2 Fix eval fail with empty string
Fixes #278

JerryScript-DCO-1.0-Signed-off-by: pius.lee pius.lee@samsung.com
2016-01-13 18:07:32 +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
Ruben Ayrapetyan
f932b7d48c Fix handling of property accessors in loop condition expressions and in argument of with statement.
Related issue: #798

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2016-01-11 13:42:12 +03: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
Ruben Ayrapetyan
b1de93abd6 Fix incorrect assertion in lit_utf8_iterator_seek.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-12-23 14:21:08 +03:00
Tamas Czene
f8f7eb4251 allow_to_customize_address_for_jerry_mem_heap
JerryScript-DCO-1.0-Signed-off-by: Tamas Czene tczene.u-szeged@partner.samsung.com
2015-12-11 10:09:17 +03:00
Zsolt Borbély
ab6d777220 Fix unittests build, when all-in-one is enabled.
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-12-08 14:06:17 +01: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
Laszlo Vidacs
b8b3b1f275 Test and fix CESU-8 handling in String builtins.
Fixes #757
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-12-02 12:38:06 +03: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
Zidong Jiang
3d286b46d0 Fix bug in linked_list_block_size().
and Ruben Ayrapetyan fix a bug in linked_list_switch_to_next_elem

Related issue: #720

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2015-12-02 12:12:03 +03:00
Hanjoung Lee
ce3b785c83 Fix lexing number literal
Related issue: #745

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-12-02 11:36:30 +09:00
Laszlo Vidacs
cd7cf53ecb Rearrange String.prototype.indexOf, lastIndexOf and Replace helpers
Fixes issue #515
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-11-27 14:09:11 +01:00
Hanjoung Lee
f20db76dfb Fix parse error of parse_switch_statement
Related issue: #725

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-11-27 12:19:09 +09:00
Hanjoung Lee
17f7bad242 Fix [[HasInstance]] operation for external functions
Related issue: #736

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-11-27 12:02:09 +09:00
Zsolt Borbély
fe157301a2 Add option to enable all-in-one build mode
Related issue: #626

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-11-25 14:01:07 +01:00
Zsolt Borbély
aa74c3e2e0 Remove duplcation of ecma_reject function
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-11-25 14:01:07 +01:00
Evgeny Gavrin
17a5dd27bb Add support of afl-fuzzer.
Related issue: #333, #454

Works only with default libc:
```
$ make debug.linux -j TOOLCHAIN="./build/configs/toolchain_afl.cmake" USE_COMPILER_DEFAULT_LIBC=YES
```

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-11-23 17:59:22 +03:00
Hanjoung Lee
140982e900 Fix PropertyName not to be resolved as a local variable
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-11-13 13:29:38 +09:00
Szilard Ledan
36e90d952f Global object unescape routine
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-11-11 10:48:35 +01: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
Ilyong Cho
94cb6aec26 Fix prop_getters stack manipulation for assignment expression.
Related issue: #614

JerryScript-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com
2015-11-09 11:02:57 +09: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
8af87206c9 Fix ecma_builtin_global_object_decode_uri_helper.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-03 18:42:01 +03: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
Zoltan Herczeg
c81c730129 Add support for reporting mallocs / frees to valgrind through client requests.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-11-03 03:57:49 -08:00
Ruben Ayrapetyan
911163e787 Optimize object literal byte-code - store property names as literal arguments, instead passing them through register variables.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 17:47:18 +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
46c65985e5 Create [[FormalParameters]] function object's internal property only if corresponding function has non-zero number of formal parameters.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 17:12:42 +03:00