Bug 790479 - Remove a bogus assert, unused SNAPSHOT_MAX_STACK constant. r=djvj
authorJan de Mooij <jdemooij@mozilla.com>
Fri, 22 Mar 2013 19:47:55 +0100
changeset 125947 8e42c2f55b94e83df3fbaa93d1a62072275b098a
parent 125946 6cb8dceb3ffdf8a98dea755f4356f787d10574e5
child 125948 b4f1a45e51ea9775922b82f7ec1423f20c565897
push id24467
push userjdrew@mozilla.com
push dateSat, 23 Mar 2013 22:46:29 +0000
treeherdermozilla-central@0a10eca0c521 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdjvj
bugs790479
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 790479 - Remove a bogus assert, unused SNAPSHOT_MAX_STACK constant. r=djvj
js/src/ion/IonCode.h
js/src/ion/Snapshots.cpp
js/src/jit-test/tests/ion/bug790479.js
--- a/js/src/ion/IonCode.h
+++ b/js/src/ion/IonCode.h
@@ -23,19 +23,18 @@ class JSScript;
 namespace js {
 namespace ion {
 
 // The maximum size of any buffer associated with an assembler or code object.
 // This is chosen to not overflow a signed integer, leaving room for an extra
 // bit on offsets.
 static const uint32_t MAX_BUFFER_SIZE = (1 << 30) - 1;
 
-// Maximum number of scripted arg and stack slots.
+// Maximum number of scripted arg slots.
 static const uint32_t SNAPSHOT_MAX_NARGS = 127;
-static const uint32_t SNAPSHOT_MAX_STACK = 127;
 
 class MacroAssembler;
 class CodeOffsetLabel;
 
 class IonCode : public gc::Cell
 {
   protected:
     uint8_t *code_;
--- a/js/src/ion/Snapshots.cpp
+++ b/js/src/ion/Snapshots.cpp
@@ -295,17 +295,16 @@ SnapshotWriter::startSnapshot(uint32_t f
     writer_.writeUnsigned(bits);
     return lastStart_;
 }
 
 void
 SnapshotWriter::startFrame(JSFunction *fun, RawScript script, jsbytecode *pc, uint32_t exprStack)
 {
     JS_ASSERT(CountArgSlots(fun) < SNAPSHOT_MAX_NARGS);
-    JS_ASSERT(exprStack < SNAPSHOT_MAX_STACK);
 
     uint32_t formalArgs = CountArgSlots(fun);
 
     nslots_ = formalArgs + script->nfixed + exprStack;
     slotsWritten_ = 0;
 
     IonSpew(IonSpew_Snapshots, "Starting frame; formals %u, fixed %u, exprs %u",
             formalArgs, script->nfixed, exprStack);
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/ion/bug790479.js
@@ -0,0 +1,16 @@
+function f() {};
+function g() {
+    f(0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
+      0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
+      0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
+      0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
+      0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
+      0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
+      0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
+      0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
+      0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,
+      0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9);
+}
+g();
+g();
+g();