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

Unified Diff: vm/object_test.cc

Issue 11648006: Create read only handles for empty_array and sentinel objects (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years 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 | « vm/object_store.cc ('k') | vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/object_test.cc
===================================================================
--- vm/object_test.cc (revision 16415)
+++ vm/object_test.cc (working copy)
@@ -22,8 +22,7 @@
Class::New(class_name, script, Scanner::kDummyTokenIndex));
// Class has no fields.
- const Array& no_fields = Array::Handle(Object::empty_array());
- cls.SetFields(no_fields);
+ cls.SetFields(Object::empty_array());
// Create and populate the function arrays.
const Array& functions = Array::Handle(Array::New(6));
@@ -168,8 +167,7 @@
Class::Handle(Class::New(class_name, script, Scanner::kDummyTokenIndex));
// No functions and no super class for the EmptyClass.
- const Array& no_fields = Array::Handle(Object::empty_array());
- empty_class.SetFields(no_fields);
+ empty_class.SetFields(Object::empty_array());
empty_class.Finalize();
EXPECT_EQ(kObjectAlignment, empty_class.instance_size());
Instance& instance = Instance::Handle(Instance::New(empty_class));
@@ -1654,7 +1652,7 @@
other_array.SetAt(2, array);
EXPECT(!array.Equals(other_array));
- EXPECT_EQ(0, Array::Handle(Object::empty_array()).Length());
+ EXPECT_EQ(0, Object::empty_array().Length());
}
« no previous file with comments | « vm/object_store.cc ('k') | vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698