aboutsummaryrefslogtreecommitdiff
path: root/jerry-core/ecma/builtin-objects/ecma-builtin-array.inc.h
AgeCommit message (Collapse)Author
2017-04-21Generate lit-magic-strings.inc.h (#1690)Akos Kiss
Currently, `lit-magic-strings.inc.h` is manually maintained. This has several drawbacks: - keeping the list of magic strings sorted first by length then alphabetically is error prone, - it is easy to leave unused magic strings in the list by accident (e.g., `LIT_MAGIC_STRING_JERRY_UL` is defined as a magic string but not used anywhere in the code) and, - it is very hard to add `CONFIG_DISABLE_*_BUILTIN` guards to the list, even though there are several magic strings, which are used in some of the configurations only (e.g, "setPrototypeOf" is used in ES2015 only). To ease the maintenance of magic strings, this commit moves the definition of magic strings to a config file (`lit-magic-strings.ini`), and adds `tools/gen-magic-strings.py` to generate the `.inc.h` file from this config file and from the use cases of the strings in the code. - The magic strings in the config file can appear in any order, the generator will ensure that they are correctly sorted. - The generator skips those definitions that are not used anywhere (and emits a warning to signal that such definitions can be removed). - The generator applies the same guards to the definitions in the `.inc.h` file as found in the code around the use of the strings to optimize for size. The commit also changes some builtin-related `.inc.h` files by adding guards that don't affect functionality but improve the results of the generator. To ensure that the invocation of the generator does not get forgotten, the commit also adds `tools/check-magic-strings.sh` and binds it into the testing infrastructure. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-03-23Factor out common macro un/definitions used for built-in descriptions (#1678)Akos Kiss
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-01-17Remove 'OBJECT_ID' from builtin headers. (#1529)László Langó
After 378d7f7 it is not used in the codebase and can be eliminated. JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-12-08Streamline copyright notices across the codebase. (#1473)Tilmann Scheller
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-07Add ES2015 feature: ArrayBuffer (#1467)Zidong Jiang
This patch implements ArrayBuffer and ArrayBuffer.prototype built-in objects. JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
2016-11-29Replace `//` double slash comments with `/* */`. (#1461)Robert Sipka
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-06-16Improve builtin-property construction.Zoltan Herczeg
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2015-07-07Add length property to Array constructorDániel Bátyai
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-06-29Move char type definitions and magic string processing functions to literal ↵Andrey Shitov
component. JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-02-17Renaming core -> jerry-core.Ruben Ayrapetyan