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

Side by Side Diff: src/compiler/bytecode-graph-builder.cc

Issue 1703453002: [interpreter, debugger] support debug breaks via bytecode array copy (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/debug/debug.h » ('j') | src/debug/debug.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/compiler/bytecode-branch-analysis.h" 7 #include "src/compiler/bytecode-branch-analysis.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/operator-properties.h" 9 #include "src/compiler/operator-properties.h"
10 #include "src/interpreter/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
(...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 MergeControlToLeaveFunction(control); 1473 MergeControlToLeaveFunction(control);
1474 } 1474 }
1475 1475
1476 void BytecodeGraphBuilder::VisitDebugger() { 1476 void BytecodeGraphBuilder::VisitDebugger() {
1477 FrameStateBeforeAndAfter states(this); 1477 FrameStateBeforeAndAfter states(this);
1478 Node* call = 1478 Node* call =
1479 NewNode(javascript()->CallRuntime(Runtime::kHandleDebuggerStatement)); 1479 NewNode(javascript()->CallRuntime(Runtime::kHandleDebuggerStatement));
1480 environment()->BindAccumulator(call, &states); 1480 environment()->BindAccumulator(call, &states);
1481 } 1481 }
1482 1482
1483 // We cannot create a graph from the debugger copy of the bytecode array.
1484 #define DEBUG_BREAK(Name, ...) \
1485 void BytecodeGraphBuilder::Visit##Name() { CHECK(false); }
rmcilroy 2016/02/16 10:46:38 /s/CHECK(false)/UNREACHABLE()/
Yang 2016/02/19 13:09:17 Done.
1486 DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK);
1487 #undef DEBUG_BREAK
1488
1483 void BytecodeGraphBuilder::BuildForInPrepare() { 1489 void BytecodeGraphBuilder::BuildForInPrepare() {
1484 FrameStateBeforeAndAfter states(this); 1490 FrameStateBeforeAndAfter states(this);
1485 Node* receiver = environment()->LookupAccumulator(); 1491 Node* receiver = environment()->LookupAccumulator();
1486 Node* prepare = NewNode(javascript()->ForInPrepare(), receiver); 1492 Node* prepare = NewNode(javascript()->ForInPrepare(), receiver);
1487 environment()->BindRegistersToProjections( 1493 environment()->BindRegistersToProjections(
1488 bytecode_iterator().GetRegisterOperand(0), prepare, &states); 1494 bytecode_iterator().GetRegisterOperand(0), prepare, &states);
1489 } 1495 }
1490 1496
1491 void BytecodeGraphBuilder::VisitForInPrepare() { BuildForInPrepare(); } 1497 void BytecodeGraphBuilder::VisitForInPrepare() { BuildForInPrepare(); }
1492 1498
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1796 // Phi does not exist yet, introduce one. 1802 // Phi does not exist yet, introduce one.
1797 value = NewPhi(inputs, value, control); 1803 value = NewPhi(inputs, value, control);
1798 value->ReplaceInput(inputs - 1, other); 1804 value->ReplaceInput(inputs - 1, other);
1799 } 1805 }
1800 return value; 1806 return value;
1801 } 1807 }
1802 1808
1803 } // namespace compiler 1809 } // namespace compiler
1804 } // namespace internal 1810 } // namespace internal
1805 } // namespace v8 1811 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/debug/debug.h » ('j') | src/debug/debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698