107 Commits

Author SHA1 Message Date
Ruben Ayrapetyan
f8770020f7 Update RegExp.prototype.exec so that it returns 'null' instead of 'undefined' in case argument doesn't match corresponding regular expression.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-13 19:05:37 +03:00
Ruben Ayrapetyan
710a18d6af Add 'length' property of String.prototype built-in object.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-13 18:49:45 +03:00
László Langó
9c559216b7 Primitive value of Date.prototype should be NaN
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-10 13:31:31 +02:00
László Langó
9b24d8fd7a Implement Date.prototype.toString
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-10 09:43:19 +02:00
Kristof Kosztyo
9fc1958903 Fix the builtin Math.min and Math.max function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-07-10 09:11:43 +02:00
Szilard Ledan
8d7cdebee0 Implement builtin getters for Date object
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-09 17:04:54 +02:00
Andrey Shitov
d248d0944c Add helper functions for implementing unicode support in lexer.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-08 15:51:02 +03:00
Ruben Ayrapetyan
c21399cd58 Fix ecma_date_parse_date_chars: lit_char_is_unicode_digit -> lit_char_is_decimal_digit.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:20:45 +03:00
Laszlo Vidacs
6d86c4b2e1 Implement String.prototype.substring()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-07-08 12:57:17 +02: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
László Langó
c12914c71a Implement Date constructor.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-08 11:07:23 +02:00
Laszlo Vidacs
632618da99 Implement String.prototype.charAt()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-07-08 10:26:28 +02:00
Zsolt Borbély
69bfcea697 Move of built-in implementation helpers to jerry-core/ecma/builtin-objects
Related issue: #145

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-07 17:16:10 +02:00
Dániel Bátyai
3c4c5452dd Add length property to Array constructor
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-07 17:14:07 +02:00
László Langó
4f108ab401 Implement Date.UTC and add a dummy implementation for Date.now
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-07 15:43:33 +02:00
Zoltan Herczeg
06b4490ea1 Optimize encode/decode URI for valid UTF-8 input.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-07-07 04:50:01 -07:00
Zoltan Herczeg
d1a5f7fc87 Implement JSON built-in object
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-07-07 04:39:39 -07:00
László Langó
cadc8f40d4 Implement Date.parse
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-07 08:25:29 +02:00
Dániel Bátyai
47cd42ecc5 Fix Number.prototype.toFixed if argument is outside int32 range
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-06 15:17:27 +02:00
Peter Gal
4e5e7bb4c8 Set global object's prototype
The global object should have the same prototype
as a simple object.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-06 11:01:02 +02:00
Peter Gal
e154156cf4 Fix element indexing for Object.keys/Object.getOwnPropertyNames
Previously the index was incremented even if an internal property
or a non enumerable property was found.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-06 10:43:15 +02: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
Szilard Ledan
017aa6b684 Change Date helpers to handle NaN
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-02 09:15:03 +02:00
Dániel Bátyai
713b433c42 Implement Number.prototype.toPrecision()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-01 11:15:18 +02:00
Dániel Bátyai
53cbb55f25 Implement Number.prototype.toExponential()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-01 10:51:55 +02: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
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
Zsolt Borbély
1c19e5c8ab Fix the Object.getPrototypeOf function.
Related issue: #208

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-06-25 16:32:53 +02:00
Kristof Kosztyo
61ab205130 Implement Object.create function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-23 17:46:59 +02:00
Zsolt Borbély
3f28cb3bf8 Fix the indexing of Array builtin functions.
The index-dependant builtins didn't handle correctly the positive Infinity value.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-06-23 17:29:46 +02:00
Laszlo Vidacs
caa1617ea2 Implement String.prototype.trim()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-23 16:54:42 +02:00
Dániel Bátyai
7d3bb85ccb Fix buffer size in Number.prototype.toFixed()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-06-23 14:14:39 +02: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
Ruben Ayrapetyan
611811678e Remove invalid assertion in ecma_builtin_global_object_eval.
The removed assertion checked that `this` argument can't be equal to `undefined` in direct call to eval.
Actually, `this` can be not equal to `undefined` in case direct call to eval is performed from `with` block.

Related issue: #212

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 13:09:55 +03:00
Ruben Ayrapetyan
81d13b0676 Fix incorrect interchange of interfaces taking to ecma values and ecma completion values.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 11:38:13 +03:00
Kristof Kosztyo
e3861d7cd1 Implement Object.freeze and Object.isFrozen function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-22 10:03:18 +02:00
Kristof Kosztyo
2ee469ee65 Implement Object.seal and Object.isSealed function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-22 09:25:10 +02: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
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
Zoltan Herczeg
6027906f96 Add support for URI encoding / decoding.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-06-18 19:05:45 +02:00
Dániel Bátyai
7508b803cf Implement parseFloat()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
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 dbatyai.u-szeged@partner.samsung.com
2015-06-17 16:41:57 +02: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 r.ayrapetyan@samsung.com
2015-06-17 17:02:50 +03: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
5d5e75fad6 Implementing 'eval' routine of built-in Global object.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
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 r.ayrapetyan@samsung.com
2015-06-13 18:17:23 +03:00