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

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

Issue 395943003: Support allocation sinking for compound objects. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: improve tests Created 6 years, 5 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/deferred_objects.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 #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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // Materializes all deferred objects. Returns the total number of 108 // Materializes all deferred objects. Returns the total number of
109 // artificial arguments used during deoptimization. 109 // artificial arguments used during deoptimization.
110 intptr_t MaterializeDeferredObjects(); 110 intptr_t MaterializeDeferredObjects();
111 111
112 RawArray* DestFrameAsArray(); 112 RawArray* DestFrameAsArray();
113 113
114 void VisitObjectPointers(ObjectPointerVisitor* visitor); 114 void VisitObjectPointers(ObjectPointerVisitor* visitor);
115 115
116 void DeferMaterializedObjectRef(intptr_t idx, intptr_t* slot) { 116 void DeferMaterializedObjectRef(intptr_t idx, intptr_t* slot) {
117 deferred_object_refs_ = new DeferredObjectRef( 117 deferred_slots_ = new DeferredObjectRef(
118 idx, 118 idx,
119 reinterpret_cast<RawInstance**>(slot), 119 reinterpret_cast<RawInstance**>(slot),
120 deferred_object_refs_); 120 deferred_slots_);
121 } 121 }
122 122
123 void DeferDoubleMaterialization(double value, RawDouble** slot) { 123 void DeferDoubleMaterialization(double value, RawDouble** slot) {
124 deferred_boxes_ = new DeferredDouble( 124 deferred_slots_ = new DeferredDouble(
125 value, 125 value,
126 reinterpret_cast<RawInstance**>(slot), 126 reinterpret_cast<RawInstance**>(slot),
127 deferred_boxes_); 127 deferred_slots_);
128 } 128 }
129 129
130 void DeferMintMaterialization(int64_t value, RawMint** slot) { 130 void DeferMintMaterialization(int64_t value, RawMint** slot) {
131 deferred_boxes_ = new DeferredMint( 131 deferred_slots_ = new DeferredMint(
132 value, 132 value,
133 reinterpret_cast<RawInstance**>(slot), 133 reinterpret_cast<RawInstance**>(slot),
134 deferred_boxes_); 134 deferred_slots_);
135 } 135 }
136 136
137 void DeferFloat32x4Materialization(simd128_value_t value, 137 void DeferFloat32x4Materialization(simd128_value_t value,
138 RawFloat32x4** slot) { 138 RawFloat32x4** slot) {
139 deferred_boxes_ = new DeferredFloat32x4( 139 deferred_slots_ = new DeferredFloat32x4(
140 value, 140 value,
141 reinterpret_cast<RawInstance**>(slot), 141 reinterpret_cast<RawInstance**>(slot),
142 deferred_boxes_); 142 deferred_slots_);
143 } 143 }
144 144
145 void DeferFloat64x2Materialization(simd128_value_t value, 145 void DeferFloat64x2Materialization(simd128_value_t value,
146 RawFloat64x2** slot) { 146 RawFloat64x2** slot) {
147 deferred_boxes_ = new DeferredFloat64x2( 147 deferred_slots_ = new DeferredFloat64x2(
148 value, 148 value,
149 reinterpret_cast<RawInstance**>(slot), 149 reinterpret_cast<RawInstance**>(slot),
150 deferred_boxes_); 150 deferred_slots_);
151 } 151 }
152 152
153 void DeferInt32x4Materialization(simd128_value_t value, 153 void DeferInt32x4Materialization(simd128_value_t value,
154 RawInt32x4** slot) { 154 RawInt32x4** slot) {
155 deferred_boxes_ = new DeferredInt32x4( 155 deferred_slots_ = new DeferredInt32x4(
156 value, 156 value,
157 reinterpret_cast<RawInstance**>(slot), 157 reinterpret_cast<RawInstance**>(slot),
158 deferred_boxes_); 158 deferred_slots_);
159 } 159 }
160 160
161 DeferredObject* GetDeferredObject(intptr_t idx) const { 161 DeferredObject* GetDeferredObject(intptr_t idx) const {
162 return deferred_objects_[idx]; 162 return deferred_objects_[idx];
163 } 163 }
164 164
165 private: 165 private:
166 intptr_t* GetDestFrameAddressAt(intptr_t index) const { 166 intptr_t* GetDestFrameAddressAt(intptr_t index) const {
167 ASSERT(dest_frame_ != NULL); 167 ASSERT(dest_frame_ != NULL);
168 ASSERT((0 <= index) && (index < dest_frame_size_)); 168 ASSERT((0 <= index) && (index < dest_frame_size_));
(...skipping 27 matching lines...) Expand all
196 bool source_frame_is_allocated_; 196 bool source_frame_is_allocated_;
197 intptr_t* source_frame_; 197 intptr_t* source_frame_;
198 intptr_t source_frame_size_; 198 intptr_t source_frame_size_;
199 intptr_t* cpu_registers_; 199 intptr_t* cpu_registers_;
200 fpu_register_t* fpu_registers_; 200 fpu_register_t* fpu_registers_;
201 intptr_t num_args_; 201 intptr_t num_args_;
202 ICData::DeoptReasonId deopt_reason_; 202 ICData::DeoptReasonId deopt_reason_;
203 intptr_t caller_fp_; 203 intptr_t caller_fp_;
204 Isolate* isolate_; 204 Isolate* isolate_;
205 205
206 DeferredSlot* deferred_boxes_; 206 DeferredSlot* deferred_slots_;
207 DeferredSlot* deferred_object_refs_;
208 207
209 intptr_t deferred_objects_count_; 208 intptr_t deferred_objects_count_;
210 DeferredObject** deferred_objects_; 209 DeferredObject** deferred_objects_;
211 210
212 DISALLOW_COPY_AND_ASSIGN(DeoptContext); 211 DISALLOW_COPY_AND_ASSIGN(DeoptContext);
213 }; 212 };
214 213
215 214
216 215
217 // Represents one deopt instruction, e.g, setup return address, store object, 216 // Represents one deopt instruction, e.g, setup return address, store object,
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 DeoptInfo* info, 398 DeoptInfo* info,
400 Smi* reason); 399 Smi* reason);
401 400
402 private: 401 private:
403 static const intptr_t kEntrySize = 3; 402 static const intptr_t kEntrySize = 3;
404 }; 403 };
405 404
406 } // namespace dart 405 } // namespace dart
407 406
408 #endif // VM_DEOPT_INSTRUCTIONS_H_ 407 #endif // VM_DEOPT_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « runtime/vm/deferred_objects.cc ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698