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

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

Issue 10933046: Cleanup: Replace LoadInstanceFieldInstr with LoadVMFieldInstr. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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) 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 M(PolymorphicInstanceCall) \ 201 M(PolymorphicInstanceCall) \
202 M(StaticCall) \ 202 M(StaticCall) \
203 M(LoadLocal) \ 203 M(LoadLocal) \
204 M(StoreLocal) \ 204 M(StoreLocal) \
205 M(StrictCompare) \ 205 M(StrictCompare) \
206 M(EqualityCompare) \ 206 M(EqualityCompare) \
207 M(RelationalOp) \ 207 M(RelationalOp) \
208 M(NativeCall) \ 208 M(NativeCall) \
209 M(LoadIndexed) \ 209 M(LoadIndexed) \
210 M(StoreIndexed) \ 210 M(StoreIndexed) \
211 M(LoadInstanceField) \
212 M(StoreInstanceField) \ 211 M(StoreInstanceField) \
213 M(LoadStaticField) \ 212 M(LoadStaticField) \
214 M(StoreStaticField) \ 213 M(StoreStaticField) \
215 M(BooleanNegate) \ 214 M(BooleanNegate) \
216 M(InstanceOf) \ 215 M(InstanceOf) \
217 M(CreateArray) \ 216 M(CreateArray) \
218 M(CreateClosure) \ 217 M(CreateClosure) \
219 M(AllocateObject) \ 218 M(AllocateObject) \
220 M(AllocateObjectWithBoundsCheck) \ 219 M(AllocateObjectWithBoundsCheck) \
221 M(LoadVMField) \ 220 M(LoadVMField) \
(...skipping 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 virtual bool CanDeoptimize() const { return false; } 2122 virtual bool CanDeoptimize() const { return false; }
2124 virtual intptr_t ResultCid() const { return kDynamicCid; } 2123 virtual intptr_t ResultCid() const { return kDynamicCid; }
2125 2124
2126 private: 2125 private:
2127 const NativeBodyNode& ast_node_; 2126 const NativeBodyNode& ast_node_;
2128 2127
2129 DISALLOW_COPY_AND_ASSIGN(NativeCallInstr); 2128 DISALLOW_COPY_AND_ASSIGN(NativeCallInstr);
2130 }; 2129 };
2131 2130
2132 2131
2133 class LoadInstanceFieldInstr : public TemplateDefinition<1> {
2134 public:
2135 LoadInstanceFieldInstr(const Field& field, Value* instance) : field_(field) {
2136 ASSERT(instance != NULL);
2137 inputs_[0] = instance;
2138 }
2139
2140 DECLARE_INSTRUCTION(LoadInstanceField)
2141 virtual RawAbstractType* CompileType() const;
2142
2143 const Field& field() const { return field_; }
2144 Value* instance() const { return inputs_[0]; }
2145
2146 virtual void PrintOperandsTo(BufferFormatter* f) const;
2147
2148 virtual bool CanDeoptimize() const { return false; }
2149 virtual intptr_t ResultCid() const { return kDynamicCid; }
2150
2151 private:
2152 const Field& field_;
2153
2154 DISALLOW_COPY_AND_ASSIGN(LoadInstanceFieldInstr);
2155 };
2156
2157
2158 class StoreInstanceFieldInstr : public TemplateDefinition<2> { 2132 class StoreInstanceFieldInstr : public TemplateDefinition<2> {
2159 public: 2133 public:
2160 StoreInstanceFieldInstr(const Field& field, 2134 StoreInstanceFieldInstr(const Field& field,
2161 Value* instance, 2135 Value* instance,
2162 Value* value, 2136 Value* value,
2163 bool emit_store_barrier) 2137 bool emit_store_barrier)
2164 : field_(field), emit_store_barrier_(emit_store_barrier) { 2138 : field_(field), emit_store_barrier_(emit_store_barrier) {
2165 ASSERT(instance != NULL); 2139 ASSERT(instance != NULL);
2166 ASSERT(value != NULL); 2140 ASSERT(value != NULL);
2167 inputs_[0] = instance; 2141 inputs_[0] = instance;
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
3451 ForwardInstructionIterator* current_iterator_; 3425 ForwardInstructionIterator* current_iterator_;
3452 3426
3453 private: 3427 private:
3454 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 3428 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
3455 }; 3429 };
3456 3430
3457 3431
3458 } // namespace dart 3432 } // namespace dart
3459 3433
3460 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 3434 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698