### About profile files
Specify compile definitions in profile files to use when compiling the `jerry-core` target.
The default profile is ``es5.1`` which disables the ES2015 features.
### Using profiles with the build system
You can specify the profile for the build system in the following ways:
* with absolute path
* with a name (this options selects profiles/$(name).profile file)
#### Restrictions
Only single line options are allowed in the profile file. Any line starting with hash-mark is ignored. Semicolon character is not allowed.
### Example usage
#### 1. Using the build script
If you want to use a predefined profile, run the build script as follows
(assuming that you are in the project root folder):
```
./tools/build.py --profile=minimal
```
Alternatively, if you want to use a custom profile at
`/absolute/path/to/my.profile`:
```
# Turn off every ES2015 feature EXCEPT the arrow functions
CONFIG_DISABLE_ES2015_BUILTIN
CONFIG_DISABLE_ES2015_CLASS
CONFIG_DISABLE_ES2015_FUNCTION_PARAMETER_INITIALIZER
CONFIG_DISABLE_ES2015_FUNCTION_REST_PARAMETER
CONFIG_DISABLE_ES2015_MAP_BUILTIN
CONFIG_DISABLE_ES2015_OBJECT_INITIALIZER
CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
CONFIG_DISABLE_ES2015_TEMPLATE_STRINGS
CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
```
Run the build script as follows (assuming that you are in the project root
folder):
```
./tools/build.py --profile=/absolute/path/to/my.profile
```
#### 2. Using only CMake build system
Set FEATURE_PROFILE option to one of the following values:
* the profile with absolute path
* name of the profile (which needs to exist in the `profiles` folder)
### Configurations
In JerryScript all of the features are enabled by default, so an empty profile file turns on all of the available ECMA features.
* `CONFIG_DISABLE_ANNEXB_BUILTIN`:
Disable the [Annex B](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-B) of the ECMA5.1 standard.
* `CONFIG_DISABLE_ARRAY_BUILTIN`:
Disable the [Array](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.4) built-in.
* `CONFIG_DISABLE_BOOLEAN_BUILTIN`:
Disable the [Boolean](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.6) built-in.
* `CONFIG_DISABLE_DATE_BUILTIN`:
Disable the [Date](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.9) built-in.
* `CONFIG_DISABLE_ERROR_BUILTINS`:
Disable the [Native Error Types](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.11.6) (EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError).
**Note**: The [Error](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.11.2) object remains available.
* `CONFIG_DISABLE_JSON_BUILTIN`:
Disable the [JSON](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.12) built-in.
* `CONFIG_DISABLE_MATH_BUILTIN`:
Disable the [Math](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.8) built-in.
* `CONFIG_DISABLE_NUMBER_BUILTIN`:
Disable the [Number](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.7) built-in.
* `CONFIG_DISABLE_REGEXP_BUILTIN`:
Disable the [RegExp](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.10) built-in.
* `CONFIG_DISABLE_STRING_BUILTIN`:
Disable the [String](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.5) built-in.
* `CONFIG_DISABLE_BUILTINS`:
Disable all of the [Standard Built-in ECMAScript 5.1 Objects](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15)
(equivalent to `CONFIG_DISABLE_ANNEXB_BUILTIN`, `CONFIG_DISABLE_ARRAY_BUILTIN`, `CONFIG_DISABLE_BOOLEAN_BUILTIN`, `CONFIG_DISABLE_DATE_BUILTIN`, `CONFIG_DISABLE_ERROR_BUILTINS`, `CONFIG_DISABLE_JSON_BUILTIN`, `CONFIG_DISABLE_MATH_BUILTIN`, `CONFIG_DISABLE_NUMBER_BUILTIN`, `CONFIG_DISABLE_REGEXP_BUILTIN`, and `CONFIG_DISABLE_STRING_BUILTIN`).
* `CONFIG_DISABLE_ES2015_ARROW_FUNCTION`:
Disable the [arrow functions](http://www.ecma-international.org/ecma-262/6.0/#sec-arrow-function-definitions).
* `CONFIG_DISABLE_ES2015_BUILTIN`:
Disable the built-in updates of the 5.1 standard. There are some differences in those built-ins which available in both [5.1](http://www.ecma-international.org/ecma-262/5.1/) and [2015](http://www.ecma-international.org/ecma-262/6.0/) versions of the standard. JerryScript uses the latest definition by default.
* `CONFIG_DISABLE_ES2015_CLASS`:
Disable the [class](https://www.ecma-international.org/ecma-262/6.0/#sec-class-definitions) language element.
* `CONFIG_DISABLE_ES2015_FUNCTION_PARAMETER_INITIALIZER`:
Disable the [default value](http://www.ecma-international.org/ecma-262/6.0/#sec-function-definitions) for formal parameters.
* `CONFIG_DISABLE_ES2015_FUNCTION_REST_PARAMETER`:
Disable the [rest parameter](http://www.ecma-international.org/ecma-262/6.0/#sec-function-definitions).
* `CONFIG_DISABLE_ES2015_MAP_BUILTIN`:
Disable the [Map](http://www.ecma-international.org/ecma-262/6.0/#sec-keyed-collection) built-ins.
* `CONFIG_DISABLE_ES2015_OBJECT_INITIALIZER`:
Disable the [enhanced object initializer](http://www.ecma-international.org/ecma-262/6.0/#sec-object-initializer) language element.
* `CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN`:
Disable the [Symbol](https://www.ecma-international.org/ecma-262/6.0/#sec-symbol-objects) built-in.
* `CONFIG_DISABLE_ES2015_PROMISE_BUILTIN`:
Disable the [Promise](http://www.ecma-international.org/ecma-262/6.0/#sec-promise-objects) built-in.
* `CONFIG_DISABLE_ES2015_TEMPLATE_STRINGS`:
Disable the [template strings](http://www.ecma-international.org/ecma-262/6.0/#sec-static-semantics-templatestrings).
* `CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN`:
Disable the [ArrayBuffer](http://www.ecma-international.org/ecma-262/6.0/#sec-arraybuffer-objects) and [TypedArray](http://www.ecma-international.org/ecma-262/6.0/#sec-typedarray-objects) built-ins.
* `CONFIG_DISABLE_ES2015`: Disable all of the implemented [ECMAScript2015 features](http://www.ecma-international.org/ecma-262/6.0/).
(equivalent to `CONFIG_DISABLE_ES2015_ARROW_FUNCTION`, `CONFIG_DISABLE_ES2015_BUILTIN`, `CONFIG_DISABLE_ES2015_CLASS`,
`CONFIG_DISABLE_ES2015_FUNCTION_PARAMETER_INITIALIZER`, `CONFIG_DISABLE_ES2015_FUNCTION_REST_PARAMETER`,
`CONFIG_DISABLE_ES2015_MAP_BUILTIN`, `CONFIG_DISABLE_ES2015_OBJECT_INITIALIZER`,
`CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN`, `CONFIG_DISABLE_ES2015_PROMISE_BUILTIN`, `CONFIG_DISABLE_ES2015_TEMPLATE_STRINGS`, and `CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN`).
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
jerry-libm-internal 数学库文件,计算三角函数,开方运算等,极高精度 (2000个子文件)
test-api.c 32KB
test-ext-arg.c 31KB
gen-test-libm.c 25KB
test-typedarray.c 21KB
test-snapshot.c 17KB
test-api-strings.c 12KB
test-arraybuffer.c 12KB
test-backtrace.c 8KB
test-api-set-and-clear-error-flag.c 7KB
jerry-module-test.c 7KB
test-strings.c 7KB
test-promise.c 6KB
test-date-helpers.c 5KB
test-objects-foreach.c 5KB
test-abort.c 4KB
test-literal-storage.c 4KB
test-context-data.c 4KB
test-ext-module-canonical.c 3KB
test-api-value-type.c 3KB
test-api-property.c 3KB
test-exec-stop.c 3KB
test-regexp.c 3KB
test-heap.c 3KB
test-number-to-integer.c 3KB
test-has-property.c 3KB
test-ext-module-empty.c 3KB
test-lit-char-helpers.c 3KB
test-string-to-number.c 2KB
test-poolman.c 2KB
test-number-to-string.c 2KB
test-api-errortype.c 2KB
test-mem-stats.c 2KB
test-longjmp.c 2KB
test-ext-autorelease.c 2KB
my-custom-module.c 928B
my-broken-module.c 870B
test-common.h 2KB
test-common.h 1KB
object-literal.js 14KB
json-parse.js 9KB
date-setters.js 8KB
array.js 7KB
json-stringify.js 7KB
global-uri-coding.js 6KB
error.js 6KB
array-prototype-splice.js 5KB
number-prototype-to-string.js 5KB
for-in.js 5KB
regexp-capture-groups.js 5KB
object-assign.js 5KB
regexp-non-capture-groups.js 5KB
string-upper-lower-case-conversion.js 4KB
regexp-assertions.js 4KB
date-tostring.js 4KB
regexp-construct.js 4KB
string-prototype-lastindexof.js 4KB
regexp-character-class.js 4KB
typedArray-fill.js 4KB
labelled-statements.js 4KB
string-prototype-substring.js 4KB
class-inheritance-early-semantics.js 4KB
object-define-properties.js 4KB
string-prototype-split.js 4KB
class.js 4KB
string-prototype-substr.js 4KB
date-getters.js 4KB
string-prototype-replace.js 3KB
string-prototype-indexof.js 3KB
object-get-own-property-symbols.js 3KB
array-prototype-find.js 3KB
regression-test-issue-354.js 3KB
object-create.js 3KB
object-prototype-propertyisenumerable.js 3KB
array-prototype-slice.js 3KB
global-parsefloat.js 3KB
symbol.js 3KB
typedArray-find.js 3KB
array-prototype-map.js 3KB
function-prototype-bind.js 3KB
string-prototype-charat.js 3KB
string-prototype-charcodeat.js 3KB
array-prototype-unshift.js 3KB
date-parse.js 3KB
object-get-own-property-descriptor.js 3KB
function-construct.js 3KB
regression-test-issue-737.js 3KB
global-escaping.js 3KB
object_seal.js 3KB
regexp-simple-atom-and-iterations.js 3KB
object-keys.js 3KB
arguments.js 3KB
eval.js 3KB
string-prototype-match.js 3KB
class-inheritance-core-1.js 3KB
class-inheritance-builtin-array.js 3KB
global-parseint.js 3KB
typedArray-sort.js 2KB
arrow-function.js 2KB
regexp-routines.js 2KB
array-prototype-sort.js 2KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
lbaihao
- 粉丝: 573
- 资源: 121
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功