Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: src/bootstrapper.cc

Issue 1617503003: [Atomics] code stubs for atomic operations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove Context() Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2405 matching lines...) Expand 10 before | Expand all | Expand 10 after
2416 Builtins::kReflectSet, 3, false); 2416 Builtins::kReflectSet, 3, false);
2417 SimpleInstallFunction(reflect, factory->setPrototypeOf_string(), 2417 SimpleInstallFunction(reflect, factory->setPrototypeOf_string(),
2418 Builtins::kReflectSetPrototypeOf, 2, true); 2418 Builtins::kReflectSetPrototypeOf, 2, true);
2419 } 2419 }
2420 2420
2421 2421
2422 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { 2422 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() {
2423 if (!FLAG_harmony_sharedarraybuffer) return; 2423 if (!FLAG_harmony_sharedarraybuffer) return;
2424 2424
2425 Handle<JSGlobalObject> global(native_context()->global_object()); 2425 Handle<JSGlobalObject> global(native_context()->global_object());
2426 Isolate* isolate = global->GetIsolate();
2427 Factory* factory = isolate->factory();
2428
2426 Handle<JSFunction> shared_array_buffer_fun = 2429 Handle<JSFunction> shared_array_buffer_fun =
2427 InstallArrayBuffer(global, "SharedArrayBuffer"); 2430 InstallArrayBuffer(global, "SharedArrayBuffer");
2428 native_context()->set_shared_array_buffer_fun(*shared_array_buffer_fun); 2431 native_context()->set_shared_array_buffer_fun(*shared_array_buffer_fun);
2432
2433 Handle<String> name = factory->InternalizeUtf8String("Atomics");
2434 Handle<JSFunction> cons = factory->NewFunction(name);
2435 JSFunction::SetInstancePrototype(
2436 cons,
2437 Handle<Object>(native_context()->initial_object_prototype(), isolate));
2438 Handle<JSObject> atomics_object = factory->NewJSObject(cons, TENURED);
2439 DCHECK(atomics_object->IsJSObject());
2440 JSObject::AddProperty(global, name, atomics_object, DONT_ENUM);
2441
2442 SimpleInstallFunction(atomics_object, factory->InternalizeUtf8String("load"),
2443 Builtins::kAtomicsLoadCheck, 2, true);
2429 } 2444 }
2430 2445
2431 2446
2432 void Genesis::InitializeGlobal_harmony_simd() { 2447 void Genesis::InitializeGlobal_harmony_simd() {
2433 if (!FLAG_harmony_simd) return; 2448 if (!FLAG_harmony_simd) return;
2434 2449
2435 Handle<JSGlobalObject> global( 2450 Handle<JSGlobalObject> global(
2436 JSGlobalObject::cast(native_context()->global_object())); 2451 JSGlobalObject::cast(native_context()->global_object()));
2437 Isolate* isolate = global->GetIsolate(); 2452 Isolate* isolate = global->GetIsolate();
2438 Factory* factory = isolate->factory(); 2453 Factory* factory = isolate->factory();
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
3651 } 3666 }
3652 3667
3653 3668
3654 // Called when the top-level V8 mutex is destroyed. 3669 // Called when the top-level V8 mutex is destroyed.
3655 void Bootstrapper::FreeThreadResources() { 3670 void Bootstrapper::FreeThreadResources() {
3656 DCHECK(!IsActive()); 3671 DCHECK(!IsActive());
3657 } 3672 }
3658 3673
3659 } // namespace internal 3674 } // namespace internal
3660 } // namespace v8 3675 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | src/builtins.h » ('j') | src/builtins.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698