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

Unified Diff: src/compiler/interpreter-assembler.cc

Issue 1493963003: [turbofan] Make RawMachineAssembler handle the end node. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment. Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/interpreter-assembler.h ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/interpreter-assembler.cc
diff --git a/src/compiler/interpreter-assembler.cc b/src/compiler/interpreter-assembler.cc
index 56a108a3ed32d42b0bc989bd9e0a98463f94edf6..c3217aeba08dd3f6dafcc5940088aa658532fd9f 100644
--- a/src/compiler/interpreter-assembler.cc
+++ b/src/compiler/interpreter-assembler.cc
@@ -32,7 +32,6 @@ InterpreterAssembler::InterpreterAssembler(Isolate* isolate, Zone* zone,
isolate, new (zone) Graph(zone),
Linkage::GetInterpreterDispatchDescriptor(zone), kMachPtr,
InstructionSelector::SupportedMachineOperatorFlags())),
- end_nodes_(zone),
accumulator_(
raw_assembler_->Parameter(Linkage::kInterpreterAccumulatorParameter)),
context_(
@@ -46,7 +45,8 @@ InterpreterAssembler::~InterpreterAssembler() {}
Handle<Code> InterpreterAssembler::GenerateCode() {
DCHECK(!code_generated_);
- End();
+ // Disallow empty handlers that never return.
+ DCHECK_NE(0, graph()->end()->InputCount());
const char* bytecode_name = interpreter::Bytecodes::ToString(bytecode_);
Schedule* schedule = raw_assembler_->Export();
@@ -527,10 +527,8 @@ void InterpreterAssembler::Return() {
BytecodeArrayTaggedPointer(),
DispatchTableRawPointer(),
GetContext() };
- Node* tail_call = raw_assembler_->TailCallN(
- call_descriptor(), exit_trampoline_code_object, args);
- // This should always be the end node.
- AddEndInput(tail_call);
+ raw_assembler_->TailCallN(call_descriptor(), exit_trampoline_code_object,
+ args);
}
@@ -587,10 +585,7 @@ void InterpreterAssembler::DispatchTo(Node* new_bytecode_offset) {
BytecodeArrayTaggedPointer(),
DispatchTableRawPointer(),
GetContext() };
- Node* tail_call =
- raw_assembler_->TailCallN(call_descriptor(), target_code_object, args);
- // This should always be the end node.
- AddEndInput(tail_call);
+ raw_assembler_->TailCallN(call_descriptor(), target_code_object, args);
}
@@ -612,21 +607,6 @@ void InterpreterAssembler::AbortIfWordNotEqual(Node* lhs, Node* rhs,
}
-void InterpreterAssembler::AddEndInput(Node* input) {
- DCHECK_NOT_NULL(input);
- end_nodes_.push_back(input);
-}
-
-
-void InterpreterAssembler::End() {
- DCHECK(!end_nodes_.empty());
- int end_count = static_cast<int>(end_nodes_.size());
- Node* end = graph()->NewNode(raw_assembler_->common()->End(end_count),
- end_count, &end_nodes_[0]);
- graph()->SetEnd(end);
-}
-
-
// static
bool InterpreterAssembler::TargetSupportsUnalignedAccess() {
#if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
« no previous file with comments | « src/compiler/interpreter-assembler.h ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698