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

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: 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
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 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1988 cons, 1988 cons,
1989 Handle<Object>(native_context()->initial_object_prototype(), isolate)); 1989 Handle<Object>(native_context()->initial_object_prototype(), isolate));
1990 cons->SetInstanceClassName(*name); 1990 cons->SetInstanceClassName(*name);
1991 Handle<JSObject> simd_object = factory->NewJSObject(cons, TENURED); 1991 Handle<JSObject> simd_object = factory->NewJSObject(cons, TENURED);
1992 DCHECK(simd_object->IsJSObject()); 1992 DCHECK(simd_object->IsJSObject());
1993 JSObject::AddProperty(global, name, simd_object, DONT_ENUM); 1993 JSObject::AddProperty(global, name, simd_object, DONT_ENUM);
1994 1994
1995 Handle<JSFunction> float32x4_function = 1995 Handle<JSFunction> float32x4_function =
1996 InstallFunction(simd_object, "Float32x4", JS_VALUE_TYPE, JSValue::kSize, 1996 InstallFunction(simd_object, "Float32x4", JS_VALUE_TYPE, JSValue::kSize,
1997 isolate->initial_object_prototype(), Builtins::kIllegal); 1997 isolate->initial_object_prototype(), Builtins::kIllegal);
1998 // Set the instance class name since InstallFunction only does this when 1998 native_context()->set_float32x4_function(*float32x4_function);
1999
2000 Handle<JSFunction> int32x4_function =
2001 InstallFunction(simd_object, "Int32x4", JS_VALUE_TYPE, JSValue::kSize,
2002 isolate->initial_object_prototype(), Builtins::kIllegal);
2003 native_context()->set_int32x4_function(*int32x4_function);
2004
2005 Handle<JSFunction> bool32x4_function =
2006 InstallFunction(simd_object, "Bool32x4", JS_VALUE_TYPE, JSValue::kSize,
2007 isolate->initial_object_prototype(), Builtins::kIllegal);
2008 native_context()->set_bool32x4_function(*bool32x4_function);
2009
2010 Handle<JSFunction> int16x8_function =
2011 InstallFunction(simd_object, "Int16x8", JS_VALUE_TYPE, JSValue::kSize,
2012 isolate->initial_object_prototype(), Builtins::kIllegal);
2013 native_context()->set_int16x8_function(*int16x8_function);
2014
2015 Handle<JSFunction> bool16x8_function =
2016 InstallFunction(simd_object, "Bool16x8", JS_VALUE_TYPE, JSValue::kSize,
2017 isolate->initial_object_prototype(), Builtins::kIllegal);
2018 native_context()->set_bool16x8_function(*bool16x8_function);
2019
2020 Handle<JSFunction> int8x16_function =
2021 InstallFunction(simd_object, "Int8x16", JS_VALUE_TYPE, JSValue::kSize,
2022 isolate->initial_object_prototype(), Builtins::kIllegal);
2023 native_context()->set_int8x16_function(*int8x16_function);
2024
2025 Handle<JSFunction> bool8x16_function =
2026 InstallFunction(simd_object, "Bool8x16", JS_VALUE_TYPE, JSValue::kSize,
2027 isolate->initial_object_prototype(), Builtins::kIllegal);
2028 native_context()->set_bool8x16_function(*bool8x16_function);
2029
2030 // Set the instance class names since InstallFunction only does this when
1999 // we install on the GlobalObject. 2031 // we install on the GlobalObject.
2000 float32x4_function->SetInstanceClassName(*factory->Float32x4_string()); 2032 float32x4_function->SetInstanceClassName(*factory->Float32x4_string());
2001 native_context()->set_float32x4_function(*float32x4_function); 2033 int32x4_function->SetInstanceClassName(*factory->Int32x4_string());
2034 bool32x4_function->SetInstanceClassName(*factory->Bool32x4_string());
2035 int16x8_function->SetInstanceClassName(*factory->Int16x8_string());
2036 bool16x8_function->SetInstanceClassName(*factory->Bool16x8_string());
2037 int8x16_function->SetInstanceClassName(*factory->Int8x16_string());
2038 bool8x16_function->SetInstanceClassName(*factory->Bool8x16_string());
2002 } 2039 }
2003 2040
2004 2041
2005 Handle<JSFunction> Genesis::InstallInternalArray(Handle<JSObject> target, 2042 Handle<JSFunction> Genesis::InstallInternalArray(Handle<JSObject> target,
2006 const char* name, 2043 const char* name,
2007 ElementsKind elements_kind) { 2044 ElementsKind elements_kind) {
2008 // --- I n t e r n a l A r r a y --- 2045 // --- I n t e r n a l A r r a y ---
2009 // An array constructor on the builtins object that works like 2046 // An array constructor on the builtins object that works like
2010 // the public Array constructor, except that its prototype 2047 // the public Array constructor, except that its prototype
2011 // doesn't inherit from Object.prototype. 2048 // doesn't inherit from Object.prototype.
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
3305 } 3342 }
3306 3343
3307 3344
3308 // Called when the top-level V8 mutex is destroyed. 3345 // Called when the top-level V8 mutex is destroyed.
3309 void Bootstrapper::FreeThreadResources() { 3346 void Bootstrapper::FreeThreadResources() {
3310 DCHECK(!IsActive()); 3347 DCHECK(!IsActive());
3311 } 3348 }
3312 3349
3313 } // namespace internal 3350 } // namespace internal
3314 } // namespace v8 3351 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/code-stubs.cc » ('j') | src/harmony-simd.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698