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

Unified Diff: src/compiler/raw-machine-assembler.cc

Issue 2705163005: [csa] Add Unreachable() and use it after throw sites (Closed)
Patch Set: Rebase Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/raw-machine-assembler.cc
diff --git a/src/compiler/raw-machine-assembler.cc b/src/compiler/raw-machine-assembler.cc
index b751e2d5b5232644c90e6a2b2f436e8c40eac9bb..0e101770c3b1022ae1c5a6b3288984bd6a514709 100644
--- a/src/compiler/raw-machine-assembler.cc
+++ b/src/compiler/raw-machine-assembler.cc
@@ -166,6 +166,13 @@ void RawMachineAssembler::PopAndReturn(Node* pop, Node* v1, Node* v2,
void RawMachineAssembler::DebugBreak() { AddNode(machine()->DebugBreak()); }
+void RawMachineAssembler::Unreachable() {
+ Node* values[] = {UndefinedConstant()}; // Unused.
+ Node* ret = MakeNode(common()->Throw(), 1, values);
+ schedule()->AddThrow(CurrentBlock(), ret);
+ current_block_ = nullptr;
+}
+
void RawMachineAssembler::Comment(const char* msg) {
AddNode(machine()->Comment(msg));
}
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698