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 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1515 Accessors::StringLengthInfo(isolate, attribs)); | 1515 Accessors::StringLengthInfo(isolate, attribs)); |
1516 | 1516 |
1517 { // Add length. | 1517 { // Add length. |
1518 AccessorConstantDescriptor d(factory->length_string(), string_length, | 1518 AccessorConstantDescriptor d(factory->length_string(), string_length, |
1519 attribs); | 1519 attribs); |
1520 string_map->AppendDescriptor(&d); | 1520 string_map->AppendDescriptor(&d); |
1521 } | 1521 } |
1522 | 1522 |
1523 // Install the String.fromCharCode function. | 1523 // Install the String.fromCharCode function. |
1524 SimpleInstallFunction(string_fun, "fromCharCode", | 1524 SimpleInstallFunction(string_fun, "fromCharCode", |
1525 Builtins::kStringFromCharCode, 1, true); | 1525 Builtins::kStringFromCharCode, 1, false); |
1526 | 1526 |
1527 // Install the String.fromCodePoint function. | 1527 // Install the String.fromCodePoint function. |
1528 SimpleInstallFunction(string_fun, "fromCodePoint", | 1528 SimpleInstallFunction(string_fun, "fromCodePoint", |
1529 Builtins::kStringFromCodePoint, 1, false); | 1529 Builtins::kStringFromCodePoint, 1, false); |
1530 | 1530 |
1531 // Create the %StringPrototype% | 1531 // Create the %StringPrototype% |
1532 Handle<JSValue> prototype = | 1532 Handle<JSValue> prototype = |
1533 Handle<JSValue>::cast(factory->NewJSObject(string_fun, TENURED)); | 1533 Handle<JSValue>::cast(factory->NewJSObject(string_fun, TENURED)); |
1534 prototype->set_value(isolate->heap()->empty_string()); | 1534 prototype->set_value(isolate->heap()->empty_string()); |
1535 Accessors::FunctionSetPrototype(string_fun, prototype).Assert(); | 1535 Accessors::FunctionSetPrototype(string_fun, prototype).Assert(); |
(...skipping 3007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4543 } | 4543 } |
4544 | 4544 |
4545 | 4545 |
4546 // Called when the top-level V8 mutex is destroyed. | 4546 // Called when the top-level V8 mutex is destroyed. |
4547 void Bootstrapper::FreeThreadResources() { | 4547 void Bootstrapper::FreeThreadResources() { |
4548 DCHECK(!IsActive()); | 4548 DCHECK(!IsActive()); |
4549 } | 4549 } |
4550 | 4550 |
4551 } // namespace internal | 4551 } // namespace internal |
4552 } // namespace v8 | 4552 } // namespace v8 |
OLD | NEW |