OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/interpreter/interpreter-assembler.h" | 5 #include "src/interpreter/interpreter-assembler.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <ostream> | 8 #include <ostream> |
9 | 9 |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 accumulator_use_(AccumulatorUse::kNone), | 35 accumulator_use_(AccumulatorUse::kNone), |
36 made_call_(false), | 36 made_call_(false), |
37 disable_stack_check_across_call_(false), | 37 disable_stack_check_across_call_(false), |
38 stack_pointer_before_call_(nullptr) { | 38 stack_pointer_before_call_(nullptr) { |
39 accumulator_.Bind(Parameter(InterpreterDispatchDescriptor::kAccumulator)); | 39 accumulator_.Bind(Parameter(InterpreterDispatchDescriptor::kAccumulator)); |
40 bytecode_offset_.Bind( | 40 bytecode_offset_.Bind( |
41 Parameter(InterpreterDispatchDescriptor::kBytecodeOffset)); | 41 Parameter(InterpreterDispatchDescriptor::kBytecodeOffset)); |
42 if (FLAG_trace_ignition) { | 42 if (FLAG_trace_ignition) { |
43 TraceBytecode(Runtime::kInterpreterTraceBytecodeEntry); | 43 TraceBytecode(Runtime::kInterpreterTraceBytecodeEntry); |
44 } | 44 } |
| 45 RegisterCallGenerationCallbacks([this] { CallPrologue(); }, |
| 46 [this] { CallEpilogue(); }); |
45 } | 47 } |
46 | 48 |
47 InterpreterAssembler::~InterpreterAssembler() { | 49 InterpreterAssembler::~InterpreterAssembler() { |
48 // If the following check fails the handler does not use the | 50 // If the following check fails the handler does not use the |
49 // accumulator in the way described in the bytecode definitions in | 51 // accumulator in the way described in the bytecode definitions in |
50 // bytecodes.h. | 52 // bytecodes.h. |
51 DCHECK_EQ(accumulator_use_, Bytecodes::GetAccumulatorUse(bytecode_)); | 53 DCHECK_EQ(accumulator_use_, Bytecodes::GetAccumulatorUse(bytecode_)); |
| 54 UnregisterCallGenerationCallbacks(); |
52 } | 55 } |
53 | 56 |
54 Node* InterpreterAssembler::GetInterpretedFramePointer() { | 57 Node* InterpreterAssembler::GetInterpretedFramePointer() { |
55 if (!interpreted_frame_pointer_.IsBound()) { | 58 if (!interpreted_frame_pointer_.IsBound()) { |
56 interpreted_frame_pointer_.Bind(LoadParentFramePointer()); | 59 interpreted_frame_pointer_.Bind(LoadParentFramePointer()); |
57 } | 60 } |
58 return interpreted_frame_pointer_.value(); | 61 return interpreted_frame_pointer_.value(); |
59 } | 62 } |
60 | 63 |
61 Node* InterpreterAssembler::GetAccumulatorUnchecked() { | 64 Node* InterpreterAssembler::GetAccumulatorUnchecked() { |
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1301 Goto(&loop); | 1304 Goto(&loop); |
1302 } | 1305 } |
1303 Bind(&done_loop); | 1306 Bind(&done_loop); |
1304 | 1307 |
1305 return array; | 1308 return array; |
1306 } | 1309 } |
1307 | 1310 |
1308 } // namespace interpreter | 1311 } // namespace interpreter |
1309 } // namespace internal | 1312 } // namespace internal |
1310 } // namespace v8 | 1313 } // namespace v8 |
OLD | NEW |