Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1054)

Side by Side Diff: src/ia32/builtins-ia32.cc

Issue 1061263003: Fix missing SmiTag in failure path of r27614 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 // stack. 598 // stack.
599 __ mov(edx, eax); 599 __ mov(edx, eax);
600 int smi_tag = eax_is_tagged == kEaxIsSmiTagged ? kSmiTagSize : 0; 600 int smi_tag = eax_is_tagged == kEaxIsSmiTagged ? kSmiTagSize : 0;
601 __ shl(edx, kPointerSizeLog2 - smi_tag); 601 __ shl(edx, kPointerSizeLog2 - smi_tag);
602 // Check if the arguments will overflow the stack. 602 // Check if the arguments will overflow the stack.
603 __ cmp(ecx, edx); 603 __ cmp(ecx, edx);
604 __ j(greater, &okay); // Signed comparison. 604 __ j(greater, &okay); // Signed comparison.
605 605
606 // Out of stack space. 606 // Out of stack space.
607 __ push(Operand(ebp, calleeOffset)); // push this 607 __ push(Operand(ebp, calleeOffset)); // push this
608 if (eax_is_tagged == kEaxIsUntaggedInt) {
609 __ SmiTag(eax);
610 }
608 __ push(eax); 611 __ push(eax);
609 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION); 612 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION);
610 613
611 __ bind(&okay); 614 __ bind(&okay);
612 } 615 }
613 616
614 617
615 static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, 618 static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
616 bool is_construct) { 619 bool is_construct) {
617 ProfileEntryHookStub::MaybeCallEntryHook(masm); 620 ProfileEntryHookStub::MaybeCallEntryHook(masm);
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 1690
1688 __ bind(&ok); 1691 __ bind(&ok);
1689 __ ret(0); 1692 __ ret(0);
1690 } 1693 }
1691 1694
1692 #undef __ 1695 #undef __
1693 } 1696 }
1694 } // namespace v8::internal 1697 } // namespace v8::internal
1695 1698
1696 #endif // V8_TARGET_ARCH_IA32 1699 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698