2787 Commits

Author SHA1 Message Date
Robert Sipka
1886d54474 Update unicode ranges to the latest version of Unicode Standard (version 9.0.0) (#1714)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-04-06 10:07:17 +02:00
Zsolt Borbély
5d950ccb05 Remove unused functions (#1710)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-04-04 10:49:47 +02:00
Zsolt Borbély
db22169293 Fix wrong condition in vm.c (#1708)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-04-03 15:21:34 +02:00
Zoltan Herczeg
1aec439869 Mark target_function of bound objects. (#1707)
Fixes #1621.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-04-03 13:05:29 +02:00
Levente Orban
a5b90ed858 Add minor features to debugger html client (#1705)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-04-03 12:36:48 +02:00
Robert Sipka
5f24620c8a Fix helper function for rounding numbers (#1702)
Fixes #1701

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-04-03 08:44:46 +02:00
Robert Sipka
f0a7e2456a Add coverity scan (#1700)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-04-03 08:44:30 +02:00
Levente Orban
efa7975ce9 Fix pylint warning in debugger python client (#1704)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-31 10:48:40 +02:00
Levente Orban
5525f5241d Bug fix for the debugger python client 'quit' command (#1703)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-31 08:34:40 +02:00
Zoltan Herczeg
750e0ca9d5 Fix several style fixes for typed arrays and optimize filter a bit. (#1697)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-30 16:06:11 +02:00
Zidong Jiang
41c63e08b1 Combine ARRAYBUFFER and TYPEDARRAY macros together (#1699)
Change CONFIG_DISABLE_ES2015_ARRAYBUFFER_BUILTIN to
CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
Because typedarray depends on arraybuffer and it doesn't make sense to
enable arraybuffer only.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-03-30 21:22:22 +08:00
Robert Sipka
3ff9a7de8a Fix the number of copied bytes in memmove (#1698)
Fixes #1634

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-30 10:40:05 +02:00
Levente Orban
20466a7637 Add missing test for debugger (#1692)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-30 10:29:32 +02:00
Zoltan Herczeg
343bac56b2 Add C-API for the debugger. (#1688)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-29 12:46:07 +02:00
Akos Kiss
2d9484a968 Don't do duplicate builds during test runs (#1691)
The `run-tests.py` test execution harness validates the correctness
of JerryScript by building various configurations of jerry and
running various test suites and subsets against it. However, until
now, it always built jerry for each (build configuration, test suite)
pair. This commit improves `run-tests.py` by skipping duplicate
builds, sharing the same-built binaries across multiple test suite
runs.

The patch also improves on the style of how `Option`s are specified
and fixes the name of the `jerry_tests-debug-cpointer_32bit`
option.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-28 15:48:09 +02:00
Zidong Jiang
16d5d6f79d Add a simple Job queue in default port. (#1685)
Job queue (event loop) is the basis of Promise. Each port should implement their own job queue.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-03-28 21:15:01 +08:00
Levente Orban
21cec3eb16 Add Stop at exception feature to the debugger (#1693)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-28 12:51:10 +02:00
Akos Kiss
da07252c45 Sort minimal profile (#1689)
Profiles used to be in alpha order. However, after the recent
`CONFIG_DISABLE_[ES2015_]*_BUILTIN` renamings, the minimal profile
became unsorted. This commit re-sorts the file.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-27 11:01:05 +02:00
Robert Sipka
faa9655981 Add asserts to avoid the access of cbc_flags and cbc_ext_flags arrays outside of their bounds (#1686)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-24 11:30:41 +01:00
Levente Orban
c09ba8cdb3 Rename 'CONFIG_DISABLE_ARRAYBUFFER_BUILTIN' to 'CONFIG_DISABLE_ES2015_ARRAYBUFFER_BUILTIN' (#1687)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-24 11:30:23 +01:00
Zidong Jiang
8571ebfae5 Implement %TypedArray%.from and fix the issue #1670 (#1679)
JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2017-03-24 10:37:22 +01:00
Levente Orban
f50193111b Rename 'CONFIG_DISABLE_TYPEDARRAY_BUILTIN' to 'CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN' (#1683)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-24 08:06:03 +01:00
Robert Sipka
0807c97cbb Eliminate duplicated statements in re-parser.c (#1680)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-23 16:20:32 +01:00
Péter Gál
013430aafb Fix minor inconsistencies in the API documentation (#1663)
In the jerry_set_prototype part the method was described
as jerry_get_prototype. Minor typo fix.

The usage of jerry_set_property was incorrect. Each
call to the jerry_set_property returns a value which must be freed.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2017-03-23 15:50:24 +01:00
Akos Kiss
4a5df52aa1 Factor out common macro un/definitions used for built-in descriptions (#1678)
The default definitions and undefinitions of macros used for built-in
descriptions (SIMPLE_VALUE, NUMBER_VALUE, STRING_VALUE, OBJECT_VALUE,
ROUTINE, ACCESSOR_READ_WRITE, ACCESSOR_READ_ONLY) are heavily cloned
all over the builtin-objects directory. This commit factors them out
into two header files, which are then included in the place of the
clones. This way, maintenance becomes a lot easier: e.g., if a new
macro gets introduced, default definition and undefinition don't have
to be added to all description files (of which there are 56 right now,
and their number will most probably just grow).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-23 09:36:29 +01:00
Zsolt Borbély
852a6aef53 Minor fixes around the debugger (#1677)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2017-03-23 09:08:06 +09:00
László Langó
fa5d5febcc Fix several pylint warnings. (#1659)
Fixed all of the remaining warnings in 'build.py', 'run-tests.py' and 'check-license.py'.

Related issue: #1600

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-03-22 15:37:55 +01:00
Robert Sipka
78e4dcf6c2 Build fix for 32-bit float ecma-number storage (#1669)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-22 14:18:43 +01:00
Akos Kiss
6ddf00a9fa Fix comments of ecma_lexical_environment_type_t (#1676)
The comments of `ecma_lexical_environment_type_t` document why the
values of the enum are as they are, while referring to
`ecma_object_type_t`. However, they became out of sync lately and
refer to nonexistent enum labels and/or incorrect values. This
commit gets the two enums in sync.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-22 11:36:44 +01:00
Akos Kiss
20a21a1faf Unify timeout mechanism in test runners and ensure that they work on OSX (#1672)
On OSX, the traditional GNU `timeout` command is available as
`gtimeout`. So, this commit adds some logic to the test runners to
try and find the right command name on the host.

Moreover, the commit also unifies the timeout mechanism across all
test runners by rewriting occurrences of `ulimit`-based timeouting
to use the `[g]timeout` command.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-22 10:51:37 +01:00
Robert Sipka
7e1ade3406 Remove logically dead code (#1674)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-22 10:17:12 +01:00
Levente Orban
4420401cf5 Style fix: return value comments (#1668)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-21 10:24:54 +01:00
Akos Kiss
e66bb5591d Implement Object.setPrototypeOf from ES2015 specification (#1666)
`Object.prototype.__proto__` has been implemented by most JS
engines to give R/W access to prototype chains, well before it made
it into the standard. JerryScript has decided not to implement it,
exactly because it was not part of ES 5.1. The only fully
ES5.1-compatible way of accessing the prototype chain is
`Object.getPrototypeOf` for reading.

However, ES2015 defines `Object.setPrototypeOf` for rewriting the
prototype chain, and JerryScript has now an ES2015 subset profile.
So, this commit adds its implementation to JerryScript.

Note, this commit does _not_ add `Object.prototype.__proto__`,
since that is in the Annex B of ES2015 specification, which is
optional for non-web-browser hosts.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-21 10:11:07 +01:00
Levente Orban
868ba92e02 Add more tests for the remote debugger (#1667)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-20 12:38:04 +01:00
Gabor Loki
dd7e20c85d The mbed ports used wrong time computations for the (#1642)
'jerry_port_get_current_time' function. Microseconds was used instead of
milliseconds.

A quick fix has been done in the Yotta-based mbed port, and an extended one
- with correction - works in the mbed OS 5 port now.

JerryScript-DCO-1.0-Signed-off-by: Gabor Loki loki@inf.u-szeged.hu
2017-03-17 08:35:14 +01:00
Robert Sipka
23ac60915f Modify the snapshot API functions to expect a 32-bit aligned buffer pointer (#1655)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-17 09:01:59 +09:00
Levente Orban
05bb5d7890 Improve the debugger python client messages (#1654)
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
2017-03-17 09:01:10 +09:00
Akos Kiss
edadc53def Fix Date objects' YearFromTime helper for out-of-range time values (#1658)
For negative out-of-range time values, ecma_date_year_from_time
fell into an infinite loop. (Moreover, for positive out-of-range
time values, it returned an incorrect year.) This patch fixes the
helper to return NaN in these cases (and ensures that its call
sites are prepared for NaN values).

Fixes #1657.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-16 17:03:42 +01:00
Robert Sipka
d77d4ae1c6 Refactor the generator scripts for unicode tables (#1623)
Extract the source code generator methods into a separated `unicode_c_source.py` script.
Fix the generator scripts to make them compatible with both Python2 and Python3.
Remove pylint warnings.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-16 09:32:18 +01:00
Robert Sipka
818c9cd0b0 Fix issue #742 (#1650)
It is a workaround fix. The problem comes from the inaccuracy of the double rounding.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2017-03-16 08:59:48 +01:00
László Langó
202a88bbeb Temporarily disable a few test262 tests in automatic testing. (#1662)
Those tests are related the actual daylight saving adjustment.
Related issue: #1661

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-03-14 15:26:56 +01:00
Zoltan Herczeg
1b4426fd2a Check whether match result has error flag. (#1653)
Fixes #1641.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-14 10:01:22 +01:00
Gabor Loki
ed32ba148c Fix the example code of 'jerry_define_own_property' function (#1656)
JerryScript-DCO-1.0-Signed-off-by: Gabor Loki loki@inf.u-szeged.hu
2017-03-13 15:52:06 +01:00
Zoltan Herczeg
679500b327 Improve breakpoint generator of the debugger. (#1652)
Now the debugger generates a breakpoint for each function before
its first executable statement. This allows inspecting the function
arguments. Position (line and column) info is also added which
simplifies finding of anonymus functions. Several tests were
update to check more corner cases.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-13 11:36:34 +01:00
László Langó
57ea06782b Fix several pylint warnings. (#1644)
Fixed
 * 'unused-wildcard-import'
 * 'bad-whitespace'
 * 'bad-continuation'
 * 'wrong-import-order'
in 'build.py', 'run-tests.py' and 'check-license.py'.

Related issue: #1600

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2017-03-13 11:18:49 +01:00
Zoltan Herczeg
b140158104 Fix various number parsing issues. (#1648)
For example Number(".") and Number("e5") should be NaN not
zero. Parsing Number("e") caused buffer overflow as well.
Infinity parsing is a bit faster now.

Fixes #1636.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-09 15:03:46 +01:00
Tilmann Scheller
f8dd54abb6 Fix old-style function definitions and enable warning. (#1651)
Function definitions with no parameters should always use the void keyword to allow the compiler to catch invalid calls of those functions at compile time.

Enable -Wold-style-definition to catch this early in the future.

Fixes #1649.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2017-03-09 13:41:26 +01:00
Yanhui Shen
a2a160d6f9 Improve error messages (#1577)
JerryScript-DCO-1.0-Signed-off-by: Yanhui Shen shen.elf@gmail.com
2017-03-08 10:58:25 +01:00
Zoltan Herczeg
319702cdd2 Support internal properties in GC mark. (#1646)
Some internal properties are incorrectly handled as objects and
marked as visited. This memory overwrite caused random crashes
in IoT.js.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-07 14:14:05 +01:00
Zoltan Herczeg
a20b9dfa19 Introducing debugger modes (run, breakpoint). (#1645)
This makes the code more robust and error prone, since certain
messages cannot be received in certain situations, e.g. an eval
command during garbage collection.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2017-03-07 11:58:46 +01:00