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

Unified Diff: vm/snapshot_test.cc

Issue 11745022: - Make Boolean 'true' and 'false' singleton VM isolate objects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 12 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 | « vm/snapshot.cc ('k') | vm/stub_code_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/snapshot_test.cc
===================================================================
--- vm/snapshot_test.cc (revision 16591)
+++ vm/snapshot_test.cc (working copy)
@@ -39,11 +39,7 @@
}
if (expected.IsBool()) {
if (actual.IsBool()) {
- Bool& bl1 = Bool::Handle();
- Bool& bl2 = Bool::Handle();
- bl1 ^= expected.raw();
- bl2 ^= actual.raw();
- return bl1.value() == bl2.value();
+ return expected.raw() == actual.raw();
}
return false;
}
@@ -312,7 +308,7 @@
// Write snapshot with true object.
uint8_t* buffer;
MessageWriter writer(&buffer, &zone_allocator);
- const Bool& bl = Bool::Handle(Bool::True());
+ const Bool& bl = Bool::True();
writer.WriteMessage(bl);
intptr_t buffer_len = writer.BytesWritten();
@@ -341,7 +337,7 @@
// Write snapshot with false object.
uint8_t* buffer;
MessageWriter writer(&buffer, &zone_allocator);
- const Bool& bl = Bool::Handle(Bool::False());
+ const Bool& bl = Bool::False();
writer.WriteMessage(bl);
intptr_t buffer_len = writer.BytesWritten();
@@ -1260,12 +1256,12 @@
}
-static void CheckString(Dart_Handle string, const char* expected) {
+static void CheckString(Dart_Handle dart_string, const char* expected) {
StackZone zone(Isolate::Current());
uint8_t* buffer;
MessageWriter writer(&buffer, &zone_allocator);
String& str = String::Handle();
- str ^= Api::UnwrapHandle(string);
+ str ^= Api::UnwrapHandle(dart_string);
writer.WriteMessage(str);
intptr_t buffer_len = writer.BytesWritten();
@@ -1280,12 +1276,12 @@
}
-static void CheckStringInvalid(Dart_Handle string) {
+static void CheckStringInvalid(Dart_Handle dart_string) {
StackZone zone(Isolate::Current());
uint8_t* buffer;
MessageWriter writer(&buffer, &zone_allocator);
String& str = String::Handle();
- str ^= Api::UnwrapHandle(string);
+ str ^= Api::UnwrapHandle(dart_string);
writer.WriteMessage(str);
intptr_t buffer_len = writer.BytesWritten();
« no previous file with comments | « vm/snapshot.cc ('k') | vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698