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

Unified Diff: runtime/vm/object.cc

Issue 1322973006: Symbols::NewFormatted and old space allocation. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address review comment Created 5 years, 3 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/ast_transformer.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index c6f4c723b4208b5f8eb8aa11df8ecc690e7e95e2..c11615465d10813b7e1a8c0d100fcd0ef8af9ecf 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -2281,12 +2281,12 @@ void Class::AddClosureFunction(const Function& function) const {
GrowableObjectArray& closures =
GrowableObjectArray::Handle(raw_ptr()->closure_functions_);
if (closures.IsNull()) {
- closures = GrowableObjectArray::New(4);
+ closures = GrowableObjectArray::New(4, Heap::kOld);
StorePointer(&raw_ptr()->closure_functions_, closures.raw());
}
ASSERT(function.IsNonImplicitClosureFunction());
ASSERT(function.Owner() == this->raw());
- closures.Add(function);
+ closures.Add(function, Heap::kOld);
}
@@ -7473,6 +7473,7 @@ void Field::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
+
// Build a closure object that gets (or sets) the contents of a static
// field f and cache the closure in a newly created static field
// named #f (or #f= in case of a setter).
« no previous file with comments | « runtime/vm/ast_transformer.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698