OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1365 { // Add length. | 1365 { // Add length. |
1366 AccessorConstantDescriptor d(factory->length_string(), string_length, | 1366 AccessorConstantDescriptor d(factory->length_string(), string_length, |
1367 attribs); | 1367 attribs); |
1368 string_map->AppendDescriptor(&d); | 1368 string_map->AppendDescriptor(&d); |
1369 } | 1369 } |
1370 | 1370 |
1371 // Install the String.fromCharCode function. | 1371 // Install the String.fromCharCode function. |
1372 SimpleInstallFunction(string_fun, "fromCharCode", | 1372 SimpleInstallFunction(string_fun, "fromCharCode", |
1373 Builtins::kStringFromCharCode, 1, true); | 1373 Builtins::kStringFromCharCode, 1, true); |
1374 | 1374 |
| 1375 // Install the String.fromCodePoint function. |
| 1376 SimpleInstallFunction(string_fun, "fromCodePoint", |
| 1377 Builtins::kStringFromCodePoint, 1, false); |
| 1378 |
1375 // Create the %StringPrototype% | 1379 // Create the %StringPrototype% |
1376 Handle<JSValue> prototype = | 1380 Handle<JSValue> prototype = |
1377 Handle<JSValue>::cast(factory->NewJSObject(string_fun, TENURED)); | 1381 Handle<JSValue>::cast(factory->NewJSObject(string_fun, TENURED)); |
1378 prototype->set_value(isolate->heap()->empty_string()); | 1382 prototype->set_value(isolate->heap()->empty_string()); |
1379 Accessors::FunctionSetPrototype(string_fun, prototype).Assert(); | 1383 Accessors::FunctionSetPrototype(string_fun, prototype).Assert(); |
1380 | 1384 |
1381 // Install the "constructor" property on the {prototype}. | 1385 // Install the "constructor" property on the {prototype}. |
1382 JSObject::AddProperty(prototype, factory->constructor_string(), string_fun, | 1386 JSObject::AddProperty(prototype, factory->constructor_string(), string_fun, |
1383 DONT_ENUM); | 1387 DONT_ENUM); |
1384 | 1388 |
(...skipping 2563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3948 } | 3952 } |
3949 | 3953 |
3950 | 3954 |
3951 // Called when the top-level V8 mutex is destroyed. | 3955 // Called when the top-level V8 mutex is destroyed. |
3952 void Bootstrapper::FreeThreadResources() { | 3956 void Bootstrapper::FreeThreadResources() { |
3953 DCHECK(!IsActive()); | 3957 DCHECK(!IsActive()); |
3954 } | 3958 } |
3955 | 3959 |
3956 } // namespace internal | 3960 } // namespace internal |
3957 } // namespace v8 | 3961 } // namespace v8 |
OLD | NEW |