78 Commits

Author SHA1 Message Date
Zoltan Herczeg
945fbef110 Rework function.bind (#1406)
The new code does not use value collections which reduces the argument array size by half.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-10-25 13:15:14 +02:00
Zoltan Herczeg
fd98d649b6 Remove several internal property types for primitive objects. (#1399)
Class and value internal properties are always exists for primitive
types (e.g. Boolean, Regex) so they can be stored right after the
object. This improve property access (since internal properties are
searched by a slow linear algorithm) and reduces memory consumption,
since only 8 byte is allocated for these two properties instead of
16 which is the size of a property pair.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-10-19 15:36:15 +02:00
László Langó
a130059c8b Add error messages to ecam/operations. (#1396)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-10-19 09:37:51 +09:00
Zoltan Herczeg
dcaec22c0c Major property rework: introducing virtual properties.
Properties are changed to a type and value pair instead of a pointer to an internal
representation. Functions such as ecma_op_object_get_[own_]property do not
return with property pointers anymore.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-09-19 00:32:38 -07:00
Zoltan Herczeg
d9979be2f6 Rewrite property get/put to not use ecma_op_object_get_own_property
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-09-12 03:33:22 -07:00
Zoltan Herczeg
548b3b98c2 Change return value to ecma_value_t for getting internal properties.
Removing a lot of ECMA_PROPERTY_VALUE_PTR macro calls. The only drawback
is free callbacks for native objects cannot be deleted anymore. Redefining
a free callback is a rare case, so this trade-of is acceptable.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-08-31 06:13:00 -07:00
Youngil Choi
c6e68ce167 Eval called as a bound function should be indirect eval
JerryScript-DCO-1.0-Signed-off-by: Youngil Choi duddlf.choi@samsung.com
2016-08-26 17:48:39 +09:00
Akos Kiss
db36e942fb Avoid (void) and use JERRY_UNUSED
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-08-05 13:16:53 +02:00
Robert Sipka
f15e7beadc Remove compact profile.
The standard doesn't defines ECMAScript Compact Profile as a subset of Ecma-262 Edition 5.1.
Profile modes can be added easily like the minimal profile if required.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-08-05 09:11:33 +02:00
Zoltan Herczeg
6f1ce8d6bb Improve the construction of "length" built-in strings.
The "length" property name is the most frequently used built-in string
and also frequently created by various hot-paths. New functions are
added to improve the speed of the "length" string creation.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-07-13 23:36:27 -07:00
Zoltan Herczeg
ea0176764e Remove ECMA_OBJECT_TYPE_BUILT_IN_FUNCTION to free an object type.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-24 02:14:35 -07:00
Zoltan Herczeg
1726bba184 Create extended objects instead of internal properties.
Several internal properties are removed and directly stored as
part of the object. Faster built-in and JS function processing.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-21 06:12:17 -07:00
László Langó
a816ab8bb0 Use 'ecma_value_t' in API too
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-06-14 14:44:02 +02:00
Zoltan Herczeg
b828d4a463 Rename ecma_is_value_error to ECMA_IS_VALUE_ERROR.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-14 02:31:34 -07:00
Zoltan Herczeg
8c92972b2f Passing less number of arguments to a function is generally faster. So
the three boolean arguments of ecma_create_named_data_property and the
two boolean arguments of ecma_create_named_accessor_property are combined
into one uint8_t argument. On ARM-32 it is preferred to have less than
four arguments, since these arguments can be passed in registers.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-29 23:47:46 -07:00
László Langó
92bb551d45 Change 'mem' namspace to 'jmem'
The 'mem_' prefix is too general, so it might clash with
symbols in other libraries. Renamed the directory, file,
funtion and type names.

Related issue: #1052

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-05-20 16:01:33 +02:00
Zoltan Herczeg
00f759e275 Introduce integer ecma-value representation to reduce the double allocations.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-05-17 00:11:19 -07:00
Robert Sipka
19b972b8eb Check whether the aligned pointers value of the internal properties can be stored directly in ecma_value_t.
Those internal properties which have a primitive value field or where the property value type
is an ecma_object_t ptr were checked earlier.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-05-02 10:54:48 +02:00
Akos Kiss
27682017e9 Remove unused internal functions
The internals have surprisingly large number of unused functions at
surprising places. This patch cleans them out to make maintenance
easier and to prevent dead code having effect on future decisions.

The patch intentionally does not try to clean up public API but
focuses on internal modules only that are/should not be reachable
from "outside".

However, unit tests do access private API, thus tests of literal
storage had to be adjusted.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-04-22 14:39:43 +02:00
robertsipka
a87aca4d84 Don't use pointer compression where the ecma_value can store pointer value directly
This changes affects those internal properties where the property value type is an ecma_object_t ptr.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-04-22 14:30:53 +02:00
Zoltan Herczeg
c7dcce4fc7 Refactor object property chain to use property pairs. The patch
itself seems a step back, but the primary aim is opening future
optimization opportunities. The list of changes follows:

 - Property is changed to be an abstract type, which has type, flags,
   and a value. It does not have a name anymore and property pointers
   cannot be compressed.
 - Full (32 bit) ecma values can be property values. This allows
   using non-compressed pointers for ecma values in the future.
 - The property chain is not restricted to the same item anymore,
   it can contain hash maps, arrays in the future.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-04-13 23:25:16 -07:00
László Langó
2027caeda5 Performance optimizations
* inline some hot function
 * add 'ecma_copy_value_if_not_object' similer to 'ecma_value_free_if_not_object'
 * remove unnecessary helpers
 * improve 'do_number_bitwise_logic'

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-03-22 08:05:00 +01:00
László Langó
ab26d57841 Don't use messages for errors by default
Use empty string for message property of builtin error objects
by default. Add ERROR_MESSAGES build option.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-03-09 11:44:32 +01:00
Zoltan Herczeg
b8b587f76c Rearrange fields of ecma_property_t to be naturally aligned. Packed attribute and __extension__ keywords are removed. The standard approach reduced the binary size by 2K.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-03-03 05:18:28 -08:00
László Langó
9d7978074f Fix 'jerry-test-suite/13/13-011.js' fail in compact profile
Arguments object is not supported in compact profile, so remove
the test from 'compact-profile-list'. Do not create arguments
object on function calls in compact profile. Remove unnecessary
arguments check.
Related issue: #879

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-22 14:35:37 +01:00
László Langó
a7715a5d78 Fix style issues and improve vera++ rules.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-18 13:27:54 +00:00
Zoltan Herczeg
b2426a7a94 Remove 'ecma_completion_value_t'
Remove ecma_completion_value_t, and add an extra bit to
ecma_value_t to represent errors. From the long list of
completion types only normal and error remained.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-02-17 13:52:51 +00:00
Robert Sipka
977bfa5d2c Remove g++ support from the [C]Make files.
Move all '.cpp' files to '.c'.
Rename comments from 'cpp' to 'c'.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-15 12:49:12 +01:00