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

Side by Side Diff: src/mips64/builtins-mips64.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/mips/builtins-mips.cc ('k') | src/ppc/builtins-ppc.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
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 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 // o a1: the JS function object being called. 931 // o a1: the JS function object being called.
932 // o a3: the new target 932 // o a3: the new target
933 // o cp: our context 933 // o cp: our context
934 // o fp: the caller's frame pointer 934 // o fp: the caller's frame pointer
935 // o sp: stack pointer 935 // o sp: stack pointer
936 // o ra: return address 936 // o ra: return address
937 // 937 //
938 // The function builds an interpreter frame. See InterpreterFrameConstants in 938 // The function builds an interpreter frame. See InterpreterFrameConstants in
939 // frames.h for its layout. 939 // frames.h for its layout.
940 void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { 940 void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
941 ProfileEntryHookStub::MaybeCallEntryHook(masm);
942
941 // Open a frame scope to indicate that there is a frame on the stack. The 943 // Open a frame scope to indicate that there is a frame on the stack. The
942 // MANUAL indicates that the scope shouldn't actually generate code to set up 944 // MANUAL indicates that the scope shouldn't actually generate code to set up
943 // the frame (that is done below). 945 // the frame (that is done below).
944 FrameScope frame_scope(masm, StackFrame::MANUAL); 946 FrameScope frame_scope(masm, StackFrame::MANUAL);
945 __ PushStandardFrame(a1); 947 __ PushStandardFrame(a1);
946 948
947 // Get the bytecode array from the function object and load the pointer to the 949 // Get the bytecode array from the function object and load the pointer to the
948 // first entry into kInterpreterBytecodeRegister. 950 // first entry into kInterpreterBytecodeRegister.
949 __ ld(a0, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); 951 __ ld(a0, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset));
950 Label load_debug_bytecode_array, bytecode_array_loaded; 952 Label load_debug_bytecode_array, bytecode_array_loaded;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 __ Branch(&loop_check); 993 __ Branch(&loop_check);
992 __ bind(&loop_header); 994 __ bind(&loop_header);
993 // TODO(rmcilroy): Consider doing more than one push per loop iteration. 995 // TODO(rmcilroy): Consider doing more than one push per loop iteration.
994 __ push(a5); 996 __ push(a5);
995 // Continue loop if not done. 997 // Continue loop if not done.
996 __ bind(&loop_check); 998 __ bind(&loop_check);
997 __ Dsubu(a4, a4, Operand(kPointerSize)); 999 __ Dsubu(a4, a4, Operand(kPointerSize));
998 __ Branch(&loop_header, ge, a4, Operand(zero_reg)); 1000 __ Branch(&loop_header, ge, a4, Operand(zero_reg));
999 } 1001 }
1000 1002
1001 // TODO(rmcilroy): List of things not currently dealt with here but done in
1002 // fullcodegen's prologue:
1003 // - Call ProfileEntryHookStub when isolate has a function_entry_hook.
1004 // - Code aging of the BytecodeArray object.
1005
1006 // Load bytecode offset and dispatch table into registers. 1003 // Load bytecode offset and dispatch table into registers.
1007 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); 1004 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex);
1008 __ Daddu(kInterpreterRegisterFileRegister, fp, 1005 __ Daddu(kInterpreterRegisterFileRegister, fp,
1009 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); 1006 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp));
1010 __ li(kInterpreterBytecodeOffsetRegister, 1007 __ li(kInterpreterBytecodeOffsetRegister,
1011 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); 1008 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag));
1012 __ li(kInterpreterDispatchTableRegister, 1009 __ li(kInterpreterDispatchTableRegister,
1013 Operand(ExternalReference::interpreter_dispatch_table_address( 1010 Operand(ExternalReference::interpreter_dispatch_table_address(
1014 masm->isolate()))); 1011 masm->isolate())));
1015 1012
(...skipping 1830 matching lines...) Expand 10 before | Expand all | Expand 10 after
2846 } 2843 }
2847 } 2844 }
2848 2845
2849 2846
2850 #undef __ 2847 #undef __
2851 2848
2852 } // namespace internal 2849 } // namespace internal
2853 } // namespace v8 2850 } // namespace v8
2854 2851
2855 #endif // V8_TARGET_ARCH_MIPS64 2852 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/ppc/builtins-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698