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

Unified Diff: runtime/vm/object.cc

Issue 2820363002: Move Kernel strings into the VM's heap. (Closed)
Patch Set: Incorporate review comments. Created 3 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.h ('k') | runtime/vm/raw_object.h » ('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 f3d4e0339f8acb560d38d137713c48352edac1ca..85a2c309b3291fb26ee9ca405980fb491bd85b8d 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -9073,6 +9073,11 @@ void Script::set_compile_time_constants(const Array& value) const {
}
+void Script::set_kernel_strings(const TypedData& strings) const {
+ StorePointer(&raw_ptr()->kernel_strings_, strings.raw());
+}
+
+
RawGrowableObjectArray* Script::GenerateLineNumberArray() const {
Zone* zone = Thread::Current()->zone();
const GrowableObjectArray& info =
@@ -10150,11 +10155,8 @@ RawObject* Library::GetMetadata(const Object& obj) const {
Object& metadata = Object::Handle();
metadata = field.StaticValue();
if (field.StaticValue() == Object::empty_array().raw()) {
- kernel::TreeNode* kernel_node =
- reinterpret_cast<kernel::TreeNode*>(field.kernel_field());
-
- if (kernel_node != NULL) {
- metadata = kernel::EvaluateMetadata(kernel_node);
+ if (field.kernel_field() != NULL) {
+ metadata = kernel::EvaluateMetadata(field);
} else {
metadata = Parser::ParseMetadata(field);
}
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698