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

Side by Side Diff: runtime/vm/deopt_instructions.h

Issue 184523002: Allocation sinking for contexts. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: added new test Created 6 years, 1 month 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 #ifndef VM_DEOPT_INSTRUCTIONS_H_ 5 #ifndef VM_DEOPT_INSTRUCTIONS_H_
6 #define VM_DEOPT_INSTRUCTIONS_H_ 6 #define VM_DEOPT_INSTRUCTIONS_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // artificial arguments used during deoptimization. 106 // artificial arguments used during deoptimization.
107 intptr_t MaterializeDeferredObjects(); 107 intptr_t MaterializeDeferredObjects();
108 108
109 RawArray* DestFrameAsArray(); 109 RawArray* DestFrameAsArray();
110 110
111 void VisitObjectPointers(ObjectPointerVisitor* visitor); 111 void VisitObjectPointers(ObjectPointerVisitor* visitor);
112 112
113 void DeferMaterializedObjectRef(intptr_t idx, intptr_t* slot) { 113 void DeferMaterializedObjectRef(intptr_t idx, intptr_t* slot) {
114 deferred_slots_ = new DeferredObjectRef( 114 deferred_slots_ = new DeferredObjectRef(
115 idx, 115 idx,
116 reinterpret_cast<RawInstance**>(slot), 116 reinterpret_cast<RawObject**>(slot),
117 deferred_slots_); 117 deferred_slots_);
118 } 118 }
119 119
120 void DeferMaterialization(double value, RawDouble** slot) { 120 void DeferMaterialization(double value, RawDouble** slot) {
121 deferred_slots_ = new DeferredDouble( 121 deferred_slots_ = new DeferredDouble(
122 value, 122 value,
123 reinterpret_cast<RawInstance**>(slot), 123 reinterpret_cast<RawObject**>(slot),
124 deferred_slots_); 124 deferred_slots_);
125 } 125 }
126 126
127 void DeferMintMaterialization(int64_t value, RawMint** slot) { 127 void DeferMintMaterialization(int64_t value, RawMint** slot) {
128 deferred_slots_ = new DeferredMint( 128 deferred_slots_ = new DeferredMint(
129 value, 129 value,
130 reinterpret_cast<RawInstance**>(slot), 130 reinterpret_cast<RawObject**>(slot),
131 deferred_slots_); 131 deferred_slots_);
132 } 132 }
133 133
134 void DeferMaterialization(simd128_value_t value, RawFloat32x4** slot) { 134 void DeferMaterialization(simd128_value_t value, RawFloat32x4** slot) {
135 deferred_slots_ = new DeferredFloat32x4( 135 deferred_slots_ = new DeferredFloat32x4(
136 value, 136 value,
137 reinterpret_cast<RawInstance**>(slot), 137 reinterpret_cast<RawObject**>(slot),
138 deferred_slots_); 138 deferred_slots_);
139 } 139 }
140 140
141 void DeferMaterialization(simd128_value_t value, RawFloat64x2** slot) { 141 void DeferMaterialization(simd128_value_t value, RawFloat64x2** slot) {
142 deferred_slots_ = new DeferredFloat64x2( 142 deferred_slots_ = new DeferredFloat64x2(
143 value, 143 value,
144 reinterpret_cast<RawInstance**>(slot), 144 reinterpret_cast<RawObject**>(slot),
145 deferred_slots_); 145 deferred_slots_);
146 } 146 }
147 147
148 void DeferMaterialization(simd128_value_t value, RawInt32x4** slot) { 148 void DeferMaterialization(simd128_value_t value, RawInt32x4** slot) {
149 deferred_slots_ = new DeferredInt32x4( 149 deferred_slots_ = new DeferredInt32x4(
150 value, 150 value,
151 reinterpret_cast<RawInstance**>(slot), 151 reinterpret_cast<RawObject**>(slot),
152 deferred_slots_); 152 deferred_slots_);
153 } 153 }
154 154
155 DeferredObject* GetDeferredObject(intptr_t idx) const { 155 DeferredObject* GetDeferredObject(intptr_t idx) const {
156 return deferred_objects_[idx]; 156 return deferred_objects_[idx];
157 } 157 }
158 158
159 private: 159 private:
160 intptr_t* GetDestFrameAddressAt(intptr_t index) const { 160 intptr_t* GetDestFrameAddressAt(intptr_t index) const {
161 ASSERT(dest_frame_ != NULL); 161 ASSERT(dest_frame_ != NULL);
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 class ReasonField : public BitField<ICData::DeoptReasonId, 0, 8> { }; 515 class ReasonField : public BitField<ICData::DeoptReasonId, 0, 8> { };
516 class FlagsField : public BitField<uint32_t, 8, 8> { }; 516 class FlagsField : public BitField<uint32_t, 8, 8> { };
517 517
518 private: 518 private:
519 static const intptr_t kEntrySize = 3; 519 static const intptr_t kEntrySize = 3;
520 }; 520 };
521 521
522 } // namespace dart 522 } // namespace dart
523 523
524 #endif // VM_DEOPT_INSTRUCTIONS_H_ 524 #endif // VM_DEOPT_INSTRUCTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698