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

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: Make _IsSimdObject an assembly intrinsic in fullcodegen. Created 5 years, 5 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
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 5f2f9d3cd58010d086804aabb2b20921fe0a3231..fd5c3e2d0cf9249e6f187f1bb197a72eb39de5d9 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1992,13 +1992,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') | src/macros.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698