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

Unified Diff: runtime/vm/kernel_to_il.cc

Issue 2944433003: [kernel] Add TokenPosition to AllocateObject, fix some cc tests (Closed)
Patch Set: Created 3 years, 6 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
Index: runtime/vm/kernel_to_il.cc
diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc
index f9f4e351199ec32af0e7bd1cf192853ce4f1f337..323fb5c016ff139426b5f9558d06fe1ad9d9ee10 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -951,11 +951,12 @@ Fragment FlowGraphBuilder::AllocateContext(int size) {
}
-Fragment FlowGraphBuilder::AllocateObject(const dart::Class& klass,
+Fragment FlowGraphBuilder::AllocateObject(TokenPosition position,
+ const dart::Class& klass,
intptr_t argument_count) {
ArgumentArray arguments = GetArguments(argument_count);
AllocateObjectInstr* allocate =
- new (Z) AllocateObjectInstr(TokenPosition::kNoSource, klass, arguments);
+ new (Z) AllocateObjectInstr(position, klass, arguments);
Push(allocate);
return Fragment(allocate);
}
@@ -1558,7 +1559,7 @@ Fragment FlowGraphBuilder::ThrowTypeError() {
Fragment instructions;
// Create instance of _FallThroughError
- instructions += AllocateObject(klass, 0);
+ instructions += AllocateObject(TokenPosition::kNoSource, klass, 0);
LocalVariable* instance = MakeTemporary();
// Call _TypeError._create constructor.

Powered by Google App Engine
This is Rietveld 408576698