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

Unified Diff: runtime/vm/parser.cc

Issue 1888593003: Revert "- Use a hash table to canonicalize instances/arrays to avoid having to iterate over a linea… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « runtime/vm/object.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 1e9f97f8b83387980c4fec9a7aa54c87acfc620b..6848e74497ae76201ed9492029a75659e475ea37 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -12062,7 +12062,7 @@ RawInstance* Parser::TryCanonicalize(const Instance& instance,
}
const char* error_str = NULL;
Instance& result =
- Instance::Handle(Z, instance.CheckAndCanonicalize(thread(), &error_str));
+ Instance::Handle(Z, instance.CheckAndCanonicalize(&error_str));
if (result.IsNull()) {
ReportError(token_pos, "Invalid const object %s", error_str);
}
@@ -12747,9 +12747,6 @@ AstNode* Parser::ParseListLiteral(TokenPosition type_pos,
if (is_const) {
// Allocate and initialize the const list at compile time.
- if ((element_list.length() == 0) && list_type_arguments.IsNull()) {
- return new(Z) LiteralNode(literal_pos, Object::empty_array());
- }
Array& const_list = Array::ZoneHandle(Z,
Array::New(element_list.length(), Heap::kOld));
const_list.SetTypeArguments(
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698