18 Commits

Author SHA1 Message Date
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
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
Zoltan Herczeg
37ebd20a72 Remove LIST_LAZY_PROPERTY_NAMES_ROUTINE_NAME macro function.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-17 06:20:06 -07:00
Zoltan Herczeg
378d7f78ca Improve builtin-property construction.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-06-16 01:42:55 -07:00
Akos Kiss
235a5b1329 Refactor ECMA builtin template
Avoid sorting the array of property magic string IDs and make it
const, thus ensuring that it gets placed in .rodata. Replace the
binary search in the array (which would not work anymore because
of unsortendness) with function that returns the index of the
looked-after magic string ID using a switch-based logic (we rely
on compiler optimization to generate optimal code from that
switch).

Extras:
* Getting rid of the superfluous macro argument from routine names.
* Fixing the list of undef'd macros
* Fixing related comments

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-22 13:47:45 +01: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
Roland Takacs
0219f37dcc Remove template expression from jerry_ref_unused_variables.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-05 14:00:44 +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
50fdccc8c9 Lazy instantiation of built-in function object's 'length' properties.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-08 15:19:51 +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
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
Andrey Shitov
9763a93df3 Add new coding style rules and fix appeared issues.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-05-14 14:44:57 +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