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

Unified Diff: src/builtins/builtins-date.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-array.cc ('k') | src/builtins/builtins-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-date.cc
diff --git a/src/builtins/builtins-date.cc b/src/builtins/builtins-date.cc
index c2027d582a308915c27e4268389f0e40f61fb014..bc1e28d2937decde8b426ba25e710b9a5d581ad3 100644
--- a/src/builtins/builtins-date.cc
+++ b/src/builtins/builtins-date.cc
@@ -945,8 +945,8 @@ void Generate_DatePrototype_GetField(CodeStubAssembler* assembler,
// Raise a TypeError if the receiver is not a date.
assembler->Bind(&receiver_not_date);
{
- Node* result = assembler->CallRuntime(Runtime::kThrowNotDateError, context);
- assembler->Return(result);
+ assembler->CallRuntime(Runtime::kThrowNotDateError, context);
+ assembler->Unreachable();
}
}
@@ -1152,20 +1152,19 @@ void Builtins::Generate_DatePrototypeToPrimitive(
// Raise a TypeError if the {hint} is invalid.
assembler.Bind(&hint_is_invalid);
{
- Node* result =
- assembler.CallRuntime(Runtime::kThrowInvalidHint, context, hint);
- assembler.Return(result);
+ assembler.CallRuntime(Runtime::kThrowInvalidHint, context, hint);
+ assembler.Unreachable();
}
// Raise a TypeError if the {receiver} is not a JSReceiver instance.
assembler.Bind(&receiver_is_invalid);
{
- Node* result = assembler.CallRuntime(
+ assembler.CallRuntime(
Runtime::kThrowIncompatibleMethodReceiver, context,
assembler.HeapConstant(assembler.factory()->NewStringFromAsciiChecked(
"Date.prototype [ @@toPrimitive ]", TENURED)),
receiver);
- assembler.Return(result);
+ assembler.Unreachable();
}
}
« no previous file with comments | « src/builtins/builtins-array.cc ('k') | src/builtins/builtins-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698