Bug 840696 part 1 - Enable GetElem IC if typed arrays & arrays are mix-up. r=dvander
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Tue, 19 Feb 2013 16:35:04 -0800
changeset 122427 c29100ac6809773ce9a8709e2e365c18fcc8a74d
parent 122405 1bcc3c56b011fe85db8b70641cf4f13da3c93547
child 122428 f84b3c01089e133ef16ee03fde2d5a929c3355d3
push id24342
push userryanvm@gmail.com
push dateThu, 21 Feb 2013 13:05:06 +0000
treeherdermozilla-central@702d2814efbf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs840696
milestone22.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 840696 part 1 - Enable GetElem IC if typed arrays & arrays are mix-up. r=dvander
js/src/jsinterpinlines.h
--- a/js/src/jsinterpinlines.h
+++ b/js/src/jsinterpinlines.h
@@ -743,17 +743,17 @@ GetObjectElementOperation(JSContext *cx,
                           HandleValue rref, MutableHandleValue res)
 {
     do {
         // Don't call GetPcScript (needed for analysis) from inside Ion since it's expensive.
         bool analyze = !cx->fp()->beginsIonActivation();
 
         uint32_t index;
         if (IsDefinitelyIndex(rref, &index)) {
-            if (analyze && !objArg->isNative()) {
+            if (analyze && !objArg->isNative() && !objArg->isTypedArray()) {
                 JSScript *script = NULL;
                 jsbytecode *pc = NULL;
                 types::TypeScript::GetPcScript(cx, &script, &pc);
 
                 if (script->hasAnalysis())
                     script->analysis()->getCode(pc).nonNativeGetElement = true;
             }
 
@@ -770,17 +770,17 @@ GetObjectElementOperation(JSContext *cx,
         if (analyze) {
             JSScript *script = NULL;
             jsbytecode *pc = NULL;
             types::TypeScript::GetPcScript(cx, &script, &pc);
 
             if (script->hasAnalysis()) {
                 script->analysis()->getCode(pc).getStringElement = true;
 
-                if (!objArg->isArray() && !objArg->isNative())
+                if (!objArg->isArray() && !objArg->isNative() && !objArg->isTypedArray())
                     script->analysis()->getCode(pc).nonNativeGetElement = true;
             }
         }
 
         if (ValueMightBeSpecial(rref)) {
             RootedObject obj(cx, objArg);
             Rooted<SpecialId> special(cx);
             res.set(rref);