Whoops, include all of last patch.
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Feb 2014 23:36:23 +0000 (23:36 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Feb 2014 23:36:23 +0000 (23:36 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164836 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jit/JITCall32_64.cpp

index 05ccb7a..4f6de71 100644 (file)
@@ -1,5 +1,12 @@
 2014-02-27  Oliver Hunt  <oliver@apple.com>
 
+        Whoops, include all of last patch.
+
+        * jit/JITCall32_64.cpp:
+        (JSC::JIT::compileLoadVarargs):
+
+2014-02-27  Oliver Hunt  <oliver@apple.com>
+
         Slow cases for function.apply and function.call should not require vm re-entry
         https://bugs.webkit.org/show_bug.cgi?id=129454
 
index 3799cbe..43bd2ef 100644 (file)
@@ -143,8 +143,14 @@ void JIT::compileLoadVarargs(Instruction* instruction)
         slowCase.append(branch32(NotEqual, regT1, TrustedImm32(JSValue::EmptyValueTag)));
 
         load32(payloadFor(JSStack::ArgumentCount), regT2);
-        if (firstVarArgOffset)
-            sub32(TrustedImm32(firstVarArgOffset), regT2);
+        if (firstVarArgOffset) {
+            Jump sufficientArguments = branch32(GreaterThan, regT0, TrustedImm32(firstVarArgOffset + 1));
+            move(TrustedImm32(1), regT0);
+            Jump endVarArgs = jump();
+            sufficientArguments.link(this);
+            sub32(TrustedImm32(firstVarArgOffset), regT0);
+            endVarArgs.link(this);
+        }
         slowCase.append(branch32(Above, regT2, TrustedImm32(Arguments::MaxArguments + 1)));
         // regT2: argumentCountIncludingThis