68 Commits

Author SHA1 Message Date
Ruben Ayrapetyan
4667d3078b Introduce GC start heuristics on low-severity try-give-memory-back requests.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-17 20:10:26 +03:00
Ruben Ayrapetyan
1cafff32b5 Pass function arguments through ecma-collections.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-10 19:56:07 +03:00
Ruben Ayrapetyan
7daabb1974 Change fill_params_list to append formal parameter names to ecma-values collection, instead of array; rename it to vm_fill_params_list.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-10 19:56:07 +03:00
Dániel Bátyai
b7d3189ac3 Trim whitespace from argument names in Function constructor
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-08-10 10:28:42 +02:00
László Langó
a19dd0523e Fix 'property_p != NULL' assertion fail in RegExp
Related issue: #312

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-08-07 08:02:02 +02:00
Ruben Ayrapetyan
97aed75a46 Introduce interface for removal of a ecma-collection's last value.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-06 15:52:41 +03:00
Kristof Kosztyo
2eb8f76089 Fix ecma_get_property_descriptor_from_property for accessor properties with [[Get]] / [[Set]] set to undefined value
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-08-06 14:23:36 +02:00
Zsolt Borbély
e61f41a0bc Fix of memory leak in Function.prototype.bind function.
Related issue: #511

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-08-06 13:05:33 +02:00
Ruben Ayrapetyan
b08e8a3173 Make ecma-values collection extendable (by introducing ecma_append_to_values_collection interface).
Related issue: #311

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-05 16:55:17 +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
31894da098 Move ecma-stack to vm component, renaming it to vm-stack.
ECMA-stack is related to VM and is not related to ECMA component, except for GC.
Dependency between vm-stack and GC would be solved after GC would be extracted to a separate compoment.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-22 14:36:23 +03:00
Dániel Bátyai
a2c6663d43 Array.prototype.sort() now handles defined properties only.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-22 14:18:24 +03:00
Zsolt Borbély
1e90f833f7 Implement Function.prototype.bind function
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-15 08:39:35 +02:00
Ruben Ayrapetyan
c84d31ce9e Fix sign of number remainder (ecma_op_number_remainder).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-13 19:21:46 +03:00
Andrey Shitov
cf2bc459bb Support unicode whitespaces in string-to-number conversion.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-13 18:33:05 +03:00
Andrey Shitov
dbf3708255 Fix concatenating of surrogates.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-10 10:23:20 +03:00
Dániel Bátyai
5e0a355ab9 Implement printing in the specified radix for Number.prototype.toString().
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-08 11:25:00 +02:00
Ruben Ayrapetyan
c37964f7a9 Move helpers from ecma-helpers-char.cpp to lit-char-helpers.cpp, rename them correspondingly.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-02 17:36:48 +03:00
Evgeny Gavrin
56e7ead9f9 Fix build for GCC 4.7.
Related issue: #1

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-01 20:52:37 +03:00
Ruben Ayrapetyan
438d2c2930 Fix ecma-property construction: perform operations that could invoke GC before linking property into an object's property list to avoid start of GC in the middle of property construction.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-01 14:23:48 +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
Ruben Ayrapetyan
9e3f123cd5 Fix character code values for "<LF>" and "<CR>" characters in ecma-char helpers.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:49:57 +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
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
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ó
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
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
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
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
László Langó
d803c3bc82 Init commit for Date object.
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-16 18:05:31 +02:00
Ruben Ayrapetyan
8ea0e23ea3 Support of multiple bytecode arrays in interpreter and ecma-runtime.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-13 18:01:31 +03:00
Kristof Kosztyo
013bce85fc Fix ecma_get_property_descriptor_from_property function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-12 16:51:57 +02:00
Peter Gal
62cb842434 Implement Function.prototype.toString.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-12 14:54:03 +02: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
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
Ruben Ayrapetyan
ac87616f05 Fixing break / continue, nested into 'try', 'with' blocks.
Related issue: #128

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-04 17:39:48 +03:00
Ruben Ayrapetyan
8b28cac99e Implementing escape sequences support with the exception of "\0" ("<NUL>") character and cases that depend on Unicode support.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-29 14:03:11 +03:00
Ruben Ayrapetyan
bc7c28ce12 Changing ecma_new_ecma_string_from_number to check if the string to create is equal to a magic string, and, if so, to invoke corresponding magic string construction.
Related issue: #113

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-29 12:31:33 +03:00
Peter Gal
b614c0bd9a Implement Array.prototype.join
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-05-21 16:22:48 +02:00
Kristof Kosztyo
fc309cae92 Implement Object.getOwnPropertyDescriptor function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-05-20 15:05:27 +02:00
Tamas Czene
7dfbc88cc0 Added Math functions
JerryScript-DCO-1.0-Signed-off-by: Tamas Czene tczene.u-szeged@partner.samsung.com
2015-05-19 18:09:12 +02: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
c4e7f56562 Introducing MEM_CP_{GET_[NON_NULL_]POINTER, SET_[NON_NULL_]POINTER} getters / setters for compressed pointers.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-13 22:05:21 +03: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