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/compiler/bytecode-graph-builder.h" | 5 #include "src/compiler/bytecode-graph-builder.h" |
6 | 6 |
7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/compiler/access-builder.h" | 9 #include "src/compiler/access-builder.h" |
10 #include "src/compiler/compiler-source-position-table.h" | 10 #include "src/compiler/compiler-source-position-table.h" |
(...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2210 Node* call = NewNode(javascript()->Debugger()); | 2210 Node* call = NewNode(javascript()->Debugger()); |
2211 environment()->RecordAfterState(call, Environment::kAttachFrameState); | 2211 environment()->RecordAfterState(call, Environment::kAttachFrameState); |
2212 } | 2212 } |
2213 | 2213 |
2214 // We cannot create a graph from the debugger copy of the bytecode array. | 2214 // We cannot create a graph from the debugger copy of the bytecode array. |
2215 #define DEBUG_BREAK(Name, ...) \ | 2215 #define DEBUG_BREAK(Name, ...) \ |
2216 void BytecodeGraphBuilder::Visit##Name() { UNREACHABLE(); } | 2216 void BytecodeGraphBuilder::Visit##Name() { UNREACHABLE(); } |
2217 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); | 2217 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); |
2218 #undef DEBUG_BREAK | 2218 #undef DEBUG_BREAK |
2219 | 2219 |
2220 void BytecodeGraphBuilder::VisitIncBlockCounter() { | |
2221 DCHECK(FLAG_block_coverage); | |
2222 | |
2223 PrepareEagerCheckpoint(); | |
rmcilroy
2017/05/18 14:17:59
I don't think you would need a Checkpoint for this
jgruber
2017/05/22 09:43:32
Done.
| |
2224 | |
2225 Node* slot = jsgraph()->Constant(bytecode_iterator().GetImmediateOperand(0)); | |
2226 Node* vector = jsgraph()->Constant(feedback_vector()); | |
2227 | |
2228 const Operator* op = javascript()->CallRuntime(Runtime::kIncBlockCounter); | |
2229 | |
2230 Node* node = NewNode(op, vector, slot); | |
2231 environment()->RecordAfterState(node, Environment::kAttachFrameState); | |
2232 } | |
2233 | |
2220 void BytecodeGraphBuilder::VisitForInPrepare() { | 2234 void BytecodeGraphBuilder::VisitForInPrepare() { |
2221 PrepareEagerCheckpoint(); | 2235 PrepareEagerCheckpoint(); |
2222 Node* receiver = | 2236 Node* receiver = |
2223 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); | 2237 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
2224 Node* prepare = NewNode(javascript()->ForInPrepare(), receiver); | 2238 Node* prepare = NewNode(javascript()->ForInPrepare(), receiver); |
2225 environment()->BindRegistersToProjections( | 2239 environment()->BindRegistersToProjections( |
2226 bytecode_iterator().GetRegisterOperand(1), prepare, | 2240 bytecode_iterator().GetRegisterOperand(1), prepare, |
2227 Environment::kAttachFrameState); | 2241 Environment::kAttachFrameState); |
2228 } | 2242 } |
2229 | 2243 |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2826 it->source_position().ScriptOffset(), start_position_.InliningId())); | 2840 it->source_position().ScriptOffset(), start_position_.InliningId())); |
2827 it->Advance(); | 2841 it->Advance(); |
2828 } else { | 2842 } else { |
2829 DCHECK_GT(it->code_offset(), offset); | 2843 DCHECK_GT(it->code_offset(), offset); |
2830 } | 2844 } |
2831 } | 2845 } |
2832 | 2846 |
2833 } // namespace compiler | 2847 } // namespace compiler |
2834 } // namespace internal | 2848 } // namespace internal |
2835 } // namespace v8 | 2849 } // namespace v8 |
OLD | NEW |