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

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

Issue 1884133002: [Interpreter] Add support for FunctionEntryHook. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make test stricter Created 4 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/ia32/builtins-ia32.cc ('k') | src/mips64/builtins-mips64.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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 // o a1: the JS function object being called. 942 // o a1: the JS function object being called.
943 // o a3: the new target 943 // o a3: the new target
944 // o cp: our context 944 // o cp: our context
945 // o fp: the caller's frame pointer 945 // o fp: the caller's frame pointer
946 // o sp: stack pointer 946 // o sp: stack pointer
947 // o ra: return address 947 // o ra: return address
948 // 948 //
949 // The function builds an interpreter frame. See InterpreterFrameConstants in 949 // The function builds an interpreter frame. See InterpreterFrameConstants in
950 // frames.h for its layout. 950 // frames.h for its layout.
951 void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { 951 void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
952 ProfileEntryHookStub::MaybeCallEntryHook(masm);
953
952 // Open a frame scope to indicate that there is a frame on the stack. The 954 // Open a frame scope to indicate that there is a frame on the stack. The
953 // MANUAL indicates that the scope shouldn't actually generate code to set up 955 // MANUAL indicates that the scope shouldn't actually generate code to set up
954 // the frame (that is done below). 956 // the frame (that is done below).
955 FrameScope frame_scope(masm, StackFrame::MANUAL); 957 FrameScope frame_scope(masm, StackFrame::MANUAL);
956 __ PushStandardFrame(a1); 958 __ PushStandardFrame(a1);
957 959
958 // Get the bytecode array from the function object and load the pointer to the 960 // Get the bytecode array from the function object and load the pointer to the
959 // first entry into kInterpreterBytecodeRegister. 961 // first entry into kInterpreterBytecodeRegister.
960 __ lw(a0, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); 962 __ lw(a0, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset));
961 Label load_debug_bytecode_array, bytecode_array_loaded; 963 Label load_debug_bytecode_array, bytecode_array_loaded;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 __ Branch(&loop_check); 1004 __ Branch(&loop_check);
1003 __ bind(&loop_header); 1005 __ bind(&loop_header);
1004 // TODO(rmcilroy): Consider doing more than one push per loop iteration. 1006 // TODO(rmcilroy): Consider doing more than one push per loop iteration.
1005 __ push(t1); 1007 __ push(t1);
1006 // Continue loop if not done. 1008 // Continue loop if not done.
1007 __ bind(&loop_check); 1009 __ bind(&loop_check);
1008 __ Subu(t0, t0, Operand(kPointerSize)); 1010 __ Subu(t0, t0, Operand(kPointerSize));
1009 __ Branch(&loop_header, ge, t0, Operand(zero_reg)); 1011 __ Branch(&loop_header, ge, t0, Operand(zero_reg));
1010 } 1012 }
1011 1013
1012 // TODO(rmcilroy): List of things not currently dealt with here but done in
1013 // fullcodegen's prologue:
1014 // - Call ProfileEntryHookStub when isolate has a function_entry_hook.
1015 // - Code aging of the BytecodeArray object.
1016
1017 // Load bytecode offset and dispatch table into registers. 1014 // Load bytecode offset and dispatch table into registers.
1018 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); 1015 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex);
1019 __ Addu(kInterpreterRegisterFileRegister, fp, 1016 __ Addu(kInterpreterRegisterFileRegister, fp,
1020 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); 1017 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp));
1021 __ li(kInterpreterBytecodeOffsetRegister, 1018 __ li(kInterpreterBytecodeOffsetRegister,
1022 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); 1019 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag));
1023 __ li(kInterpreterDispatchTableRegister, 1020 __ li(kInterpreterDispatchTableRegister,
1024 Operand(ExternalReference::interpreter_dispatch_table_address( 1021 Operand(ExternalReference::interpreter_dispatch_table_address(
1025 masm->isolate()))); 1022 masm->isolate())));
1026 1023
(...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after
2856 } 2853 }
2857 } 2854 }
2858 2855
2859 2856
2860 #undef __ 2857 #undef __
2861 2858
2862 } // namespace internal 2859 } // namespace internal
2863 } // namespace v8 2860 } // namespace v8
2864 2861
2865 #endif // V8_TARGET_ARCH_MIPS 2862 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698