Fix missing SmiTag in failure path of r27614
authorjkummerow <jkummerow@chromium.org>
Tue, 7 Apr 2015 12:47:39 +0000 (05:47 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 7 Apr 2015 12:47:46 +0000 (12:47 +0000)
BUG=chromium:469768
LOG=n

Review URL: https://codereview.chromium.org/1061263003

Cr-Commit-Position: refs/heads/master@{#27627}

src/arm/builtins-arm.cc
src/arm64/builtins-arm64.cc
src/ia32/builtins-ia32.cc
src/x64/builtins-x64.cc

index e14570c..f97b99f 100644 (file)
@@ -856,6 +856,9 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm,
 
   // Out of stack space.
   __ ldr(r1, MemOperand(fp, calleeOffset));
+  if (argc_is_tagged == kArgcIsUntaggedInt) {
+    __ SmiTag(argc);
+  }
   __ Push(r1, argc);
   __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION);
 
index 97ccf19..9a0c4a7 100644 (file)
@@ -828,6 +828,9 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm,
   __ B(gt, &enough_stack_space);
   // There is not enough stack space, so use a builtin to throw an appropriate
   // error.
+  if (argc_is_tagged == kArgcIsUntaggedInt) {
+    __ SmiTag(argc);
+  }
   __ Push(function, argc);
   __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION);
   // We should never return from the APPLY_OVERFLOW builtin.
index b4966ba..c778d5a 100644 (file)
@@ -605,6 +605,9 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm,
 
   // Out of stack space.
   __ push(Operand(ebp, calleeOffset));  // push this
+  if (eax_is_tagged == kEaxIsUntaggedInt) {
+    __ SmiTag(eax);
+  }
   __ push(eax);
   __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION);
 
index dbf2dc4..7c670d4 100644 (file)
@@ -606,6 +606,9 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm,
 
   // Out of stack space.
   __ Push(Operand(rbp, calleeOffset));
+  if (rax_is_tagged == kRaxIsUntaggedInt) {
+    __ Integer32ToSmi(rax, rax);
+  }
   __ Push(rax);
   __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION);