Bug 1115387 - Create templateObject for SIMD constructors. r=jandem
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Fri, 02 Jan 2015 18:14:45 +0100
changeset 247717 404957f69d30309905310cfd404da965da5dd0a7
parent 247716 b4c70d12ab9195996504a91147abb90278a29490
child 247718 287d56de1d627facf137172dd0081286ba282845
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1115387
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1115387 - Create templateObject for SIMD constructors. r=jandem
js/src/jit/BaselineIC.cpp
--- a/js/src/jit/BaselineIC.cpp
+++ b/js/src/jit/BaselineIC.cpp
@@ -9116,16 +9116,25 @@ GetTemplateObjectForClassHook(JSContext 
         Rooted<TypeDescr *> descr(cx, &args.callee().as<TypeDescr>());
         JSObject *obj = TypedObject::createZeroed(cx, descr, 1, gc::TenuredHeap);
         if (!obj)
             return false;
         templateObject.set(obj);
         return true;
     }
 
+    if (hook == SimdTypeDescr::call) {
+        Rooted<SimdTypeDescr *> descr(cx, &args.callee().as<SimdTypeDescr>());
+        JSObject *obj = TypedObject::createZeroed(cx, descr, 0, gc::TenuredHeap);
+        if (!obj)
+            return false;
+        templateObject.set(obj);
+        return true;
+    }
+
     return true;
 }
 
 static bool
 IsOptimizableCallStringSplit(Value callee, Value thisv, int argc, Value *args)
 {
     if (argc != 1 || !thisv.isString() || !args[0].isString())
         return false;