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

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

Issue 14740005: Initial support for polymorphic inlining. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 481
482 // M is a single argument macro. It is applied to each concrete instruction 482 // M is a single argument macro. It is applied to each concrete instruction
483 // type name. The concrete instruction classes are the name with Instr 483 // type name. The concrete instruction classes are the name with Instr
484 // concatenated. 484 // concatenated.
485 #define FOR_EACH_INSTRUCTION(M) \ 485 #define FOR_EACH_INSTRUCTION(M) \
486 M(GraphEntry) \ 486 M(GraphEntry) \
487 M(JoinEntry) \ 487 M(JoinEntry) \
488 M(TargetEntry) \ 488 M(TargetEntry) \
489 M(CatchBlockEntry) \ 489 M(CatchBlockEntry) \
490 M(Phi) \ 490 M(Phi) \
491 M(Redefinition) \
491 M(Parameter) \ 492 M(Parameter) \
492 M(ParallelMove) \ 493 M(ParallelMove) \
493 M(PushArgument) \ 494 M(PushArgument) \
494 M(Return) \ 495 M(Return) \
495 M(Throw) \ 496 M(Throw) \
496 M(ReThrow) \ 497 M(ReThrow) \
497 M(Goto) \ 498 M(Goto) \
498 M(Branch) \ 499 M(Branch) \
499 M(AssertAssignable) \ 500 M(AssertAssignable) \
500 M(AssertBoolean) \ 501 M(AssertBoolean) \
(...skipping 17 matching lines...) Expand all
518 M(StoreStaticField) \ 519 M(StoreStaticField) \
519 M(BooleanNegate) \ 520 M(BooleanNegate) \
520 M(InstanceOf) \ 521 M(InstanceOf) \
521 M(CreateArray) \ 522 M(CreateArray) \
522 M(CreateClosure) \ 523 M(CreateClosure) \
523 M(AllocateObject) \ 524 M(AllocateObject) \
524 M(AllocateObjectWithBoundsCheck) \ 525 M(AllocateObjectWithBoundsCheck) \
525 M(LoadField) \ 526 M(LoadField) \
526 M(StoreVMField) \ 527 M(StoreVMField) \
527 M(LoadUntagged) \ 528 M(LoadUntagged) \
529 M(LoadClassId) \
528 M(InstantiateTypeArguments) \ 530 M(InstantiateTypeArguments) \
529 M(ExtractConstructorTypeArguments) \ 531 M(ExtractConstructorTypeArguments) \
530 M(ExtractConstructorInstantiator) \ 532 M(ExtractConstructorInstantiator) \
531 M(AllocateContext) \ 533 M(AllocateContext) \
532 M(ChainContext) \ 534 M(ChainContext) \
533 M(CloneContext) \ 535 M(CloneContext) \
534 M(CatchEntry) \ 536 M(CatchEntry) \
535 M(BinarySmiOp) \ 537 M(BinarySmiOp) \
536 M(UnarySmiOp) \ 538 M(UnarySmiOp) \
537 M(CheckStackOverflow) \ 539 M(CheckStackOverflow) \
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 friend class InvokeMathCFunctionInstr; 854 friend class InvokeMathCFunctionInstr;
853 friend class FlowGraphOptimizer; 855 friend class FlowGraphOptimizer;
854 friend class LoadIndexedInstr; 856 friend class LoadIndexedInstr;
855 friend class StoreIndexedInstr; 857 friend class StoreIndexedInstr;
856 friend class StoreInstanceFieldInstr; 858 friend class StoreInstanceFieldInstr;
857 friend class ControlInstruction; 859 friend class ControlInstruction;
858 friend class ComparisonInstr; 860 friend class ComparisonInstr;
859 friend class TargetEntryInstr; 861 friend class TargetEntryInstr;
860 friend class JoinEntryInstr; 862 friend class JoinEntryInstr;
861 friend class InstanceOfInstr; 863 friend class InstanceOfInstr;
864 friend class PolymorphicInstanceCallInstr;
865 friend class SmiToDoubleInstr;
866 friend class DoubleToIntegerInstr;
862 867
863 virtual void RawSetInputAt(intptr_t i, Value* value) = 0; 868 virtual void RawSetInputAt(intptr_t i, Value* value) = 0;
864 869
865 intptr_t deopt_id_; 870 intptr_t deopt_id_;
866 intptr_t lifetime_position_; // Position used by register allocator. 871 intptr_t lifetime_position_; // Position used by register allocator.
867 Instruction* previous_; 872 Instruction* previous_;
868 Instruction* next_; 873 Instruction* next_;
869 Environment* env_; 874 Environment* env_;
870 intptr_t expr_id_; 875 intptr_t expr_id_;
871 876
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 1290
1286 virtual void PrintTo(BufferFormatter* f) const; 1291 virtual void PrintTo(BufferFormatter* f) const;
1287 1292
1288 virtual EffectSet Effects() const { return EffectSet::None(); } 1293 virtual EffectSet Effects() const { return EffectSet::None(); }
1289 virtual EffectSet Dependencies() const { return EffectSet::None(); } 1294 virtual EffectSet Dependencies() const { return EffectSet::None(); }
1290 1295
1291 private: 1296 private:
1292 // Classes that have access to predecessors_ when inlining. 1297 // Classes that have access to predecessors_ when inlining.
1293 friend class BlockEntryInstr; 1298 friend class BlockEntryInstr;
1294 friend class InlineExitCollector; 1299 friend class InlineExitCollector;
1300 friend class PolymorphicInliner;
1295 1301
1296 // Direct access to phis_ in order to resize it due to phi elimination. 1302 // Direct access to phis_ in order to resize it due to phi elimination.
1297 friend class ConstantPropagator; 1303 friend class ConstantPropagator;
1298 1304
1299 virtual void ClearPredecessors() { predecessors_.Clear(); } 1305 virtual void ClearPredecessors() { predecessors_.Clear(); }
1300 virtual void AddPredecessor(BlockEntryInstr* predecessor); 1306 virtual void AddPredecessor(BlockEntryInstr* predecessor);
1301 1307
1302 GrowableArray<BlockEntryInstr*> predecessors_; 1308 GrowableArray<BlockEntryInstr*> predecessors_;
1303 ZoneGrowableArray<PhiInstr*>* phis_; 1309 ZoneGrowableArray<PhiInstr*>* phis_;
1304 1310
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1976 DISALLOW_COPY_AND_ASSIGN(BranchInstr); 1982 DISALLOW_COPY_AND_ASSIGN(BranchInstr);
1977 }; 1983 };
1978 1984
1979 1985
1980 class StoreContextInstr : public TemplateInstruction<1> { 1986 class StoreContextInstr : public TemplateInstruction<1> {
1981 public: 1987 public:
1982 explicit StoreContextInstr(Value* value) { 1988 explicit StoreContextInstr(Value* value) {
1983 SetInputAt(0, value); 1989 SetInputAt(0, value);
1984 } 1990 }
1985 1991
1986 DECLARE_INSTRUCTION(StoreContext); 1992 DECLARE_INSTRUCTION(StoreContext)
1987 1993
1988 virtual intptr_t ArgumentCount() const { return 0; } 1994 virtual intptr_t ArgumentCount() const { return 0; }
1989 1995
1990 Value* value() const { return inputs_[0]; } 1996 Value* value() const { return inputs_[0]; }
1991 1997
1992 virtual bool CanDeoptimize() const { return false; } 1998 virtual bool CanDeoptimize() const { return false; }
1993 1999
1994 virtual EffectSet Effects() const { return EffectSet::None(); } 2000 virtual EffectSet Effects() const { return EffectSet::None(); }
1995 2001
1996 private: 2002 private:
(...skipping 25 matching lines...) Expand all
2022 friend class BranchInstr; 2028 friend class BranchInstr;
2023 2029
2024 virtual void RawSetInputAt(intptr_t i, Value* value) { 2030 virtual void RawSetInputAt(intptr_t i, Value* value) {
2025 inputs_[i] = value; 2031 inputs_[i] = value;
2026 } 2032 }
2027 2033
2028 LocationSummary* locs_; 2034 LocationSummary* locs_;
2029 }; 2035 };
2030 2036
2031 2037
2038 class RedefinitionInstr : public TemplateDefinition<1> {
2039 public:
2040 explicit RedefinitionInstr(Value* value) {
2041 SetInputAt(0, value);
2042 }
2043
2044 DECLARE_INSTRUCTION(Redefinition)
2045
2046 Value* value() const { return inputs_[0]; }
2047
2048 virtual CompileType ComputeType() const;
2049 virtual bool RecomputeType();
2050
2051 virtual bool CanDeoptimize() const { return false; }
2052 virtual EffectSet Dependencies() const { return EffectSet::None(); }
2053 virtual EffectSet Effects() const { return EffectSet::None(); }
2054
2055 private:
2056 DISALLOW_COPY_AND_ASSIGN(RedefinitionInstr);
2057 };
2058
2059
2032 class RangeBoundary : public ValueObject { 2060 class RangeBoundary : public ValueObject {
2033 public: 2061 public:
2034 enum Kind { kUnknown, kSymbol, kConstant }; 2062 enum Kind { kUnknown, kSymbol, kConstant };
2035 2063
2036 RangeBoundary() : kind_(kUnknown), value_(0), offset_(0) { } 2064 RangeBoundary() : kind_(kUnknown), value_(0), offset_(0) { }
2037 2065
2038 RangeBoundary(const RangeBoundary& other) 2066 RangeBoundary(const RangeBoundary& other)
2039 : ValueObject(), 2067 : ValueObject(),
2040 kind_(other.kind_), 2068 kind_(other.kind_),
2041 value_(other.value_), 2069 value_(other.value_),
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 2550
2523 class PolymorphicInstanceCallInstr : public TemplateDefinition<0> { 2551 class PolymorphicInstanceCallInstr : public TemplateDefinition<0> {
2524 public: 2552 public:
2525 PolymorphicInstanceCallInstr(InstanceCallInstr* instance_call, 2553 PolymorphicInstanceCallInstr(InstanceCallInstr* instance_call,
2526 const ICData& ic_data, 2554 const ICData& ic_data,
2527 bool with_checks) 2555 bool with_checks)
2528 : instance_call_(instance_call), 2556 : instance_call_(instance_call),
2529 ic_data_(ic_data), 2557 ic_data_(ic_data),
2530 with_checks_(with_checks) { 2558 with_checks_(with_checks) {
2531 ASSERT(instance_call_ != NULL); 2559 ASSERT(instance_call_ != NULL);
2560 deopt_id_ = instance_call->deopt_id();
2532 } 2561 }
2533 2562
2534 InstanceCallInstr* instance_call() const { return instance_call_; } 2563 InstanceCallInstr* instance_call() const { return instance_call_; }
2535 bool with_checks() const { return with_checks_; } 2564 bool with_checks() const { return with_checks_; }
2536 2565
2537 virtual intptr_t ArgumentCount() const { 2566 virtual intptr_t ArgumentCount() const {
2538 return instance_call()->ArgumentCount(); 2567 return instance_call()->ArgumentCount();
2539 } 2568 }
2540 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { 2569 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const {
2541 return instance_call()->PushArgumentAt(index); 2570 return instance_call()->PushArgumentAt(index);
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
3128 const Field& field_; 3157 const Field& field_;
3129 3158
3130 DISALLOW_COPY_AND_ASSIGN(GuardFieldInstr); 3159 DISALLOW_COPY_AND_ASSIGN(GuardFieldInstr);
3131 }; 3160 };
3132 3161
3133 3162
3134 class LoadStaticFieldInstr : public TemplateDefinition<0> { 3163 class LoadStaticFieldInstr : public TemplateDefinition<0> {
3135 public: 3164 public:
3136 explicit LoadStaticFieldInstr(const Field& field) : field_(field) {} 3165 explicit LoadStaticFieldInstr(const Field& field) : field_(field) {}
3137 3166
3138 DECLARE_INSTRUCTION(LoadStaticField); 3167 DECLARE_INSTRUCTION(LoadStaticField)
3139 virtual CompileType ComputeType() const; 3168 virtual CompileType ComputeType() const;
3140 3169
3141 const Field& field() const { return field_; } 3170 const Field& field() const { return field_; }
3142 3171
3143 virtual void PrintOperandsTo(BufferFormatter* f) const; 3172 virtual void PrintOperandsTo(BufferFormatter* f) const;
3144 3173
3145 virtual bool CanDeoptimize() const { return false; } 3174 virtual bool CanDeoptimize() const { return false; }
3146 3175
3147 virtual bool AllowsCSE() const { return field_.is_final(); } 3176 virtual bool AllowsCSE() const { return field_.is_final(); }
3148 virtual EffectSet Effects() const { return EffectSet::None(); } 3177 virtual EffectSet Effects() const { return EffectSet::None(); }
3149 virtual EffectSet Dependencies() const; 3178 virtual EffectSet Dependencies() const;
3150 virtual bool AttributesEqual(Instruction* other) const; 3179 virtual bool AttributesEqual(Instruction* other) const;
3151 3180
3152 private: 3181 private:
3153 const Field& field_; 3182 const Field& field_;
3154 3183
3155 DISALLOW_COPY_AND_ASSIGN(LoadStaticFieldInstr); 3184 DISALLOW_COPY_AND_ASSIGN(LoadStaticFieldInstr);
3156 }; 3185 };
3157 3186
3158 3187
3159 class StoreStaticFieldInstr : public TemplateDefinition<1> { 3188 class StoreStaticFieldInstr : public TemplateDefinition<1> {
3160 public: 3189 public:
3161 StoreStaticFieldInstr(const Field& field, Value* value) 3190 StoreStaticFieldInstr(const Field& field, Value* value)
3162 : field_(field) { 3191 : field_(field) {
3163 ASSERT(field.IsZoneHandle()); 3192 ASSERT(field.IsZoneHandle());
3164 SetInputAt(0, value); 3193 SetInputAt(0, value);
3165 } 3194 }
3166 3195
3167 DECLARE_INSTRUCTION(StoreStaticField); 3196 DECLARE_INSTRUCTION(StoreStaticField)
3168 virtual CompileType* ComputeInitialType() const; 3197 virtual CompileType* ComputeInitialType() const;
3169 3198
3170 const Field& field() const { return field_; } 3199 const Field& field() const { return field_; }
3171 Value* value() const { return inputs_[0]; } 3200 Value* value() const { return inputs_[0]; }
3172 3201
3173 virtual void PrintOperandsTo(BufferFormatter* f) const; 3202 virtual void PrintOperandsTo(BufferFormatter* f) const;
3174 3203
3175 virtual bool CanDeoptimize() const { return false; } 3204 virtual bool CanDeoptimize() const { return false; }
3176 3205
3177 // Currently CSE/LICM don't operate on any instructions that can be affected 3206 // Currently CSE/LICM don't operate on any instructions that can be affected
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
3536 const Function& function_; 3565 const Function& function_;
3537 ZoneGrowableArray<PushArgumentInstr*>* arguments_; 3566 ZoneGrowableArray<PushArgumentInstr*>* arguments_;
3538 intptr_t token_pos_; 3567 intptr_t token_pos_;
3539 3568
3540 DISALLOW_COPY_AND_ASSIGN(CreateClosureInstr); 3569 DISALLOW_COPY_AND_ASSIGN(CreateClosureInstr);
3541 }; 3570 };
3542 3571
3543 3572
3544 class LoadUntaggedInstr : public TemplateDefinition<1> { 3573 class LoadUntaggedInstr : public TemplateDefinition<1> {
3545 public: 3574 public:
3546 explicit LoadUntaggedInstr(Value* object, intptr_t offset) : offset_(offset) { 3575 LoadUntaggedInstr(Value* object, intptr_t offset) : offset_(offset) {
3547 SetInputAt(0, object); 3576 SetInputAt(0, object);
3548 } 3577 }
3549 3578
3550 virtual Representation representation() const { 3579 virtual Representation representation() const {
3551 return kUntagged; 3580 return kUntagged;
3552 } 3581 }
3553 DECLARE_INSTRUCTION(LoadUntagged) 3582 DECLARE_INSTRUCTION(LoadUntagged)
3554 virtual CompileType ComputeType() const; 3583 virtual CompileType ComputeType() const;
3555 3584
3556 Value* object() const { return inputs_[0]; } 3585 Value* object() const { return inputs_[0]; }
3557 intptr_t offset() const { return offset_; } 3586 intptr_t offset() const { return offset_; }
3558 3587
3559 virtual bool CanDeoptimize() const { return false; } 3588 virtual bool CanDeoptimize() const { return false; }
3560 3589
3561 // This instruction must not be moved without the indexed access that 3590 // This instruction must not be moved without the indexed access that
3562 // depends on it (e.g. out of loops). GC may cause collect 3591 // depends on it (e.g. out of loops). GC may cause collect
3563 // the array while the external data-array is still accessed. 3592 // the array while the external data-array is still accessed.
3564 virtual bool AllowsCSE() const { return false; } 3593 virtual bool AllowsCSE() const { return false; }
3565 virtual EffectSet Effects() const { return EffectSet::None(); } 3594 virtual EffectSet Effects() const { return EffectSet::None(); }
3566 virtual EffectSet Dependencies() const { return EffectSet::None(); } 3595 virtual EffectSet Dependencies() const { return EffectSet::None(); }
3567 virtual bool AttributesEqual(Instruction* other) const { return true; } 3596 virtual bool AttributesEqual(Instruction* other) const { return true; }
3568 3597
3569 private: 3598 private:
3570 intptr_t offset_; 3599 intptr_t offset_;
3571 3600
3572 DISALLOW_COPY_AND_ASSIGN(LoadUntaggedInstr); 3601 DISALLOW_COPY_AND_ASSIGN(LoadUntaggedInstr);
3573 }; 3602 };
3574 3603
3575 3604
3605 class LoadClassIdInstr : public TemplateDefinition<1> {
3606 public:
3607 explicit LoadClassIdInstr(Value* object) {
3608 SetInputAt(0, object);
3609 }
3610
3611 virtual Representation representation() const {
3612 return kTagged;
3613 }
3614 DECLARE_INSTRUCTION(LoadClassId)
3615 virtual CompileType ComputeType() const;
3616
3617 Value* object() const { return inputs_[0]; }
3618
3619 virtual bool CanDeoptimize() const { return false; }
3620 virtual EffectSet Effects() const { return EffectSet::None(); }
3621 virtual EffectSet Dependencies() const { return EffectSet::None(); }
3622 virtual bool AttributesEqual(Instruction* other) const { return true; }
Florian Schneider 2013/05/03 10:41:36 This instructions could have AllowsCSE true, and D
Kevin Millikin (Google) 2013/05/03 11:47:38 Ouch, good catch. That was the intent, but CSE in
3623
3624 private:
3625 DISALLOW_COPY_AND_ASSIGN(LoadClassIdInstr);
3626 };
3627
3628
3576 class LoadFieldInstr : public TemplateDefinition<1> { 3629 class LoadFieldInstr : public TemplateDefinition<1> {
3577 public: 3630 public:
3578 LoadFieldInstr(Value* value, 3631 LoadFieldInstr(Value* value,
3579 intptr_t offset_in_bytes, 3632 intptr_t offset_in_bytes,
3580 const AbstractType& type, 3633 const AbstractType& type,
3581 bool immutable = false) 3634 bool immutable = false)
3582 : offset_in_bytes_(offset_in_bytes), 3635 : offset_in_bytes_(offset_in_bytes),
3583 type_(type), 3636 type_(type),
3584 result_cid_(kDynamicCid), 3637 result_cid_(kDynamicCid),
3585 immutable_(immutable), 3638 immutable_(immutable),
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
3786 }; 3839 };
3787 3840
3788 3841
3789 class AllocateContextInstr : public TemplateDefinition<0> { 3842 class AllocateContextInstr : public TemplateDefinition<0> {
3790 public: 3843 public:
3791 AllocateContextInstr(intptr_t token_pos, 3844 AllocateContextInstr(intptr_t token_pos,
3792 intptr_t num_context_variables) 3845 intptr_t num_context_variables)
3793 : token_pos_(token_pos), 3846 : token_pos_(token_pos),
3794 num_context_variables_(num_context_variables) {} 3847 num_context_variables_(num_context_variables) {}
3795 3848
3796 DECLARE_INSTRUCTION(AllocateContext); 3849 DECLARE_INSTRUCTION(AllocateContext)
3797 virtual CompileType ComputeType() const; 3850 virtual CompileType ComputeType() const;
3798 3851
3799 intptr_t token_pos() const { return token_pos_; } 3852 intptr_t token_pos() const { return token_pos_; }
3800 intptr_t num_context_variables() const { return num_context_variables_; } 3853 intptr_t num_context_variables() const { return num_context_variables_; }
3801 3854
3802 virtual void PrintOperandsTo(BufferFormatter* f) const; 3855 virtual void PrintOperandsTo(BufferFormatter* f) const;
3803 3856
3804 virtual bool CanDeoptimize() const { return false; } 3857 virtual bool CanDeoptimize() const { return false; }
3805 3858
3806 virtual EffectSet Effects() const { return EffectSet::None(); } 3859 virtual EffectSet Effects() const { return EffectSet::None(); }
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
4095 SetInputAt(0, value); 4148 SetInputAt(0, value);
4096 deopt_id_ = deopt_id; 4149 deopt_id_ = deopt_id;
4097 } 4150 }
4098 4151
4099 Value* value() const { return inputs_[0]; } 4152 Value* value() const { return inputs_[0]; }
4100 4153
4101 virtual bool CanDeoptimize() const { 4154 virtual bool CanDeoptimize() const {
4102 return (value()->Type()->ToCid() != kUint32x4Cid); 4155 return (value()->Type()->ToCid() != kUint32x4Cid);
4103 } 4156 }
4104 4157
4105 virtual bool HasSideEffect() const { return false; }
4106
4107 virtual Representation representation() const { 4158 virtual Representation representation() const {
4108 return kUnboxedUint32x4; 4159 return kUnboxedUint32x4;
4109 } 4160 }
4110 4161
4111 virtual bool AllowsCSE() const { return true; } 4162 virtual bool AllowsCSE() const { return true; }
4112 virtual EffectSet Effects() const { return EffectSet::None(); } 4163 virtual EffectSet Effects() const { return EffectSet::None(); }
4113 virtual EffectSet Dependencies() const { return EffectSet::None(); } 4164 virtual EffectSet Dependencies() const { return EffectSet::None(); }
4114 virtual bool AttributesEqual(Instruction* other) const { return true; } 4165 virtual bool AttributesEqual(Instruction* other) const { return true; }
4115 4166
4116 DECLARE_INSTRUCTION(UnboxUint32x4) 4167 DECLARE_INSTRUCTION(UnboxUint32x4)
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
5002 private: 5053 private:
5003 DISALLOW_COPY_AND_ASSIGN(SmiToDoubleInstr); 5054 DISALLOW_COPY_AND_ASSIGN(SmiToDoubleInstr);
5004 }; 5055 };
5005 5056
5006 5057
5007 class DoubleToIntegerInstr : public TemplateDefinition<1> { 5058 class DoubleToIntegerInstr : public TemplateDefinition<1> {
5008 public: 5059 public:
5009 DoubleToIntegerInstr(Value* value, InstanceCallInstr* instance_call) 5060 DoubleToIntegerInstr(Value* value, InstanceCallInstr* instance_call)
5010 : instance_call_(instance_call) { 5061 : instance_call_(instance_call) {
5011 SetInputAt(0, value); 5062 SetInputAt(0, value);
5063 deopt_id_ = instance_call->deopt_id();
5012 } 5064 }
5013 5065
5014 Value* value() const { return inputs_[0]; } 5066 Value* value() const { return inputs_[0]; }
5015 InstanceCallInstr* instance_call() const { return instance_call_; } 5067 InstanceCallInstr* instance_call() const { return instance_call_; }
5016 5068
5017 DECLARE_INSTRUCTION(DoubleToInteger) 5069 DECLARE_INSTRUCTION(DoubleToInteger)
5018 virtual CompileType ComputeType() const; 5070 virtual CompileType ComputeType() const;
5019 5071
5020 virtual intptr_t ArgumentCount() const { return 1; } 5072 virtual intptr_t ArgumentCount() const { return 1; }
5021 5073
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
5498 ForwardInstructionIterator* current_iterator_; 5550 ForwardInstructionIterator* current_iterator_;
5499 5551
5500 private: 5552 private:
5501 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 5553 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
5502 }; 5554 };
5503 5555
5504 5556
5505 } // namespace dart 5557 } // namespace dart
5506 5558
5507 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 5559 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698