165 Commits

Author SHA1 Message Date
Zoltan Herczeg
0a1b6eb4c7 Implement String.prototype.search, and some minor regexp refactors.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-04 05:14:11 -07:00
Roland Takacs
b5923ccd9d Fix [[Construct]] call for Date()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-03 09:06:16 +02:00
Ruben Ayrapetyan
72d4c07bdc Remove 'print' instrinsic, add 'print' implementation-defined built-in routine to the Global object.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-31 17:57:59 +03:00
László Langó
5d385b1144 Fix properties of RegExp prototype
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-30 15:25:53 +02:00
Roland Takacs
144c3ba874 Fix assertion 'mem_pools == NULL' in the Date constructor.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-30 13:35:06 +02:00
Zoltan Herczeg
048e20925e Implement String.prototype.replace function.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-07-30 03:55:50 -07:00
Dániel Bátyai
39cf5aaa7c Fix RegExp constructor when called with undefined arguments
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-30 09:47:37 +02:00
Dániel Bátyai
1193de88cc Use [[DefineOwnProperty]] in Array builtins where necessary.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-30 09:31:49 +02:00
Kristof Kosztyo
8cd1ade515 Fix primitive value handling in Date constructor
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-07-29 15:08:55 +02:00
Zoltan Herczeg
41aef56cba Rename isalpha, isdigit and replace characters with their corresponding constant.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-07-28 23:38:45 -07:00
Peter Gal
3fbe54393f Make parseInt unicode tolerant.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-28 18:36:39 +02: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
Peter Gal
25450d8a12 Error constructor prototypes should be Function
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-28 12:16:38 +02:00
Dániel Bátyai
f1248b9780 Fix Number.prototype.toString() when radix is undefined.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-28 12:04:41 +02:00
Szilard Ledan
b5da46f2aa Fix segmentation fault in Date helper functions
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-28 10:19:56 +02:00
Peter Gal
e34ab90e61 RegExp: treat undefined argument as empty.
new RegExp() and new RegExp(undefined) calls now results in the
same 'source' pattern.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-27 15:58:38 +02:00
Roland Takacs
336db40ed0 Segmentation fault in JSON.stringify()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-27 15:29:55 +02:00
Dániel Bátyai
2e0334ccb2 Returned array of Array.prototype.map() should have same length as original.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-27 10:41:50 +02:00
Dániel Bátyai
fc45b80579 Fix Array.prototype.toLocaleString() when toLocaleString returns non-string.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-24 17:43:16 +02:00
Dániel Bátyai
b11007055d Fix buffer size calculation in Number.prototype.toString()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-24 17:21:04 +02:00
Dániel Bátyai
fec5933a3d Fix Array.prototype.push() and unshift() in case result length is larger than UINT_MAX
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-24 17:16:34 +02:00
Peter Gal
b5de03a808 Improve Infinity handling in Math.min/max methods.
In Math.max case: if we already found an infinity value update the result
only when the previous value was a negative infinity.

In Math.min case: if we already found an infinity value update the result
only when the previous value was a positive infinity.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-24 16:22:50 +02:00
László Langó
3c71daaf84 Use unicode iterators in RegExp engine and implement \d, \D, \w, \W, \s, \S, \x, \u matching in RegExp.
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-07-24 16:07:25 +02:00
Dániel Bátyai
6567651b6c Fix Array index normalize helper when index is large.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-24 15:01:12 +02:00
Peter Gal
ee8d65063f Fix parseInt when passing empty string.
Before allocating buffer for the string first
we check that the length of it is greater then 0.
If not then the result is a NaN.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-24 14:39:12 +02:00
Zsolt Borbély
33be4883a2 Fix Array.prototype.splice() deletecount calculation
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-24 13:55:56 +02:00
Laszlo Vidacs
64c81cc44d Implement String.prototype.indexOf()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-07-24 13:35:26 +02:00
Roland Takacs
ed16f09019 Implement Date.prototype.toJSON()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-24 12:50:02 +02:00
Dániel Bátyai
9513808647 Fix Array.prototype.concat() when 'this' is not an array.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-24 10:12:02 +02:00
Dániel Bátyai
27161d31df Fix leak in Array.prototype.indexOf() when 'fromIndex' can't coerce to primitive value.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-24 10:31:37 +03:00
Peter Gal
11c310322b Implement String.prototype.match
Added implementation for the String.prototype.match method.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-23 10:42:13 +03:00
Roland Takacs
63083b3b51 Implement date.prototype.toISOString() and date.prototype.toUTCString()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-22 15:42:49 +03:00
Zsolt Borbély
352e8f5c04 Minor stylefixes for the Array builtin
Related issue: #110

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-22 15:01:11 +03:00
Zsolt Borbély
cdf361c2bd Reorder Array builtin functions
Sort the functions according by the chapters of the standard.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-22 15:01:11 +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
Dániel Bátyai
9d6e7bf336 Array.prototype.sort() should sort in place.
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
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
Laszlo Vidacs
c7a47c1791 Implement String.prototype.charCodeAt()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-07-20 16:10:45 +02:00
Ruben Ayrapetyan
7b3042fdc9 Remove usage of isalpha, isdigit, isxdigit, isspace in the whole engine except implementation of JSON built-in, moving the functions to JSON built-in's module.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-20 15:47:19 +03:00
Zoltan Herczeg
bcedc901cd Add \u parse support for the JSON object. Buffer overrun issues were fixed as well.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-07-20 01:09:13 -07:00
Szilard Ledan
bbfddea032 Fix Date(Number.POSITIVE_INFINITY) assertion fail in the Date constructor
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-17 17:38:00 +02:00
Szilard Ledan
351df6184c Add locale part of the toString in the Date object
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-16 13:04:41 +02:00
Dániel Bátyai
b414329ce8 Fix Array.prototype.concat() argument array length.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-16 10:22:52 +03:00
Peter Gal
db9b74a114 Fix buffer size calculation in parseInt.
Fixes issue #279.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-16 10:14:22 +03:00
Szilard Ledan
005eb044a9 Implement builtin setters for Date object
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-15 17:16:59 +03: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
László Langó
051c7b6786 Implement Date.prototype.toDateString and Date.prototype.toTimeString
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-15 16:25:14 +03:00
László Langó
84f09ffcd9 Follow up fix for Date.prototype.toString
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-15 16:25:14 +03:00
Roland Takacs
dcc704d1e8 Add missing case for backspace control character in JSON.parse()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-15 16:17:56 +03:00