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

Side by Side Diff: src/arm/builtins-arm.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 | « 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 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 // o r3: the new target 951 // o r3: the new target
952 // o cp: our context 952 // o cp: our context
953 // o pp: the caller's constant pool pointer (if enabled) 953 // o pp: the caller's constant pool pointer (if enabled)
954 // o fp: the caller's frame pointer 954 // o fp: the caller's frame pointer
955 // o sp: stack pointer 955 // o sp: stack pointer
956 // o lr: return address 956 // o lr: return address
957 // 957 //
958 // The function builds an interpreter frame. See InterpreterFrameConstants in 958 // The function builds an interpreter frame. See InterpreterFrameConstants in
959 // frames.h for its layout. 959 // frames.h for its layout.
960 void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { 960 void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
961 ProfileEntryHookStub::MaybeCallEntryHook(masm);
962
961 // Open a frame scope to indicate that there is a frame on the stack. The 963 // Open a frame scope to indicate that there is a frame on the stack. The
962 // MANUAL indicates that the scope shouldn't actually generate code to set up 964 // MANUAL indicates that the scope shouldn't actually generate code to set up
963 // the frame (that is done below). 965 // the frame (that is done below).
964 FrameScope frame_scope(masm, StackFrame::MANUAL); 966 FrameScope frame_scope(masm, StackFrame::MANUAL);
965 __ PushStandardFrame(r1); 967 __ PushStandardFrame(r1);
966 968
967 // Get the bytecode array from the function object and load the pointer to the 969 // Get the bytecode array from the function object and load the pointer to the
968 // first entry into kInterpreterBytecodeRegister. 970 // first entry into kInterpreterBytecodeRegister.
969 __ ldr(r0, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); 971 __ ldr(r0, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
970 Register debug_info = kInterpreterBytecodeArrayRegister; 972 Register debug_info = kInterpreterBytecodeArrayRegister;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 __ b(&loop_check, al); 1014 __ b(&loop_check, al);
1013 __ bind(&loop_header); 1015 __ bind(&loop_header);
1014 // TODO(rmcilroy): Consider doing more than one push per loop iteration. 1016 // TODO(rmcilroy): Consider doing more than one push per loop iteration.
1015 __ push(r9); 1017 __ push(r9);
1016 // Continue loop if not done. 1018 // Continue loop if not done.
1017 __ bind(&loop_check); 1019 __ bind(&loop_check);
1018 __ sub(r4, r4, Operand(kPointerSize), SetCC); 1020 __ sub(r4, r4, Operand(kPointerSize), SetCC);
1019 __ b(&loop_header, ge); 1021 __ b(&loop_header, ge);
1020 } 1022 }
1021 1023
1022 // TODO(rmcilroy): List of things not currently dealt with here but done in
1023 // fullcodegen's prologue:
1024 // - Call ProfileEntryHookStub when isolate has a function_entry_hook.
1025 // - Code aging of the BytecodeArray object.
1026
1027 // Load accumulator, register file, bytecode offset, dispatch table into 1024 // Load accumulator, register file, bytecode offset, dispatch table into
1028 // registers. 1025 // registers.
1029 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); 1026 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex);
1030 __ add(kInterpreterRegisterFileRegister, fp, 1027 __ add(kInterpreterRegisterFileRegister, fp,
1031 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); 1028 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp));
1032 __ mov(kInterpreterBytecodeOffsetRegister, 1029 __ mov(kInterpreterBytecodeOffsetRegister,
1033 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); 1030 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag));
1034 __ mov(kInterpreterDispatchTableRegister, 1031 __ mov(kInterpreterDispatchTableRegister,
1035 Operand(ExternalReference::interpreter_dispatch_table_address( 1032 Operand(ExternalReference::interpreter_dispatch_table_address(
1036 masm->isolate()))); 1033 masm->isolate())));
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2773 } 2770 }
2774 } 2771 }
2775 2772
2776 2773
2777 #undef __ 2774 #undef __
2778 2775
2779 } // namespace internal 2776 } // namespace internal
2780 } // namespace v8 2777 } // namespace v8
2781 2778
2782 #endif // V8_TARGET_ARCH_ARM 2779 #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