| OLD | NEW |
| (Empty) |
| 1 # ECMAScript 402 | |
| 2 | |
| 3 V8 optionally implements the [ECMAScript 402](http://www.ecma-international.org/
ecma-402/1.0/) API. The API is enabled by default, but can be turned off at comp
ile time. | |
| 4 | |
| 5 | |
| 6 ## Prerequisites | |
| 7 | |
| 8 The i18n implementation adds a dependency on ICU. If you run | |
| 9 | |
| 10 ``` | |
| 11 make dependencies | |
| 12 ``` | |
| 13 | |
| 14 a suitable version of ICU is checked out into `third_party/icu`. | |
| 15 | |
| 16 | |
| 17 ### Alternative ICU checkout | |
| 18 | |
| 19 You can check out the ICU sources at a different location and define the gyp var
iable `icu_gyp_path` to point at the `icu.gyp` file. | |
| 20 | |
| 21 | |
| 22 ### System ICU | |
| 23 | |
| 24 Last but not least, you can compile V8 against a version of ICU installed in you
r system. To do so, specify the gyp variable `use_system_icu=1`. If you also hav
e `want_separate_host_toolset` enabled, the bundled ICU will still be compiled t
o generate the V8 snapshot. The system ICU will only be used for the target arch
itecture. | |
| 25 | |
| 26 | |
| 27 ## Embedding V8 | |
| 28 | |
| 29 If you embed V8 in your application, but your application itself doesn't use ICU
, you will need to initialize ICU before calling into V8 by executing: | |
| 30 | |
| 31 ``` | |
| 32 v8::V8::InitializeICU(); | |
| 33 ``` | |
| 34 | |
| 35 It is safe to invoke this method if ICU was not compiled in, then it does nothin
g. | |
| 36 | |
| 37 | |
| 38 ## Compiling without i18n support | |
| 39 | |
| 40 To build V8 without i18n support use | |
| 41 | |
| 42 ``` | |
| 43 make i18nsupport=off native | |
| 44 ``` | |
| OLD | NEW |