| 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 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2411 Builtins::kReflectSet, 3, false); | 2411 Builtins::kReflectSet, 3, false); |
| 2412 SimpleInstallFunction(reflect, factory->setPrototypeOf_string(), | 2412 SimpleInstallFunction(reflect, factory->setPrototypeOf_string(), |
| 2413 Builtins::kReflectSetPrototypeOf, 2, true); | 2413 Builtins::kReflectSetPrototypeOf, 2, true); |
| 2414 } | 2414 } |
| 2415 | 2415 |
| 2416 | 2416 |
| 2417 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { | 2417 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { |
| 2418 if (!FLAG_harmony_sharedarraybuffer) return; | 2418 if (!FLAG_harmony_sharedarraybuffer) return; |
| 2419 | 2419 |
| 2420 Handle<JSGlobalObject> global(native_context()->global_object()); | 2420 Handle<JSGlobalObject> global(native_context()->global_object()); |
| 2421 Isolate* isolate = global->GetIsolate(); |
| 2422 Factory* factory = isolate->factory(); |
| 2423 |
| 2421 Handle<JSFunction> shared_array_buffer_fun = | 2424 Handle<JSFunction> shared_array_buffer_fun = |
| 2422 InstallArrayBuffer(global, "SharedArrayBuffer"); | 2425 InstallArrayBuffer(global, "SharedArrayBuffer"); |
| 2423 native_context()->set_shared_array_buffer_fun(*shared_array_buffer_fun); | 2426 native_context()->set_shared_array_buffer_fun(*shared_array_buffer_fun); |
| 2427 |
| 2428 Handle<String> name = factory->InternalizeUtf8String("Atomics"); |
| 2429 Handle<JSFunction> cons = factory->NewFunction(name); |
| 2430 JSFunction::SetInstancePrototype( |
| 2431 cons, |
| 2432 Handle<Object>(native_context()->initial_object_prototype(), isolate)); |
| 2433 Handle<JSObject> atomics_object = factory->NewJSObject(cons, TENURED); |
| 2434 DCHECK(atomics_object->IsJSObject()); |
| 2435 JSObject::AddProperty(global, name, atomics_object, DONT_ENUM); |
| 2436 |
| 2437 SimpleInstallFunction(atomics_object, factory->InternalizeUtf8String("load"), |
| 2438 Builtins::kAtomicsLoadCheck, 2, true); |
| 2424 } | 2439 } |
| 2425 | 2440 |
| 2426 | 2441 |
| 2427 void Genesis::InitializeGlobal_harmony_simd() { | 2442 void Genesis::InitializeGlobal_harmony_simd() { |
| 2428 if (!FLAG_harmony_simd) return; | 2443 if (!FLAG_harmony_simd) return; |
| 2429 | 2444 |
| 2430 Handle<JSGlobalObject> global( | 2445 Handle<JSGlobalObject> global( |
| 2431 JSGlobalObject::cast(native_context()->global_object())); | 2446 JSGlobalObject::cast(native_context()->global_object())); |
| 2432 Isolate* isolate = global->GetIsolate(); | 2447 Isolate* isolate = global->GetIsolate(); |
| 2433 Factory* factory = isolate->factory(); | 2448 Factory* factory = isolate->factory(); |
| (...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3631 } | 3646 } |
| 3632 | 3647 |
| 3633 | 3648 |
| 3634 // Called when the top-level V8 mutex is destroyed. | 3649 // Called when the top-level V8 mutex is destroyed. |
| 3635 void Bootstrapper::FreeThreadResources() { | 3650 void Bootstrapper::FreeThreadResources() { |
| 3636 DCHECK(!IsActive()); | 3651 DCHECK(!IsActive()); |
| 3637 } | 3652 } |
| 3638 | 3653 |
| 3639 } // namespace internal | 3654 } // namespace internal |
| 3640 } // namespace v8 | 3655 } // namespace v8 |
| OLD | NEW |