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

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: more WIP on using CodeStubAssembler 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 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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