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

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 cleanup Created 4 years, 8 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 2394 matching lines...) Expand 10 before | Expand all | Expand 10 after
2405 factory()->search_symbol()); 2405 factory()->search_symbol());
2406 InstallPublicSymbol(factory(), native_context(), "split", 2406 InstallPublicSymbol(factory(), native_context(), "split",
2407 factory()->split_symbol()); 2407 factory()->split_symbol());
2408 } 2408 }
2409 2409
2410 2410
2411 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { 2411 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() {
2412 if (!FLAG_harmony_sharedarraybuffer) return; 2412 if (!FLAG_harmony_sharedarraybuffer) return;
2413 2413
2414 Handle<JSGlobalObject> global(native_context()->global_object()); 2414 Handle<JSGlobalObject> global(native_context()->global_object());
2415 Isolate* isolate = global->GetIsolate();
2416 Factory* factory = isolate->factory();
2417
2415 Handle<JSFunction> shared_array_buffer_fun = 2418 Handle<JSFunction> shared_array_buffer_fun =
2416 InstallArrayBuffer(global, "SharedArrayBuffer"); 2419 InstallArrayBuffer(global, "SharedArrayBuffer");
2417 native_context()->set_shared_array_buffer_fun(*shared_array_buffer_fun); 2420 native_context()->set_shared_array_buffer_fun(*shared_array_buffer_fun);
2421
2422 Handle<String> name = factory->InternalizeUtf8String("Atomics");
2423 Handle<JSFunction> cons = factory->NewFunction(name);
2424 JSFunction::SetInstancePrototype(
2425 cons,
2426 Handle<Object>(native_context()->initial_object_prototype(), isolate));
2427 Handle<JSObject> atomics_object = factory->NewJSObject(cons, TENURED);
2428 DCHECK(atomics_object->IsJSObject());
2429 JSObject::AddProperty(global, name, atomics_object, DONT_ENUM);
2430
2431 SimpleInstallFunction(atomics_object, factory->InternalizeUtf8String("load"),
2432 Builtins::kAtomicsLoadCheck, 2, true);
2418 } 2433 }
2419 2434
2420 2435
2421 void Genesis::InitializeGlobal_harmony_simd() { 2436 void Genesis::InitializeGlobal_harmony_simd() {
2422 if (!FLAG_harmony_simd) return; 2437 if (!FLAG_harmony_simd) return;
2423 2438
2424 Handle<JSGlobalObject> global( 2439 Handle<JSGlobalObject> global(
2425 JSGlobalObject::cast(native_context()->global_object())); 2440 JSGlobalObject::cast(native_context()->global_object()));
2426 Isolate* isolate = global->GetIsolate(); 2441 Isolate* isolate = global->GetIsolate();
2427 Factory* factory = isolate->factory(); 2442 Factory* factory = isolate->factory();
(...skipping 1203 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

Powered by Google App Engine
This is Rietveld 408576698