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

Unified Diff: runtime/vm/kernel_to_il.cc

Issue 2640253002: VM: [Kernel] Fix invocation of _AssertionError._create (Closed)
Patch Set: status file update Created 3 years, 11 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 | tests/language/language_kernel.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_to_il.cc
diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc
index 68ca748544c5b3b42855b687f1abd547f9ed73a7..15962431289fd594b1375d928e4076e0c66bf967 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -2704,7 +2704,7 @@ Fragment FlowGraphBuilder::ThrowTypeError() {
instructions += AllocateObject(klass, 0);
LocalVariable* instance = MakeTemporary();
- // Call _AssertionError._create constructor.
+ // Call _TypeError._create constructor.
instructions += LoadLocal(instance);
instructions += PushArgument(); // this
@@ -5386,7 +5386,7 @@ void FlowGraphBuilder::VisitSwitchStatement(SwitchStatement* node) {
body_fragment += AllocateObject(klass, 0);
LocalVariable* instance = MakeTemporary();
- // Call _AssertionError._create constructor.
+ // Call _FallThroughError._create constructor.
body_fragment += LoadLocal(instance);
body_fragment += PushArgument(); // this
@@ -5577,7 +5577,7 @@ void FlowGraphBuilder::VisitAssertStatement(AssertStatement* node) {
node->message() != NULL
? TranslateExpression(node->message())
: Constant(H.DartString("<no message>", Heap::kOld));
- otherwise_fragment += PushArgument(); // message
+ otherwise_fragment += PushArgument(); // failedAssertion
otherwise_fragment += Constant(url);
otherwise_fragment += PushArgument(); // url
@@ -5588,7 +5588,10 @@ void FlowGraphBuilder::VisitAssertStatement(AssertStatement* node) {
otherwise_fragment += IntConstant(0);
otherwise_fragment += PushArgument(); // column
- otherwise_fragment += StaticCall(TokenPosition::kNoSource, constructor, 5);
+ otherwise_fragment += Constant(H.DartString("<no message>", Heap::kOld));
+ otherwise_fragment += PushArgument(); // message
+
+ otherwise_fragment += StaticCall(TokenPosition::kNoSource, constructor, 6);
otherwise_fragment += Drop();
// Throw _AssertionError exception.
« no previous file with comments | « no previous file | tests/language/language_kernel.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698