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

Unified Diff: src/builtins/builtins-array.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 | « no previous file | src/builtins/builtins-date.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-array.cc
diff --git a/src/builtins/builtins-array.cc b/src/builtins/builtins-array.cc
index badf04bdfbde5c5c67eec639254966804858b55d..c2b20babe3080563b3e695969331b9514724691a 100644
--- a/src/builtins/builtins-array.cc
+++ b/src/builtins/builtins-array.cc
@@ -652,14 +652,14 @@ TF_BUILTIN(ArrayForEach, ForEachCodeStubAssembler) {
SmiConstant(MessageTemplate::kCalledOnNullOrUndefined),
HeapConstant(isolate()->factory()->NewStringFromAsciiChecked(
"Array.prototype.forEach")));
- Return(UndefinedConstant());
+ Unreachable();
}
Bind(&type_exception);
{
CallRuntime(Runtime::kThrowTypeError, context,
SmiConstant(MessageTemplate::kCalledNonCallable), callbackfn);
- Return(UndefinedConstant());
+ Unreachable();
}
}
@@ -2836,19 +2836,17 @@ void Builtins::Generate_ArrayIteratorPrototypeNext(
assembler.Bind(&throw_bad_receiver);
{
// The {receiver} is not a valid JSArrayIterator.
- Node* result = assembler.CallRuntime(
- Runtime::kThrowIncompatibleMethodReceiver, context,
- assembler.HeapConstant(operation), iterator);
- assembler.Return(result);
+ assembler.CallRuntime(Runtime::kThrowIncompatibleMethodReceiver, context,
+ assembler.HeapConstant(operation), iterator);
+ assembler.Unreachable();
}
assembler.Bind(&if_isdetached);
{
Node* message = assembler.SmiConstant(MessageTemplate::kDetachedOperation);
- Node* result =
- assembler.CallRuntime(Runtime::kThrowTypeError, context, message,
- assembler.HeapConstant(operation));
- assembler.Return(result);
+ assembler.CallRuntime(Runtime::kThrowTypeError, context, message,
+ assembler.HeapConstant(operation));
+ assembler.Unreachable();
}
}
« no previous file with comments | « no previous file | src/builtins/builtins-date.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698