| OLD | NEW |
| 1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 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-generator.h" | 5 #include "src/interpreter/interpreter-generator.h" |
| 6 | 6 |
| 7 #include <array> | 7 #include <array> |
| 8 #include <tuple> | 8 #include <tuple> |
| 9 | 9 |
| 10 #include "src/builtins/builtins-arguments-gen.h" | 10 #include "src/builtins/builtins-arguments-gen.h" |
| (...skipping 3420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3431 Node* context = GetContext(); \ | 3431 Node* context = GetContext(); \ |
| 3432 Node* accumulator = GetAccumulator(); \ | 3432 Node* accumulator = GetAccumulator(); \ |
| 3433 Node* original_handler = \ | 3433 Node* original_handler = \ |
| 3434 CallRuntime(Runtime::kDebugBreakOnBytecode, context, accumulator); \ | 3434 CallRuntime(Runtime::kDebugBreakOnBytecode, context, accumulator); \ |
| 3435 MaybeDropFrames(context); \ | 3435 MaybeDropFrames(context); \ |
| 3436 DispatchToBytecodeHandler(original_handler); \ | 3436 DispatchToBytecodeHandler(original_handler); \ |
| 3437 } | 3437 } |
| 3438 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); | 3438 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); |
| 3439 #undef DEBUG_BREAK | 3439 #undef DEBUG_BREAK |
| 3440 | 3440 |
| 3441 // IncBlockCounter <slot> |
| 3442 // |
| 3443 // Increment the execution count for the given slot. Used for block code |
| 3444 // coverage. |
| 3445 IGNITION_HANDLER(IncBlockCounter, InterpreterAssembler) { |
| 3446 Node* closure = LoadRegister(Register::function_closure()); |
| 3447 Node* coverage_array_slot = BytecodeOperandIdxSmi(0); |
| 3448 Node* context = GetContext(); |
| 3449 |
| 3450 CallRuntime(Runtime::kIncBlockCounter, context, closure, coverage_array_slot); |
| 3451 |
| 3452 Dispatch(); |
| 3453 } |
| 3454 |
| 3441 class InterpreterForInPrepareAssembler : public InterpreterAssembler { | 3455 class InterpreterForInPrepareAssembler : public InterpreterAssembler { |
| 3442 public: | 3456 public: |
| 3443 InterpreterForInPrepareAssembler(CodeAssemblerState* state, Bytecode bytecode, | 3457 InterpreterForInPrepareAssembler(CodeAssemblerState* state, Bytecode bytecode, |
| 3444 OperandScale operand_scale) | 3458 OperandScale operand_scale) |
| 3445 : InterpreterAssembler(state, bytecode, operand_scale) {} | 3459 : InterpreterAssembler(state, bytecode, operand_scale) {} |
| 3446 | 3460 |
| 3447 void BuildForInPrepareResult(Node* output_register, Node* cache_type, | 3461 void BuildForInPrepareResult(Node* output_register, Node* cache_type, |
| 3448 Node* cache_array, Node* cache_length) { | 3462 Node* cache_array, Node* cache_length) { |
| 3449 StoreRegister(cache_type, output_register); | 3463 StoreRegister(cache_type, output_register); |
| 3450 output_register = NextRegister(output_register); | 3464 output_register = NextRegister(output_register); |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3738 code->Disassemble(Bytecodes::ToString(bytecode), os); | 3752 code->Disassemble(Bytecodes::ToString(bytecode), os); |
| 3739 os << std::flush; | 3753 os << std::flush; |
| 3740 } | 3754 } |
| 3741 #endif // ENABLE_DISASSEMBLER | 3755 #endif // ENABLE_DISASSEMBLER |
| 3742 return code; | 3756 return code; |
| 3743 } | 3757 } |
| 3744 | 3758 |
| 3745 } // namespace interpreter | 3759 } // namespace interpreter |
| 3746 } // namespace internal | 3760 } // namespace internal |
| 3747 } // namespace v8 | 3761 } // namespace v8 |
| OLD | NEW |