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

Side by Side Diff: src/bootstrapper.cc

Issue 1250733005: SIMD.js Add the other SIMD Phase 1 types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't run downloaded SIMD value type tests. Created 5 years, 4 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
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/base/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1984 Handle<String> name = factory->InternalizeUtf8String("SIMD"); 1984 Handle<String> name = factory->InternalizeUtf8String("SIMD");
1985 Handle<JSFunction> cons = factory->NewFunction(name); 1985 Handle<JSFunction> cons = factory->NewFunction(name);
1986 JSFunction::SetInstancePrototype( 1986 JSFunction::SetInstancePrototype(
1987 cons, 1987 cons,
1988 Handle<Object>(native_context()->initial_object_prototype(), isolate)); 1988 Handle<Object>(native_context()->initial_object_prototype(), isolate));
1989 cons->SetInstanceClassName(*name); 1989 cons->SetInstanceClassName(*name);
1990 Handle<JSObject> simd_object = factory->NewJSObject(cons, TENURED); 1990 Handle<JSObject> simd_object = factory->NewJSObject(cons, TENURED);
1991 DCHECK(simd_object->IsJSObject()); 1991 DCHECK(simd_object->IsJSObject());
1992 JSObject::AddProperty(global, name, simd_object, DONT_ENUM); 1992 JSObject::AddProperty(global, name, simd_object, DONT_ENUM);
1993 1993
1994 Handle<JSFunction> float32x4_function = 1994 // Install SIMD type functions. Set the instance class names since
1995 InstallFunction(simd_object, "Float32x4", JS_VALUE_TYPE, JSValue::kSize, 1995 // InstallFunction only does this when we install on the GlobalObject.
1996 isolate->initial_object_prototype(), Builtins::kIllegal); 1996 #define SIMD128_INSTALL_FUNCTION(name, type, lane_count, lane_type) \
1997 // Set the instance class name since InstallFunction only does this when 1997 Handle<JSFunction> type##_function = InstallFunction( \
1998 // we install on the GlobalObject. 1998 simd_object, #name, JS_VALUE_TYPE, JSValue::kSize, \
1999 float32x4_function->SetInstanceClassName(*factory->Float32x4_string()); 1999 isolate->initial_object_prototype(), Builtins::kIllegal); \
2000 native_context()->set_float32x4_function(*float32x4_function); 2000 native_context()->set_##type##_function(*type##_function); \
2001 type##_function->SetInstanceClassName(*factory->name##_string());
2002
2003 SIMD128_TYPES(SIMD128_INSTALL_FUNCTION)
2001 } 2004 }
2002 2005
2003 2006
2004 Handle<JSFunction> Genesis::InstallInternalArray(Handle<JSObject> target, 2007 Handle<JSFunction> Genesis::InstallInternalArray(Handle<JSObject> target,
2005 const char* name, 2008 const char* name,
2006 ElementsKind elements_kind) { 2009 ElementsKind elements_kind) {
2007 // --- I n t e r n a l A r r a y --- 2010 // --- I n t e r n a l A r r a y ---
2008 // An array constructor on the builtins object that works like 2011 // An array constructor on the builtins object that works like
2009 // the public Array constructor, except that its prototype 2012 // the public Array constructor, except that its prototype
2010 // doesn't inherit from Object.prototype. 2013 // doesn't inherit from Object.prototype.
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
3304 } 3307 }
3305 3308
3306 3309
3307 // Called when the top-level V8 mutex is destroyed. 3310 // Called when the top-level V8 mutex is destroyed.
3308 void Bootstrapper::FreeThreadResources() { 3311 void Bootstrapper::FreeThreadResources() {
3309 DCHECK(!IsActive()); 3312 DCHECK(!IsActive());
3310 } 3313 }
3311 3314
3312 } // namespace internal 3315 } // namespace internal
3313 } // namespace v8 3316 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698