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

Side by Side Diff: runtime/vm/isolate.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/json.h" 9 #include "platform/json.h"
10 #include "lib/mirrors.h" 10 #include "lib/mirrors.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 if (FLAG_trace_deoptimization_verbose) { 263 if (FLAG_trace_deoptimization_verbose) {
264 OS::PrintErr("materializing double at %"Px": %g\n", 264 OS::PrintErr("materializing double at %"Px": %g\n",
265 reinterpret_cast<uword>(slot()), value()); 265 reinterpret_cast<uword>(slot()), value());
266 } 266 }
267 } 267 }
268 268
269 269
270 void DeferredMint::Materialize() { 270 void DeferredMint::Materialize() {
271 RawMint** mint_slot = reinterpret_cast<RawMint**>(slot()); 271 RawMint** mint_slot = reinterpret_cast<RawMint**>(slot());
272 ASSERT(!Smi::IsValid64(value())); 272 ASSERT(!Smi::IsValid64(value()));
273 *mint_slot = Mint::New(value()); 273 Mint& mint = Mint::Handle();
274 mint ^= Integer::New(value());
275 *mint_slot = mint.raw();
274 276
275 if (FLAG_trace_deoptimization_verbose) { 277 if (FLAG_trace_deoptimization_verbose) {
276 OS::PrintErr("materializing mint at %"Px": %"Pd64"\n", 278 OS::PrintErr("materializing mint at %"Px": %"Pd64"\n",
277 reinterpret_cast<uword>(slot()), value()); 279 reinterpret_cast<uword>(slot()), value());
278 } 280 }
279 } 281 }
280 282
281 283
282 void DeferredFloat32x4::Materialize() { 284 void DeferredFloat32x4::Materialize() {
283 RawFloat32x4** float32x4_slot = reinterpret_cast<RawFloat32x4**>(slot()); 285 RawFloat32x4** float32x4_slot = reinterpret_cast<RawFloat32x4**>(slot());
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 return func.raw(); 1157 return func.raw();
1156 } 1158 }
1157 1159
1158 1160
1159 void IsolateSpawnState::Cleanup() { 1161 void IsolateSpawnState::Cleanup() {
1160 SwitchIsolateScope switch_scope(isolate()); 1162 SwitchIsolateScope switch_scope(isolate());
1161 Dart::ShutdownIsolate(); 1163 Dart::ShutdownIsolate();
1162 } 1164 }
1163 1165
1164 } // namespace dart 1166 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698