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

Unified Diff: src/builtins/builtins-generator.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/builtins/builtins-date.cc ('k') | src/builtins/builtins-promise.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-generator.cc
diff --git a/src/builtins/builtins-generator.cc b/src/builtins/builtins-generator.cc
index 4436b8974ca53a6c7f29a6575015ec8837e7282e..722f7b7214dd45ee3cd0fdf939e699243ee33b6d 100644
--- a/src/builtins/builtins-generator.cc
+++ b/src/builtins/builtins-generator.cc
@@ -56,12 +56,11 @@ void GeneratorBuiltinsAssembler::GeneratorPrototypeResume(
Bind(&if_receiverisincompatible);
{
// The {receiver} is not a valid JSGeneratorObject.
- Node* result =
- CallRuntime(Runtime::kThrowIncompatibleMethodReceiver, context,
- HeapConstant(factory()->NewStringFromAsciiChecked(
- method_name, TENURED)),
- receiver);
- Return(result); // Never reached.
+ CallRuntime(Runtime::kThrowIncompatibleMethodReceiver, context,
+ HeapConstant(
+ factory()->NewStringFromAsciiChecked(method_name, TENURED)),
+ receiver);
+ Unreachable();
}
Bind(&if_receiverisclosed);
@@ -89,8 +88,8 @@ void GeneratorBuiltinsAssembler::GeneratorPrototypeResume(
Bind(&if_receiverisrunning);
{
- Node* result = CallRuntime(Runtime::kThrowGeneratorRunning, context);
- Return(result); // Never reached.
+ CallRuntime(Runtime::kThrowGeneratorRunning, context);
+ Unreachable();
}
}
« no previous file with comments | « src/builtins/builtins-date.cc ('k') | src/builtins/builtins-promise.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698