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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2002833005: [interpreter] Add BytecodeGenerator::Abort(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/bytecode-generator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index 866351e9d967f33fd257ac62c7a67aafcbdf4010..c13ceac22297a399db57ebf43e9763ba718acb51 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -657,13 +657,7 @@ void BytecodeGenerator::BuildIndexedJump(Register index, size_t start_index,
.JumpIfTrue(&(targets[i]));
}
- RegisterAllocationScope register_scope(this);
- Register reason = register_allocator()->NewRegister();
- BailoutReason bailout_reason = BailoutReason::kInvalidJumpTableIndex;
- builder()
- ->LoadLiteral(Smi::FromInt(static_cast<int>(bailout_reason)))
- .StoreAccumulatorInRegister(reason)
- .CallRuntime(Runtime::kAbort, reason, 1);
+ BuildAbort(BailoutReason::kInvalidJumpTableIndex);
}
void BytecodeGenerator::VisitIterationHeader(IterationStatement* stmt,
@@ -1959,6 +1953,15 @@ void BytecodeGenerator::BuildKeyedSuperPropertyStore(Register receiver,
builder()->CallRuntime(function_id, receiver, 4);
}
+void BytecodeGenerator::BuildAbort(BailoutReason bailout_reason) {
+ RegisterAllocationScope register_scope(this);
+ Register reason = register_allocator()->NewRegister();
+ builder()
+ ->LoadLiteral(Smi::FromInt(static_cast<int>(bailout_reason)))
+ .StoreAccumulatorInRegister(reason)
+ .CallRuntime(Runtime::kAbort, reason, 1);
+}
+
void BytecodeGenerator::BuildThrowReferenceError(Handle<String> name) {
RegisterAllocationScope register_scope(this);
Register name_reg = register_allocator()->NewRegister();
« no previous file with comments | « src/interpreter/bytecode-generator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698