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

Unified Diff: runtime/vm/snapshot_test.cc

Issue 14962008: Fix issue 5275: The VM must always generate the most compact form of an integer (Smi, Mint or Bigin… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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
« runtime/vm/object.h ('K') | « runtime/vm/object_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot_test.cc
===================================================================
--- runtime/vm/snapshot_test.cc (revision 22813)
+++ runtime/vm/snapshot_test.cc (working copy)
@@ -233,7 +233,8 @@
void CheckMint(int64_t value) {
StackZone zone(Isolate::Current());
- const Mint& mint = Mint::Handle(Mint::New(value));
+ Mint& mint = Mint::Handle();
+ mint ^= Integer::New(value);
ApiNativeScope scope;
Dart_CObject* mint_cobject = SerializeAndDeserializeMint(mint);
// On 64-bit platforms mints always require 64-bits as the smi range
@@ -371,7 +372,8 @@
MessageWriter writer(&buffer, &zone_allocator);
const char* cstr = "0x270FFFFFFFFFFFFFD8F0";
const String& str = String::Handle(String::New(cstr));
- const Bigint& bigint = Bigint::Handle(Bigint::NewCanonical(str));
+ Bigint& bigint = Bigint::Handle();
+ bigint ^= Integer::NewCanonical(str);
writer.WriteMessage(bigint);
intptr_t buffer_len = writer.BytesWritten();
« runtime/vm/object.h ('K') | « runtime/vm/object_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698