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

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

Issue 846553003: Support unboxed input to indirect goto instruction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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) 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_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 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after
2200 class IndirectGotoInstr : public TemplateInstruction<1, NoThrow> { 2200 class IndirectGotoInstr : public TemplateInstruction<1, NoThrow> {
2201 public: 2201 public:
2202 IndirectGotoInstr(TypedData* offsets, 2202 IndirectGotoInstr(TypedData* offsets,
2203 Value* offset_from_start) 2203 Value* offset_from_start)
2204 : offsets_(*offsets) { 2204 : offsets_(*offsets) {
2205 SetInputAt(0, offset_from_start); 2205 SetInputAt(0, offset_from_start);
2206 } 2206 }
2207 2207
2208 DECLARE_INSTRUCTION(IndirectGoto) 2208 DECLARE_INSTRUCTION(IndirectGoto)
2209 2209
2210 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
2211 ASSERT(idx == 0);
2212 return kNoRepresentation;
2213 }
2214
2210 virtual intptr_t ArgumentCount() const { return 0; } 2215 virtual intptr_t ArgumentCount() const { return 0; }
2211 2216
2212 void AddSuccessor(TargetEntryInstr* successor) { 2217 void AddSuccessor(TargetEntryInstr* successor) {
2213 ASSERT(successor->next()->IsGoto()); 2218 ASSERT(successor->next()->IsGoto());
2214 ASSERT(successor->next()->AsGoto()->successor()->IsIndirectEntry()); 2219 ASSERT(successor->next()->AsGoto()->successor()->IsIndirectEntry());
2215 successors_.Add(successor); 2220 successors_.Add(successor);
2216 } 2221 }
2217 2222
2218 virtual intptr_t SuccessorCount() const { return successors_.length(); } 2223 virtual intptr_t SuccessorCount() const { return successors_.length(); }
2219 virtual TargetEntryInstr* SuccessorAt(intptr_t index) const { 2224 virtual TargetEntryInstr* SuccessorAt(intptr_t index) const {
2220 ASSERT(index < SuccessorCount()); 2225 ASSERT(index < SuccessorCount());
2221 return successors_[index]; 2226 return successors_[index];
2222 } 2227 }
2223 2228
2224 virtual bool CanDeoptimize() const { return false; } 2229 virtual bool CanDeoptimize() const { return false; }
2225 virtual bool CanBecomeDeoptimizationTarget() const { return false; } 2230 virtual bool CanBecomeDeoptimizationTarget() const { return false; }
2226 2231
2227 virtual EffectSet Effects() const { return EffectSet::None(); } 2232 virtual EffectSet Effects() const { return EffectSet::None(); }
2228 2233
2229 virtual void PrintTo(BufferFormatter* f) const; 2234 virtual void PrintTo(BufferFormatter* f) const;
2230 2235
2231 const TypedData& offsets() const { return offsets_; } 2236 Value* offset() const { return inputs_[0]; }
2232 void ComputeOffsetTable(Isolate* isolate); 2237 void ComputeOffsetTable(Isolate* isolate);
2233 2238
2234 private: 2239 private:
2235 GrowableArray<TargetEntryInstr*> successors_; 2240 GrowableArray<TargetEntryInstr*> successors_;
2236 TypedData& offsets_; 2241 TypedData& offsets_;
2237 }; 2242 };
2238 2243
2239 2244
2240 class ComparisonInstr : public TemplateDefinition<2, NoThrow, Pure> { 2245 class ComparisonInstr : public TemplateDefinition<2, NoThrow, Pure> {
2241 public: 2246 public:
(...skipping 5789 matching lines...) Expand 10 before | Expand all | Expand 10 after
8031 Isolate* isolate, bool opt) const { \ 8036 Isolate* isolate, bool opt) const { \
8032 UNIMPLEMENTED(); \ 8037 UNIMPLEMENTED(); \
8033 return NULL; \ 8038 return NULL; \
8034 } \ 8039 } \
8035 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8040 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8036 8041
8037 8042
8038 } // namespace dart 8043 } // namespace dart
8039 8044
8040 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8045 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_arm.cc » ('j') | runtime/vm/intermediate_language_arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698