| 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/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/extensions/externalize-string-extension.h" | 10 #include "src/extensions/externalize-string-extension.h" |
| (...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 Accessors::StringLengthInfo(isolate, attribs)); | 1316 Accessors::StringLengthInfo(isolate, attribs)); |
| 1317 | 1317 |
| 1318 { // Add length. | 1318 { // Add length. |
| 1319 AccessorConstantDescriptor d(factory->length_string(), string_length, | 1319 AccessorConstantDescriptor d(factory->length_string(), string_length, |
| 1320 attribs); | 1320 attribs); |
| 1321 string_map->AppendDescriptor(&d); | 1321 string_map->AppendDescriptor(&d); |
| 1322 } | 1322 } |
| 1323 | 1323 |
| 1324 // Install the String.fromCharCode function. | 1324 // Install the String.fromCharCode function. |
| 1325 SimpleInstallFunction(string_fun, "fromCharCode", | 1325 SimpleInstallFunction(string_fun, "fromCharCode", |
| 1326 Builtins::kStringFromCharCode, 1, false); | 1326 Builtins::kStringFromCharCode, 1, true); |
| 1327 | 1327 |
| 1328 // Create the %StringPrototype% | 1328 // Create the %StringPrototype% |
| 1329 Handle<JSValue> prototype = | 1329 Handle<JSValue> prototype = |
| 1330 Handle<JSValue>::cast(factory->NewJSObject(string_fun, TENURED)); | 1330 Handle<JSValue>::cast(factory->NewJSObject(string_fun, TENURED)); |
| 1331 prototype->set_value(isolate->heap()->empty_string()); | 1331 prototype->set_value(isolate->heap()->empty_string()); |
| 1332 Accessors::FunctionSetPrototype(string_fun, prototype).Assert(); | 1332 Accessors::FunctionSetPrototype(string_fun, prototype).Assert(); |
| 1333 | 1333 |
| 1334 // Install the "constructor" property on the {prototype}. | 1334 // Install the "constructor" property on the {prototype}. |
| 1335 JSObject::AddProperty(prototype, factory->constructor_string(), string_fun, | 1335 JSObject::AddProperty(prototype, factory->constructor_string(), string_fun, |
| 1336 DONT_ENUM); | 1336 DONT_ENUM); |
| (...skipping 2458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3795 } | 3795 } |
| 3796 | 3796 |
| 3797 | 3797 |
| 3798 // Called when the top-level V8 mutex is destroyed. | 3798 // Called when the top-level V8 mutex is destroyed. |
| 3799 void Bootstrapper::FreeThreadResources() { | 3799 void Bootstrapper::FreeThreadResources() { |
| 3800 DCHECK(!IsActive()); | 3800 DCHECK(!IsActive()); |
| 3801 } | 3801 } |
| 3802 | 3802 |
| 3803 } // namespace internal | 3803 } // namespace internal |
| 3804 } // namespace v8 | 3804 } // namespace v8 |
| OLD | NEW |