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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 838510000832229b37d7b8c1702b03501dcbf0b2..ea9edba4955b72051e81b4a3e738c08ce1e57150 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1991,13 +1991,16 @@ void Genesis::InitializeGlobal_harmony_simd() {
DCHECK(simd_object->IsJSObject());
JSObject::AddProperty(global, name, simd_object, DONT_ENUM);
- Handle<JSFunction> float32x4_function =
- InstallFunction(simd_object, "Float32x4", JS_VALUE_TYPE, JSValue::kSize,
- isolate->initial_object_prototype(), Builtins::kIllegal);
- // Set the instance class name since InstallFunction only does this when
- // we install on the GlobalObject.
- float32x4_function->SetInstanceClassName(*factory->Float32x4_string());
- native_context()->set_float32x4_function(*float32x4_function);
+// Install SIMD type functions. Set the instance class names since
+// InstallFunction only does this when we install on the GlobalObject.
+#define SIMD128_INSTALL_FUNCTION(name, type, lane_count, lane_type) \
+ Handle<JSFunction> type##_function = InstallFunction( \
+ simd_object, #name, JS_VALUE_TYPE, JSValue::kSize, \
+ isolate->initial_object_prototype(), Builtins::kIllegal); \
+ native_context()->set_##type##_function(*type##_function); \
+ type##_function->SetInstanceClassName(*factory->name##_string());
+
+ SIMD128_TYPES(SIMD128_INSTALL_FUNCTION)
}
« 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