Chromium Code Reviews| 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 3125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3136 Node* context = GetContext(); \ | 3136 Node* context = GetContext(); \ |
| 3137 Node* accumulator = GetAccumulator(); \ | 3137 Node* accumulator = GetAccumulator(); \ |
| 3138 Node* original_handler = \ | 3138 Node* original_handler = \ |
| 3139 CallRuntime(Runtime::kDebugBreakOnBytecode, context, accumulator); \ | 3139 CallRuntime(Runtime::kDebugBreakOnBytecode, context, accumulator); \ |
| 3140 MaybeDropFrames(context); \ | 3140 MaybeDropFrames(context); \ |
| 3141 DispatchToBytecodeHandler(original_handler); \ | 3141 DispatchToBytecodeHandler(original_handler); \ |
| 3142 } | 3142 } |
| 3143 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); | 3143 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); |
| 3144 #undef DEBUG_BREAK | 3144 #undef DEBUG_BREAK |
| 3145 | 3145 |
| 3146 // IncBlockCounter <slot> | |
| 3147 // | |
| 3148 // Increment the execution count for the given slot. Used for block code | |
| 3149 // coverage. | |
| 3150 IGNITION_HANDLER(IncBlockCounter, InterpreterAssembler) { | |
| 3151 Node* feedback_vector = LoadFeedbackVector(); | |
| 3152 Node* slot = BytecodeOperandImmSmi(0); | |
|
rmcilroy
2017/05/18 14:17:59
nit - slot -> coverage_array_slot (to avoid confus
jgruber
2017/05/22 09:43:32
Done.
| |
| 3153 Node* context = GetContext(); | |
| 3154 | |
| 3155 CallRuntime(Runtime::kIncBlockCounter, context, feedback_vector, slot); | |
| 3156 | |
| 3157 Dispatch(); | |
| 3158 } | |
| 3159 | |
| 3146 class InterpreterForInPrepareAssembler : public InterpreterAssembler { | 3160 class InterpreterForInPrepareAssembler : public InterpreterAssembler { |
| 3147 public: | 3161 public: |
| 3148 InterpreterForInPrepareAssembler(CodeAssemblerState* state, Bytecode bytecode, | 3162 InterpreterForInPrepareAssembler(CodeAssemblerState* state, Bytecode bytecode, |
| 3149 OperandScale operand_scale) | 3163 OperandScale operand_scale) |
| 3150 : InterpreterAssembler(state, bytecode, operand_scale) {} | 3164 : InterpreterAssembler(state, bytecode, operand_scale) {} |
| 3151 | 3165 |
| 3152 void BuildForInPrepareResult(Node* output_register, Node* cache_type, | 3166 void BuildForInPrepareResult(Node* output_register, Node* cache_type, |
| 3153 Node* cache_array, Node* cache_length) { | 3167 Node* cache_array, Node* cache_length) { |
| 3154 StoreRegister(cache_type, output_register); | 3168 StoreRegister(cache_type, output_register); |
| 3155 output_register = NextRegister(output_register); | 3169 output_register = NextRegister(output_register); |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3443 code->Disassemble(Bytecodes::ToString(bytecode), os); | 3457 code->Disassemble(Bytecodes::ToString(bytecode), os); |
| 3444 os << std::flush; | 3458 os << std::flush; |
| 3445 } | 3459 } |
| 3446 #endif // ENABLE_DISASSEMBLER | 3460 #endif // ENABLE_DISASSEMBLER |
| 3447 return code; | 3461 return code; |
| 3448 } | 3462 } |
| 3449 | 3463 |
| 3450 } // namespace interpreter | 3464 } // namespace interpreter |
| 3451 } // namespace internal | 3465 } // namespace internal |
| 3452 } // namespace v8 | 3466 } // namespace v8 |
| OLD | NEW |