Bug 958882 - Add script size limit for TI new-script analysis. r=djvj, a=bajaj
☠☠ backed out by 34d00da42eef ☠ ☠
authorJan de Mooij <jdemooij@mozilla.com>
Tue, 14 Jan 2014 10:26:46 +0100
changeset 167918 5a8f426588b9881cef05e9a4e1f887d78c2a56c8
parent 167917 4cc7086ff4255b5d1945a6363eeac1e41c088596
child 167919 e0d3bdbe602b344b872c75a89344a9e9aa9bd60e
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdjvj, bajaj
bugs958882
milestone27.0
Bug 958882 - Add script size limit for TI new-script analysis. r=djvj, a=bajaj
js/src/jit/IonAnalysis.cpp
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -2069,16 +2069,20 @@ jit::AnalyzeNewScriptProperties(JSContex
     if (fun->isInterpretedLazy() && !fun->getOrCreateScript(cx))
         return false;
 
     RootedScript script(cx, fun->nonLazyScript());
 
     if (!script->compileAndGo || !script->canBaselineCompile())
         return true;
 
+    static const uint32_t MAX_SCRIPT_SIZE = 2000;
+    if (script->length() > MAX_SCRIPT_SIZE)
+        return true;
+
     Vector<PropertyName *> accessedProperties(cx);
 
     LifoAlloc alloc(types::TypeZone::TYPE_LIFO_ALLOC_PRIMARY_CHUNK_SIZE);
 
     TempAllocator temp(&alloc);
     IonContext ictx(cx, &temp);
 
     types::AutoEnterAnalysis enter(cx);