18 Commits

Author SHA1 Message Date
Zoltan Herczeg
04dcefe087 Rework function call. (#2414)
Furthermore add a construct flag, which disallows calling certain
functions without new. Constructing bound arrow functions correctly
throws error now.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2018-07-11 09:35:44 +09:00
László Langó
94760b1213
Improve builtin instantiation (#2226)
* Resolve linker errors with -O0 in some compilers
 * Reduce the stack usage

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-03-02 14:37:03 +01:00
László Langó
fbf5c32747 Removed 'is_static' parameter from 'BUILTIN' macro, because was never used. (#2216)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2018-02-22 09:14:56 +09:00
Tilmann Scheller
65c32f6a3b Add parameter names to function declarations. (#1498)
It's generally considered a bad programming practice to have function declarations without parameter names.

This is another legacy from the early days of the project. Fix in one go to minimize history disruption.

Used a custom clang-tidy check to create the bulk of the change.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-12-16 15:40:46 +01:00
Tilmann Scheller
1e99be90c3 Remove redundant extern keywords from function declarations/definitions. (#1495)
Extern keywords on function declarations/definitions provide no additional value since function declarations/definitions default to external linkage in C99, e.g. removing them won't change the semantics of the program.

The extern keywords were essentially a legacy from the early days of the project. This commit cleans this up across the whole codebase in one go to minimize history disruption.

The bulk of the changes in this commit were produced by a custom clang-tidy checker.

Note that variables declarations carrying the extern keyword are untouched by this commit since there the presence of the keyword actually has an impact on the semantics of the program.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-12-16 10:18:37 +01:00
Tilmann Scheller
0511091e8a Streamline copyright notices across the codebase. (#1473)
Since the project is now hosted at the JS Foundation we can move to unified copyright notices for the project.

Starting with this commit all future contributions to the project should only carry the following copyright notice (except for third-party code which requires copyright information to be preserved):

"Copyright JS Foundation and other contributors, http://js.foundation" (without the quotes)

This avoids cluttering the codebase with contributor-specific copyright notices which have a higher maintenance overhead and tend to get outdated quickly. Also dropping the year from the copyright notices helps to avoid yearly code changes just to update the copyright notices.

Note that each contributor still retains full copyright ownership of his/her contributions and the respective authorship is tracked very accurately via Git.

JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
2016-12-08 06:39:11 +01:00
Zidong Jiang
29d058cec4 Add ES2015 feature: ArrayBuffer (#1467)
This patch implements ArrayBuffer and ArrayBuffer.prototype built-in objects.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-12-07 14:04:01 +01:00
Zoltan Herczeg
d1b0b58729 Move all remaining globals to the global context.
Zero out all globals (and remove unnecessary init() functions).
Move snapshot globals to a temporary stack variable.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-08-01 04:25:32 -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
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
Zoltan Herczeg
cadc81d583 ECMAScript Parameters cannot be passed in collections anymore, only as arrays.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-02-10 16:01:52 +01:00
Ruben Ayrapetyan
da47c671e7 List of lazy instantiated properties' names in ecma_op_object_get_property_names.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 16:32:31 +03:00
Ruben Ayrapetyan
b7c93f170d Remove argument names in function prototypes, declared in headers; fix '*' alignment in headers.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-28 18:27:10 +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
da7e9d9871 Fixing retrieval of [[Class]] properties for built-in function objects, optimizing memory related to [[Class]] property.
- introduced ecma_object_get_class_name interface;
 - removed creation of [[Class]] internal property for types of objects that unambiguously determine the [[Class]] value.

Related issue: #112

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-29 12:52:24 +03:00
Ruben Ayrapetyan
175f8912b2 Passing ecma_value_t by value instead of by reference. 2015-04-18 21:46:13 +03:00
Ruben Ayrapetyan
79695bf3cd Extension description syntax; extension instantiation, field values and calls with arguments (except strings); example of a simple extension.
String arguments support is supposed to be added in a subsequent commit.
2015-02-25 16:51:21 +03:00
Ruben Ayrapetyan
88353e93cf Renaming core -> jerry-core. 2015-02-17 19:08:55 +03:00