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

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

Issue 1337883002: [builtins] Remove the weird STACK_OVERFLOW builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | src/arm64/builtins-arm64.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 #if V8_TARGET_ARCH_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 __ cmp(r2, Operand(argc, LSL, kPointerSizeLog2)); 761 __ cmp(r2, Operand(argc, LSL, kPointerSizeLog2));
762 } 762 }
763 __ b(gt, &okay); // Signed comparison. 763 __ b(gt, &okay); // Signed comparison.
764 764
765 // Out of stack space. 765 // Out of stack space.
766 __ ldr(r1, MemOperand(fp, calleeOffset)); 766 __ ldr(r1, MemOperand(fp, calleeOffset));
767 if (argc_is_tagged == kArgcIsUntaggedInt) { 767 if (argc_is_tagged == kArgcIsUntaggedInt) {
768 __ SmiTag(argc); 768 __ SmiTag(argc);
769 } 769 }
770 __ Push(r1, argc); 770 __ Push(r1, argc);
771 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); 771 __ CallRuntime(Runtime::kThrowStackOverflow, 0);
772 772
773 __ bind(&okay); 773 __ bind(&okay);
774 } 774 }
775 775
776 776
777 static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, 777 static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
778 bool is_construct) { 778 bool is_construct) {
779 // Called from Generate_JS_Entry 779 // Called from Generate_JS_Entry
780 // r0: code entry 780 // r0: code entry
781 // r1: function 781 // r1: function
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 // Load frame size from the BytecodeArray object. 913 // Load frame size from the BytecodeArray object.
914 __ ldr(r4, FieldMemOperand(kInterpreterBytecodeArrayRegister, 914 __ ldr(r4, FieldMemOperand(kInterpreterBytecodeArrayRegister,
915 BytecodeArray::kFrameSizeOffset)); 915 BytecodeArray::kFrameSizeOffset));
916 916
917 // Do a stack check to ensure we don't go over the limit. 917 // Do a stack check to ensure we don't go over the limit.
918 Label ok; 918 Label ok;
919 __ sub(r9, sp, Operand(r4)); 919 __ sub(r9, sp, Operand(r4));
920 __ LoadRoot(r2, Heap::kRealStackLimitRootIndex); 920 __ LoadRoot(r2, Heap::kRealStackLimitRootIndex);
921 __ cmp(r9, Operand(r2)); 921 __ cmp(r9, Operand(r2));
922 __ b(hs, &ok); 922 __ b(hs, &ok);
923 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); 923 __ CallRuntime(Runtime::kThrowStackOverflow, 0);
924 __ bind(&ok); 924 __ bind(&ok);
925 925
926 // If ok, push undefined as the initial value for all register file entries. 926 // If ok, push undefined as the initial value for all register file entries.
927 Label loop_header; 927 Label loop_header;
928 Label loop_check; 928 Label loop_check;
929 __ LoadRoot(r9, Heap::kUndefinedValueRootIndex); 929 __ LoadRoot(r9, Heap::kUndefinedValueRootIndex);
930 __ b(&loop_check, al); 930 __ b(&loop_check, al);
931 __ bind(&loop_header); 931 __ bind(&loop_header);
932 // TODO(rmcilroy): Consider doing more than one push per loop iteration. 932 // TODO(rmcilroy): Consider doing more than one push per loop iteration.
933 __ push(r9); 933 __ push(r9);
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 // ------------------------------------------- 1787 // -------------------------------------------
1788 // Dont adapt arguments. 1788 // Dont adapt arguments.
1789 // ------------------------------------------- 1789 // -------------------------------------------
1790 __ bind(&dont_adapt_arguments); 1790 __ bind(&dont_adapt_arguments);
1791 __ Jump(r3); 1791 __ Jump(r3);
1792 1792
1793 __ bind(&stack_overflow); 1793 __ bind(&stack_overflow);
1794 { 1794 {
1795 FrameScope frame(masm, StackFrame::MANUAL); 1795 FrameScope frame(masm, StackFrame::MANUAL);
1796 EnterArgumentsAdaptorFrame(masm); 1796 EnterArgumentsAdaptorFrame(masm);
1797 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); 1797 __ CallRuntime(Runtime::kThrowStackOverflow, 0);
1798 __ bkpt(0); 1798 __ bkpt(0);
1799 } 1799 }
1800 } 1800 }
1801 1801
1802 1802
1803 #undef __ 1803 #undef __
1804 1804
1805 } // namespace internal 1805 } // namespace internal
1806 } // namespace v8 1806 } // namespace v8
1807 1807
1808 #endif // V8_TARGET_ARCH_ARM 1808 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698