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

Side by Side Diff: runtime/vm/deferred_objects.cc

Issue 353513002: Use range information for optimizing integer boxing and fix bug in range analysis. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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
« no previous file with comments | « runtime/vm/dart_api_message.cc ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/deferred_objects.h" 5 #include "vm/deferred_objects.h"
6 6
7 #include "vm/deopt_instructions.h" 7 #include "vm/deopt_instructions.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 DECLARE_FLAG(bool, trace_deoptimization_verbose); 13 DECLARE_FLAG(bool, trace_deoptimization_verbose);
14 14
15 15
16 void DeferredDouble::Materialize(DeoptContext* deopt_context) { 16 void DeferredDouble::Materialize(DeoptContext* deopt_context) {
17 RawDouble** double_slot = reinterpret_cast<RawDouble**>(slot()); 17 RawDouble** double_slot = reinterpret_cast<RawDouble**>(slot());
18 *double_slot = Double::New(value()); 18 *double_slot = Double::New(value());
19 19
20 if (FLAG_trace_deoptimization_verbose) { 20 if (FLAG_trace_deoptimization_verbose) {
21 OS::PrintErr("materializing double at %" Px ": %g\n", 21 OS::PrintErr("materializing double at %" Px ": %g\n",
22 reinterpret_cast<uword>(slot()), value()); 22 reinterpret_cast<uword>(slot()), value());
23 } 23 }
24 } 24 }
25 25
26 26
27 void DeferredMint::Materialize(DeoptContext* deopt_context) { 27 void DeferredMint::Materialize(DeoptContext* deopt_context) {
28 RawMint** mint_slot = reinterpret_cast<RawMint**>(slot()); 28 RawMint** mint_slot = reinterpret_cast<RawMint**>(slot());
29 ASSERT(!Smi::IsValid64(value())); 29 ASSERT(!Smi::IsValid(value()));
30 Mint& mint = Mint::Handle(); 30 Mint& mint = Mint::Handle();
31 mint ^= Integer::New(value()); 31 mint ^= Integer::New(value());
32 *mint_slot = mint.raw(); 32 *mint_slot = mint.raw();
33 33
34 if (FLAG_trace_deoptimization_verbose) { 34 if (FLAG_trace_deoptimization_verbose) {
35 OS::PrintErr("materializing mint at %" Px ": %" Pd64 "\n", 35 OS::PrintErr("materializing mint at %" Px ": %" Pd64 "\n",
36 reinterpret_cast<uword>(slot()), value()); 36 reinterpret_cast<uword>(slot()), value());
37 } 37 }
38 } 38 }
39 39
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 offset.Value(), 141 offset.Value(),
142 value.ToCString()); 142 value.ToCString());
143 } 143 }
144 } 144 }
145 } 145 }
146 146
147 object_ = &obj; 147 object_ = &obj;
148 } 148 }
149 149
150 } // namespace dart 150 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_message.cc ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698