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

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

Issue 10536096: Add code comment to ia32 disassembly as well, bug fix new ia32 compiler, remove use of TMP register… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_ia32.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 1157
1158 DISALLOW_COPY_AND_ASSIGN(CreateClosureComp); 1158 DISALLOW_COPY_AND_ASSIGN(CreateClosureComp);
1159 }; 1159 };
1160 1160
1161 1161
1162 class LoadVMFieldComp : public TemplateComputation<1> { 1162 class LoadVMFieldComp : public TemplateComputation<1> {
1163 public: 1163 public:
1164 LoadVMFieldComp(Value* value, 1164 LoadVMFieldComp(Value* value,
1165 intptr_t offset_in_bytes, 1165 intptr_t offset_in_bytes,
1166 const AbstractType& type) 1166 const AbstractType& type)
1167 : offset_in_bytes_(offset_in_bytes), type_(type) { 1167 : offset_in_bytes_(offset_in_bytes),
1168 type_(type),
1169 original_(NULL),
1170 class_ids_(NULL) {
1168 ASSERT(value != NULL); 1171 ASSERT(value != NULL);
1169 ASSERT(type.IsZoneHandle()); // May be null if field is not an instance. 1172 ASSERT(type.IsZoneHandle()); // May be null if field is not an instance.
1170 inputs_[0] = value; 1173 inputs_[0] = value;
1171 } 1174 }
1172 1175
1176 LoadVMFieldComp(Value* value,
1177 intptr_t offset_in_bytes,
1178 const AbstractType& type,
1179 InstanceCallComp* original,
1180 ZoneGrowableArray<intptr_t>* class_ids)
1181 : offset_in_bytes_(offset_in_bytes),
1182 type_(type),
1183 original_(original),
1184 class_ids_(class_ids) {
1185 ASSERT(value != NULL);
1186 ASSERT(type.IsZoneHandle()); // May be null if field is not an instance.
1187 ASSERT(original != NULL);
1188 ASSERT(class_ids != NULL);
1189 inputs_[0] = value;
1190 }
1191
1173 DECLARE_COMPUTATION(LoadVMField) 1192 DECLARE_COMPUTATION(LoadVMField)
1174 1193
1175 Value* value() const { return inputs_[0]; } 1194 Value* value() const { return inputs_[0]; }
1176 intptr_t offset_in_bytes() const { return offset_in_bytes_; } 1195 intptr_t offset_in_bytes() const { return offset_in_bytes_; }
1177 const AbstractType& type() const { return type_; } 1196 const AbstractType& type() const { return type_; }
1197 const ZoneGrowableArray<intptr_t>* class_ids() const { return class_ids_; }
1198 const InstanceCallComp* original() const { return original_; }
1178 1199
1179 virtual void PrintOperandsTo(BufferFormatter* f) const; 1200 virtual void PrintOperandsTo(BufferFormatter* f) const;
1180 1201
1181 private: 1202 private:
1182 const intptr_t offset_in_bytes_; 1203 const intptr_t offset_in_bytes_;
1183 const AbstractType& type_; 1204 const AbstractType& type_;
1205 const InstanceCallComp* original_; // For optimizations.
1206 // If non-NULL, the instruction is valid only for the class ids listed.
1207 const ZoneGrowableArray<intptr_t>* class_ids_;
1184 1208
1185 DISALLOW_COPY_AND_ASSIGN(LoadVMFieldComp); 1209 DISALLOW_COPY_AND_ASSIGN(LoadVMFieldComp);
1186 }; 1210 };
1187 1211
1188 1212
1189 class StoreVMFieldComp : public TemplateComputation<2> { 1213 class StoreVMFieldComp : public TemplateComputation<2> {
1190 public: 1214 public:
1191 StoreVMFieldComp(Value* dest, 1215 StoreVMFieldComp(Value* dest,
1192 intptr_t offset_in_bytes, 1216 intptr_t offset_in_bytes,
1193 Value* value, 1217 Value* value,
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
2160 const GrowableArray<BlockEntryInstr*>& block_order_; 2184 const GrowableArray<BlockEntryInstr*>& block_order_;
2161 2185
2162 private: 2186 private:
2163 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 2187 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
2164 }; 2188 };
2165 2189
2166 2190
2167 } // namespace dart 2191 } // namespace dart
2168 2192
2169 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 2193 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698