| Index: runtime/vm/intermediate_language.h
|
| diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
|
| index add487ef741f999c499de62f4c3864f72ebd46a0..0aa3af3f3b30e3221e05a6ca4e8a3bb256b85d9c 100644
|
| --- a/runtime/vm/intermediate_language.h
|
| +++ b/runtime/vm/intermediate_language.h
|
| @@ -53,18 +53,18 @@ class CompileType : public ValueObject {
|
| static const bool kNonNullable = false;
|
|
|
| CompileType(bool is_nullable, intptr_t cid, const AbstractType* type)
|
| - : is_nullable_(is_nullable), cid_(cid), type_(type) { }
|
| + : is_nullable_(is_nullable), cid_(cid), type_(type) {}
|
|
|
| CompileType(const CompileType& other)
|
| : ValueObject(),
|
| is_nullable_(other.is_nullable_),
|
| cid_(other.cid_),
|
| - type_(other.type_) { }
|
| + type_(other.type_) {}
|
|
|
| CompileType& operator=(const CompileType& other) {
|
| is_nullable_ = other.is_nullable_;
|
| cid_ = other.cid_;
|
| - type_ = other.type_;
|
| + type_ = other.type_;
|
| return *this;
|
| }
|
|
|
| @@ -96,8 +96,7 @@ class CompileType : public ValueObject {
|
| // given type.
|
| bool IsAssignableTo(const AbstractType& type) {
|
| bool is_instance;
|
| - return CanComputeIsInstanceOf(type, kNullable, &is_instance) &&
|
| - is_instance;
|
| + return CanComputeIsInstanceOf(type, kNullable, &is_instance) && is_instance;
|
| }
|
|
|
| // Create a new CompileType representing given combination of class id and
|
| @@ -151,19 +150,16 @@ class CompileType : public ValueObject {
|
| // Returns true if this and other types are the same.
|
| bool IsEqualTo(CompileType* other) {
|
| return (is_nullable_ == other->is_nullable_) &&
|
| - (ToNullableCid() == other->ToNullableCid()) &&
|
| - (ToAbstractType()->Equals(*other->ToAbstractType()));
|
| + (ToNullableCid() == other->ToNullableCid()) &&
|
| + (ToAbstractType()->Equals(*other->ToAbstractType()));
|
| }
|
|
|
| - bool IsNone() const {
|
| - return (cid_ == kIllegalCid) && (type_ == NULL);
|
| - }
|
| + bool IsNone() const { return (cid_ == kIllegalCid) && (type_ == NULL); }
|
|
|
| bool IsInt() {
|
| - return !is_nullable() &&
|
| - ((ToCid() == kSmiCid) ||
|
| - (ToCid() == kMintCid) ||
|
| - ((type_ != NULL) && (type_->Equals(Type::Handle(Type::IntType())))));
|
| + return !is_nullable() && ((ToCid() == kSmiCid) || (ToCid() == kMintCid) ||
|
| + ((type_ != NULL) &&
|
| + (type_->Equals(Type::Handle(Type::IntType())))));
|
| }
|
|
|
| void PrintTo(BufferFormatter* f) const;
|
| @@ -188,12 +184,10 @@ class ZoneCompileType : public ZoneAllocated {
|
| return zone_type->ToCompileType();
|
| }
|
|
|
| - CompileType* ToCompileType() {
|
| - return &type_;
|
| - }
|
| + CompileType* ToCompileType() { return &type_; }
|
|
|
| protected:
|
| - explicit ZoneCompileType(const CompileType& type) : type_(type) { }
|
| + explicit ZoneCompileType(const CompileType& type) : type_(type) {}
|
|
|
| CompileType type_;
|
| };
|
| @@ -203,14 +197,14 @@ class ZoneCompileType : public ZoneAllocated {
|
| // another compile type.
|
| class ConstrainedCompileType : public ZoneCompileType {
|
| public:
|
| - virtual ~ConstrainedCompileType() { }
|
| + virtual ~ConstrainedCompileType() {}
|
|
|
| // Recompute compile type.
|
| virtual void Update() = 0;
|
|
|
| protected:
|
| explicit ConstrainedCompileType(const CompileType& type)
|
| - : ZoneCompileType(type) { }
|
| + : ZoneCompileType(type) {}
|
| };
|
|
|
|
|
| @@ -221,11 +215,9 @@ class ConstrainedCompileType : public ZoneCompileType {
|
| class NotNullConstrainedCompileType : public ConstrainedCompileType {
|
| public:
|
| explicit NotNullConstrainedCompileType(CompileType* source)
|
| - : ConstrainedCompileType(source->CopyNonNullable()), source_(source) { }
|
| + : ConstrainedCompileType(source->CopyNonNullable()), source_(source) {}
|
|
|
| - virtual void Update() {
|
| - type_ = source_->CopyNonNullable();
|
| - }
|
| + virtual void Update() { type_ = source_->CopyNonNullable(); }
|
|
|
| private:
|
| CompileType* source_;
|
| @@ -240,9 +232,7 @@ class EffectSet : public ValueObject {
|
| kLastEffect = kExternalization
|
| };
|
|
|
| - EffectSet(const EffectSet& other)
|
| - : ValueObject(), effects_(other.effects_) {
|
| - }
|
| + EffectSet(const EffectSet& other) : ValueObject(), effects_(other.effects_) {}
|
|
|
| bool IsNone() const { return effects_ == kNoEffects; }
|
|
|
| @@ -252,14 +242,12 @@ class EffectSet : public ValueObject {
|
| return EffectSet(kExternalization);
|
| }
|
|
|
| - static EffectSet Externalization() {
|
| - return EffectSet(kExternalization);
|
| - }
|
| + static EffectSet Externalization() { return EffectSet(kExternalization); }
|
|
|
| bool ToInt() { return effects_; }
|
|
|
| private:
|
| - explicit EffectSet(intptr_t effects) : effects_(effects) { }
|
| + explicit EffectSet(intptr_t effects) : effects_(effects) {}
|
|
|
| intptr_t effects_;
|
| };
|
| @@ -279,6 +267,7 @@ class Value : public ZoneAllocated {
|
| current_ = next_;
|
| if (next_ != NULL) next_ = next_->next_use();
|
| }
|
| +
|
| private:
|
| Value* current_;
|
| Value* next_;
|
| @@ -290,7 +279,7 @@ class Value : public ZoneAllocated {
|
| next_use_(NULL),
|
| instruction_(NULL),
|
| use_index_(-1),
|
| - reaching_type_(NULL) { }
|
| + reaching_type_(NULL) {}
|
|
|
| Definition* definition() const { return definition_; }
|
| void set_definition(Definition* definition) { definition_ = definition; }
|
| @@ -318,7 +307,7 @@ class Value : public ZoneAllocated {
|
| inline void BindTo(Definition* definition);
|
| inline void BindToEnvironment(Definition* definition);
|
|
|
| - Value* Copy(Zone* zone) { return new(zone) Value(definition_); }
|
| + Value* Copy(Zone* zone) { return new (zone) Value(definition_); }
|
|
|
| // This function must only be used when the new Value is dominated by
|
| // the original Value.
|
| @@ -330,9 +319,7 @@ class Value : public ZoneAllocated {
|
|
|
| CompileType* Type();
|
|
|
| - void SetReachingType(CompileType* type) {
|
| - reaching_type_ = type;
|
| - }
|
| + void SetReachingType(CompileType* type) { reaching_type_ = type; }
|
|
|
| void PrintTo(BufferFormatter* f) const;
|
|
|
| @@ -372,10 +359,10 @@ class Value : public ZoneAllocated {
|
|
|
| // An embedded container with N elements of type T. Used (with partial
|
| // specialization for N=0) because embedded arrays cannot have size 0.
|
| -template<typename T, intptr_t N>
|
| +template <typename T, intptr_t N>
|
| class EmbeddedArray {
|
| public:
|
| - EmbeddedArray() : elements_() { }
|
| + EmbeddedArray() : elements_() {}
|
|
|
| intptr_t length() const { return N; }
|
|
|
| @@ -389,20 +376,16 @@ class EmbeddedArray {
|
| return elements_[i];
|
| }
|
|
|
| - const T& At(intptr_t i) const {
|
| - return (*this)[i];
|
| - }
|
| + const T& At(intptr_t i) const { return (*this)[i]; }
|
|
|
| - void SetAt(intptr_t i, const T& val) {
|
| - (*this)[i] = val;
|
| - }
|
| + void SetAt(intptr_t i, const T& val) { (*this)[i] = val; }
|
|
|
| private:
|
| T elements_[N];
|
| };
|
|
|
|
|
| -template<typename T>
|
| +template <typename T>
|
| class EmbeddedArray<T, 0> {
|
| public:
|
| intptr_t length() const { return 0; }
|
| @@ -572,7 +555,7 @@ class EmbeddedArray<T, 0> {
|
| M(UnboxInteger) \
|
| M(Comparison) \
|
| M(UnaryIntegerOp) \
|
| - M(BinaryIntegerOp) \
|
| + M(BinaryIntegerOp)
|
|
|
| #define FORWARD_DECLARATION(type) class type##Instr;
|
| FOR_EACH_INSTRUCTION(FORWARD_DECLARATION)
|
| @@ -581,7 +564,7 @@ FOR_EACH_ABSTRACT_INSTRUCTION(FORWARD_DECLARATION)
|
|
|
| #define DEFINE_INSTRUCTION_TYPE_CHECK(type) \
|
| virtual type##Instr* As##type() { return this; } \
|
| - virtual const char* DebugName() const { return #type; } \
|
| + virtual const char* DebugName() const { return #type; }
|
|
|
| // Functions required in all concrete instruction classes.
|
| #define DECLARE_INSTRUCTION_NO_BACKEND(type) \
|
| @@ -590,25 +573,24 @@ FOR_EACH_ABSTRACT_INSTRUCTION(FORWARD_DECLARATION)
|
| DEFINE_INSTRUCTION_TYPE_CHECK(type)
|
|
|
| #define DECLARE_INSTRUCTION_BACKEND() \
|
| - virtual LocationSummary* MakeLocationSummary(Zone* zone, \
|
| - bool optimizing) const; \
|
| - virtual void EmitNativeCode(FlowGraphCompiler* compiler); \
|
| + virtual LocationSummary* MakeLocationSummary(Zone* zone, bool optimizing) \
|
| + const; \
|
| + virtual void EmitNativeCode(FlowGraphCompiler* compiler);
|
|
|
| // Functions required in all concrete instruction classes.
|
| #define DECLARE_INSTRUCTION(type) \
|
| DECLARE_INSTRUCTION_NO_BACKEND(type) \
|
| - DECLARE_INSTRUCTION_BACKEND() \
|
| + DECLARE_INSTRUCTION_BACKEND()
|
|
|
| #ifndef PRODUCT
|
| -#define PRINT_TO_SUPPORT \
|
| - virtual void PrintTo(BufferFormatter* f) const;
|
| +#define PRINT_TO_SUPPORT virtual void PrintTo(BufferFormatter* f) const;
|
| #else
|
| #define PRINT_TO_SUPPORT
|
| #endif // !PRODUCT
|
|
|
| #ifndef PRODUCT
|
| #define PRINT_OPERANDS_TO_SUPPORT \
|
| - virtual void PrintOperandsTo(BufferFormatter* f) const;
|
| + virtual void PrintOperandsTo(BufferFormatter* f) const;
|
| #else
|
| #define PRINT_OPERANDS_TO_SUPPORT
|
| #endif // !PRODUCT
|
| @@ -616,9 +598,7 @@ FOR_EACH_ABSTRACT_INSTRUCTION(FORWARD_DECLARATION)
|
| class Instruction : public ZoneAllocated {
|
| public:
|
| #define DECLARE_TAG(type) k##type,
|
| - enum Tag {
|
| - FOR_EACH_INSTRUCTION(DECLARE_TAG)
|
| - };
|
| + enum Tag { FOR_EACH_INSTRUCTION(DECLARE_TAG) };
|
| #undef DECLARE_TAG
|
|
|
| explicit Instruction(intptr_t deopt_id = Thread::kNoDeoptId)
|
| @@ -628,9 +608,9 @@ class Instruction : public ZoneAllocated {
|
| next_(NULL),
|
| env_(NULL),
|
| locs_(NULL),
|
| - inlining_id_(-1) { }
|
| + inlining_id_(-1) {}
|
|
|
| - virtual ~Instruction() { }
|
| + virtual ~Instruction() {}
|
|
|
| virtual Tag tag() const = 0;
|
|
|
| @@ -642,9 +622,7 @@ class Instruction : public ZoneAllocated {
|
| const ICData* GetICData(
|
| const ZoneGrowableArray<const ICData*>& ic_data_array) const;
|
|
|
| - virtual TokenPosition token_pos() const {
|
| - return TokenPosition::kNoSource;
|
| - }
|
| + virtual TokenPosition token_pos() const { return TokenPosition::kNoSource; }
|
|
|
| virtual intptr_t InputCount() const = 0;
|
| virtual Value* InputAt(intptr_t i) const = 0;
|
| @@ -739,9 +717,9 @@ class Instruction : public ZoneAllocated {
|
| #define INSTRUCTION_TYPE_CHECK(Name) \
|
| DECLARE_INSTRUCTION_TYPE_CHECK(Name, Name##Instr)
|
|
|
| -DECLARE_INSTRUCTION_TYPE_CHECK(Definition, Definition)
|
| -FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
|
| -FOR_EACH_ABSTRACT_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
|
| + DECLARE_INSTRUCTION_TYPE_CHECK(Definition, Definition)
|
| + FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
|
| + FOR_EACH_ABSTRACT_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
|
|
|
| #undef INSTRUCTION_TYPE_CHECK
|
| #undef DECLARE_INSTRUCTION_TYPE_CHECK
|
| @@ -765,18 +743,14 @@ FOR_EACH_ABSTRACT_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
|
|
|
| static LocationSummary* MakeCallSummary(Zone* zone);
|
|
|
| - virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
|
| - UNIMPLEMENTED();
|
| - }
|
| + virtual void EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
|
|
|
| Environment* env() const { return env_; }
|
| void SetEnvironment(Environment* deopt_env);
|
| void RemoveEnvironment();
|
|
|
| intptr_t lifetime_position() const { return lifetime_position_; }
|
| - void set_lifetime_position(intptr_t pos) {
|
| - lifetime_position_ = pos;
|
| - }
|
| + void set_lifetime_position(intptr_t pos) { lifetime_position_ = pos; }
|
|
|
| bool HasUnmatchedInputRepresentations() const;
|
|
|
| @@ -786,13 +760,9 @@ FOR_EACH_ABSTRACT_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
|
| }
|
|
|
| // Representation of the value produced by this computation.
|
| - virtual Representation representation() const {
|
| - return kTagged;
|
| - }
|
| + virtual Representation representation() const { return kTagged; }
|
|
|
| - bool WasEliminated() const {
|
| - return next() == NULL;
|
| - }
|
| + bool WasEliminated() const { return next() == NULL; }
|
|
|
| // Returns deoptimization id that corresponds to the deoptimization target
|
| // that input operands conversions inserted for this instruction can jump
|
| @@ -820,14 +790,10 @@ FOR_EACH_ABSTRACT_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
|
| // instruction.
|
| Instruction* AppendInstruction(Instruction* tail);
|
|
|
| - virtual bool AllowsDCE() const {
|
| - return false;
|
| - }
|
| + virtual bool AllowsDCE() const { return false; }
|
|
|
| // Returns true if CSE and LICM are allowed for this instruction.
|
| - virtual bool AllowsCSE() const {
|
| - return false;
|
| - }
|
| + virtual bool AllowsCSE() const { return false; }
|
|
|
| // Returns set of effects created by this instruction.
|
| virtual EffectSet Effects() const = 0;
|
| @@ -876,9 +842,7 @@ FOR_EACH_ABSTRACT_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
|
| return CanDeoptimize() || CanBecomeDeoptimizationTarget();
|
| }
|
|
|
| - virtual bool CanBecomeDeoptimizationTarget() const {
|
| - return false;
|
| - }
|
| + virtual bool CanBecomeDeoptimizationTarget() const { return false; }
|
|
|
| void InheritDeoptTargetAfter(FlowGraph* flow_graph,
|
| Definition* call,
|
| @@ -902,23 +866,19 @@ FOR_EACH_ABSTRACT_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
|
| friend class CatchBlockEntryInstr; // deopt_id_
|
|
|
| // Fetch deopt id without checking if this computation can deoptimize.
|
| - intptr_t GetDeoptId() const {
|
| - return deopt_id_;
|
| - }
|
| + intptr_t GetDeoptId() const { return deopt_id_; }
|
|
|
| void CopyDeoptIdFrom(const Instruction& instr) {
|
| deopt_id_ = instr.deopt_id_;
|
| }
|
|
|
| private:
|
| - friend class BranchInstr; // For RawSetInputAt.
|
| + friend class BranchInstr; // For RawSetInputAt.
|
| friend class IfThenElseInstr; // For RawSetInputAt.
|
|
|
| virtual void RawSetInputAt(intptr_t i, Value* value) = 0;
|
|
|
| - enum {
|
| - kNoPlaceId = -1
|
| - };
|
| + enum { kNoPlaceId = -1 };
|
|
|
| intptr_t deopt_id_;
|
| union {
|
| @@ -937,8 +897,7 @@ FOR_EACH_ABSTRACT_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
|
|
|
| class PureInstruction : public Instruction {
|
| public:
|
| - explicit PureInstruction(intptr_t deopt_id)
|
| - : Instruction(deopt_id) { }
|
| + explicit PureInstruction(intptr_t deopt_id) : Instruction(deopt_id) {}
|
|
|
| virtual bool AllowsCSE() const { return true; }
|
| virtual EffectSet Dependencies() const { return EffectSet::None(); }
|
| @@ -961,25 +920,26 @@ struct NoThrow {
|
| // Types to be used as CSETrait for TemplateInstruction/TemplateDefinition.
|
| // Pure instructions are those that allow CSE and have no effects and
|
| // no dependencies.
|
| -template<typename DefaultBase, typename PureBase>
|
| +template <typename DefaultBase, typename PureBase>
|
| struct Pure {
|
| typedef PureBase Base;
|
| };
|
|
|
|
|
| -template<typename DefaultBase, typename PureBase>
|
| +template <typename DefaultBase, typename PureBase>
|
| struct NoCSE {
|
| typedef DefaultBase Base;
|
| };
|
|
|
|
|
| -template<intptr_t N,
|
| - typename ThrowsTrait,
|
| - template<typename Default, typename Pure> class CSETrait = NoCSE>
|
| -class TemplateInstruction: public CSETrait<Instruction, PureInstruction>::Base {
|
| +template <intptr_t N,
|
| + typename ThrowsTrait,
|
| + template <typename Default, typename Pure> class CSETrait = NoCSE>
|
| +class TemplateInstruction
|
| + : public CSETrait<Instruction, PureInstruction>::Base {
|
| public:
|
| explicit TemplateInstruction(intptr_t deopt_id = Thread::kNoDeoptId)
|
| - : CSETrait<Instruction, PureInstruction>::Base(deopt_id), inputs_() { }
|
| + : CSETrait<Instruction, PureInstruction>::Base(deopt_id), inputs_() {}
|
|
|
| virtual intptr_t InputCount() const { return N; }
|
| virtual Value* InputAt(intptr_t i) const { return inputs_[i]; }
|
| @@ -990,15 +950,13 @@ class TemplateInstruction: public CSETrait<Instruction, PureInstruction>::Base {
|
| EmbeddedArray<Value*, N> inputs_;
|
|
|
| private:
|
| - virtual void RawSetInputAt(intptr_t i, Value* value) {
|
| - inputs_[i] = value;
|
| - }
|
| + virtual void RawSetInputAt(intptr_t i, Value* value) { inputs_[i] = value; }
|
| };
|
|
|
|
|
| class MoveOperands : public ZoneAllocated {
|
| public:
|
| - MoveOperands(Location dest, Location src) : dest_(dest), src_(src) { }
|
| + MoveOperands(Location dest, Location src) : dest_(dest), src_(src) {}
|
|
|
| Location src() const { return src_; }
|
| Location dest() const { return dest_; }
|
| @@ -1056,7 +1014,7 @@ class MoveOperands : public ZoneAllocated {
|
|
|
| class ParallelMoveInstr : public TemplateInstruction<0, NoThrow> {
|
| public:
|
| - ParallelMoveInstr() : moves_(4) { }
|
| + ParallelMoveInstr() : moves_(4) {}
|
|
|
| DECLARE_INSTRUCTION(ParallelMove)
|
|
|
| @@ -1093,7 +1051,7 @@ class ParallelMoveInstr : public TemplateInstruction<0, NoThrow> {
|
| PRINT_TO_SUPPORT
|
|
|
| private:
|
| - GrowableArray<MoveOperands*> moves_; // Elements cannot be null.
|
| + GrowableArray<MoveOperands*> moves_; // Elements cannot be null.
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ParallelMoveInstr);
|
| };
|
| @@ -1121,7 +1079,7 @@ class BlockEntryInstr : public Instruction {
|
| // the register allocator.
|
| void set_start_pos(intptr_t pos) { start_pos_ = pos; }
|
| intptr_t start_pos() const { return start_pos_; }
|
| - void set_end_pos(intptr_t pos) { end_pos_ = pos; }
|
| + void set_end_pos(intptr_t pos) { end_pos_ = pos; }
|
| intptr_t end_pos() const { return end_pos_; }
|
|
|
| BlockEntryInstr* dominator() const { return dominator_; }
|
| @@ -1142,13 +1100,9 @@ class BlockEntryInstr : public Instruction {
|
| Instruction* last_instruction() const { return last_instruction_; }
|
| void set_last_instruction(Instruction* instr) { last_instruction_ = instr; }
|
|
|
| - ParallelMoveInstr* parallel_move() const {
|
| - return parallel_move_;
|
| - }
|
| + ParallelMoveInstr* parallel_move() const { return parallel_move_; }
|
|
|
| - bool HasParallelMove() const {
|
| - return parallel_move_ != NULL;
|
| - }
|
| + bool HasParallelMove() const { return parallel_move_ != NULL; }
|
|
|
| bool HasNonRedundantParallelMove() const {
|
| return HasParallelMove() && !parallel_move()->IsRedundant();
|
| @@ -1173,10 +1127,9 @@ class BlockEntryInstr : public Instruction {
|
| // block is recorded in each entry instruction. Returns true when called the
|
| // first time on this particular block within one graph traversal, and false
|
| // on all successive calls.
|
| - bool DiscoverBlock(
|
| - BlockEntryInstr* predecessor,
|
| - GrowableArray<BlockEntryInstr*>* preorder,
|
| - GrowableArray<intptr_t>* parent);
|
| + bool DiscoverBlock(BlockEntryInstr* predecessor,
|
| + GrowableArray<BlockEntryInstr*>* preorder,
|
| + GrowableArray<intptr_t>* parent);
|
|
|
| // Perform a depth first search to prune code not reachable from an OSR
|
| // entry point.
|
| @@ -1207,9 +1160,7 @@ class BlockEntryInstr : public Instruction {
|
| virtual bool MayThrow() const { return false; }
|
|
|
| intptr_t try_index() const { return try_index_; }
|
| - void set_try_index(intptr_t index) {
|
| - try_index_ = index;
|
| - }
|
| + void set_try_index(intptr_t index) { try_index_ = index; }
|
|
|
| // True for blocks inside a try { } region.
|
| bool InsideTryBlock() const {
|
| @@ -1217,13 +1168,9 @@ class BlockEntryInstr : public Instruction {
|
| }
|
|
|
| BitVector* loop_info() const { return loop_info_; }
|
| - void set_loop_info(BitVector* loop_info) {
|
| - loop_info_ = loop_info;
|
| - }
|
| + void set_loop_info(BitVector* loop_info) { loop_info_ = loop_info; }
|
|
|
| - virtual BlockEntryInstr* GetBlock() {
|
| - return this;
|
| - }
|
| + virtual BlockEntryInstr* GetBlock() { return this; }
|
|
|
| virtual TokenPosition token_pos() const {
|
| return TokenPosition::kControlFlow;
|
| @@ -1257,8 +1204,7 @@ class BlockEntryInstr : public Instruction {
|
| last_instruction_(NULL),
|
| offset_(-1),
|
| parallel_move_(NULL),
|
| - loop_info_(NULL) {
|
| - }
|
| + loop_info_(NULL) {}
|
|
|
| private:
|
| virtual void RawSetInputAt(intptr_t i, Value* value) { UNREACHABLE(); }
|
| @@ -1394,9 +1340,7 @@ class GraphEntryInstr : public BlockEntryInstr {
|
| }
|
| TargetEntryInstr* normal_entry() const { return normal_entry_; }
|
|
|
| - const ParsedFunction& parsed_function() const {
|
| - return parsed_function_;
|
| - }
|
| + const ParsedFunction& parsed_function() const { return parsed_function_; }
|
|
|
| const GrowableArray<CatchBlockEntryInstr*>& catch_entries() const {
|
| return catch_entries_;
|
| @@ -1432,7 +1376,7 @@ class JoinEntryInstr : public BlockEntryInstr {
|
| JoinEntryInstr(intptr_t block_id, intptr_t try_index)
|
| : BlockEntryInstr(block_id, try_index),
|
| predecessors_(2), // Two is the assumed to be the common case.
|
| - phis_(NULL) { }
|
| + phis_(NULL) {}
|
|
|
| DECLARE_INSTRUCTION(JoinEntry)
|
|
|
| @@ -1480,21 +1424,16 @@ class JoinEntryInstr : public BlockEntryInstr {
|
|
|
| class PhiIterator : public ValueObject {
|
| public:
|
| - explicit PhiIterator(JoinEntryInstr* join)
|
| - : phis_(join->phis()), index_(0) { }
|
| + explicit PhiIterator(JoinEntryInstr* join) : phis_(join->phis()), index_(0) {}
|
|
|
| void Advance() {
|
| ASSERT(!Done());
|
| index_++;
|
| }
|
|
|
| - bool Done() const {
|
| - return (phis_ == NULL) || (index_ >= phis_->length());
|
| - }
|
| + bool Done() const { return (phis_ == NULL) || (index_ >= phis_->length()); }
|
|
|
| - PhiInstr* Current() const {
|
| - return (*phis_)[index_];
|
| - }
|
| + PhiInstr* Current() const { return (*phis_)[index_]; }
|
|
|
| private:
|
| ZoneGrowableArray<PhiInstr*>* phis_;
|
| @@ -1507,7 +1446,7 @@ class TargetEntryInstr : public BlockEntryInstr {
|
| TargetEntryInstr(intptr_t block_id, intptr_t try_index)
|
| : BlockEntryInstr(block_id, try_index),
|
| predecessor_(NULL),
|
| - edge_weight_(0.0) { }
|
| + edge_weight_(0.0) {}
|
|
|
| DECLARE_INSTRUCTION(TargetEntry)
|
|
|
| @@ -1546,8 +1485,7 @@ class IndirectEntryInstr : public JoinEntryInstr {
|
| IndirectEntryInstr(intptr_t block_id,
|
| intptr_t indirect_id,
|
| intptr_t try_index)
|
| - : JoinEntryInstr(block_id, try_index),
|
| - indirect_id_(indirect_id) { }
|
| + : JoinEntryInstr(block_id, try_index), indirect_id_(indirect_id) {}
|
|
|
| DECLARE_INSTRUCTION(IndirectEntry)
|
|
|
| @@ -1603,9 +1541,7 @@ class CatchBlockEntryInstr : public BlockEntryInstr {
|
|
|
| // Returns try index for the try block to which this catch handler
|
| // corresponds.
|
| - intptr_t catch_try_index() const {
|
| - return catch_try_index_;
|
| - }
|
| + intptr_t catch_try_index() const { return catch_try_index_; }
|
| GrowableArray<Definition*>* initial_definitions() {
|
| return &initial_definitions_;
|
| }
|
| @@ -1669,8 +1605,7 @@ class AliasIdentity : public ValueObject {
|
| }
|
|
|
| AliasIdentity(const AliasIdentity& other)
|
| - : ValueObject(), value_(other.value_) {
|
| - }
|
| + : ValueObject(), value_(other.value_) {}
|
|
|
| AliasIdentity& operator=(const AliasIdentity& other) {
|
| value_ = other.value_;
|
| @@ -1678,7 +1613,7 @@ class AliasIdentity : public ValueObject {
|
| }
|
|
|
| private:
|
| - explicit AliasIdentity(intptr_t value) : value_(value) { }
|
| + explicit AliasIdentity(intptr_t value) : value_(value) {}
|
|
|
| enum {
|
| kUnknown = 0,
|
| @@ -1742,23 +1677,17 @@ class Definition : public Instruction {
|
| inline bool IsMintDefinition();
|
|
|
| bool IsInt32Definition() {
|
| - return IsBinaryInt32Op() ||
|
| - IsBoxInt32() ||
|
| - IsUnboxInt32() ||
|
| + return IsBinaryInt32Op() || IsBoxInt32() || IsUnboxInt32() ||
|
| IsUnboxedIntConverter();
|
| }
|
|
|
| // Compute compile type for this definition. It is safe to use this
|
| // approximation even before type propagator was run (e.g. during graph
|
| // building).
|
| - virtual CompileType ComputeType() const {
|
| - return CompileType::Dynamic();
|
| - }
|
| + virtual CompileType ComputeType() const { return CompileType::Dynamic(); }
|
|
|
| // Update CompileType of the definition. Returns true if the type has changed.
|
| - virtual bool RecomputeType() {
|
| - return false;
|
| - }
|
| + virtual bool RecomputeType() { return false; }
|
|
|
| PRINT_OPERANDS_TO_SUPPORT
|
| PRINT_TO_SUPPORT
|
| @@ -1836,13 +1765,9 @@ class Definition : public Instruction {
|
| temp_index_ = reinterpret_cast<intptr_t>(other);
|
| }
|
|
|
| - virtual AliasIdentity Identity() const {
|
| - return AliasIdentity::Unknown();
|
| - }
|
| + virtual AliasIdentity Identity() const { return AliasIdentity::Unknown(); }
|
|
|
| - virtual void SetIdentity(AliasIdentity identity) {
|
| - UNREACHABLE();
|
| - }
|
| + virtual void SetIdentity(AliasIdentity identity) { UNREACHABLE(); }
|
|
|
| Definition* OriginalDefinition();
|
|
|
| @@ -1884,8 +1809,7 @@ inline void Value::BindToEnvironment(Definition* def) {
|
|
|
| class PureDefinition : public Definition {
|
| public:
|
| - explicit PureDefinition(intptr_t deopt_id)
|
| - : Definition(deopt_id) { }
|
| + explicit PureDefinition(intptr_t deopt_id) : Definition(deopt_id) {}
|
|
|
| virtual bool AllowsCSE() const { return true; }
|
| virtual EffectSet Dependencies() const { return EffectSet::None(); }
|
| @@ -1894,13 +1818,13 @@ class PureDefinition : public Definition {
|
| };
|
|
|
|
|
| -template<intptr_t N,
|
| - typename ThrowsTrait,
|
| - template<typename Impure, typename Pure> class CSETrait = NoCSE>
|
| +template <intptr_t N,
|
| + typename ThrowsTrait,
|
| + template <typename Impure, typename Pure> class CSETrait = NoCSE>
|
| class TemplateDefinition : public CSETrait<Definition, PureDefinition>::Base {
|
| public:
|
| explicit TemplateDefinition(intptr_t deopt_id = Thread::kNoDeoptId)
|
| - : CSETrait<Definition, PureDefinition>::Base(deopt_id), inputs_() { }
|
| + : CSETrait<Definition, PureDefinition>::Base(deopt_id), inputs_() {}
|
|
|
| virtual intptr_t InputCount() const { return N; }
|
| virtual Value* InputAt(intptr_t i) const { return inputs_[i]; }
|
| @@ -1914,9 +1838,7 @@ class TemplateDefinition : public CSETrait<Definition, PureDefinition>::Base {
|
| friend class BranchInstr;
|
| friend class IfThenElseInstr;
|
|
|
| - virtual void RawSetInputAt(intptr_t i, Value* value) {
|
| - inputs_[i] = value;
|
| - }
|
| + virtual void RawSetInputAt(intptr_t i, Value* value) { inputs_[i] = value; }
|
| };
|
|
|
|
|
| @@ -1933,13 +1855,13 @@ class InductionVariableInfo;
|
| class PhiInstr : public Definition {
|
| public:
|
| PhiInstr(JoinEntryInstr* block, intptr_t num_inputs)
|
| - : block_(block),
|
| - inputs_(num_inputs),
|
| - representation_(kTagged),
|
| - reaching_defs_(NULL),
|
| - loop_variable_info_(NULL),
|
| - is_alive_(false),
|
| - is_receiver_(kUnknownReceiver) {
|
| + : block_(block),
|
| + inputs_(num_inputs),
|
| + representation_(kTagged),
|
| + reaching_defs_(NULL),
|
| + loop_variable_info_(NULL),
|
| + is_alive_(false),
|
| + is_receiver_(kUnknownReceiver) {
|
| for (intptr_t i = 0; i < num_inputs; ++i) {
|
| inputs_.Add(NULL);
|
| }
|
| @@ -1969,13 +1891,9 @@ class PhiInstr : public Definition {
|
| return representation_;
|
| }
|
|
|
| - virtual Representation representation() const {
|
| - return representation_;
|
| - }
|
| + virtual Representation representation() const { return representation_; }
|
|
|
| - virtual void set_representation(Representation r) {
|
| - representation_ = r;
|
| - }
|
| + virtual void set_representation(Representation r) { representation_ = r; }
|
|
|
| virtual intptr_t Hashcode() const {
|
| UNREACHABLE();
|
| @@ -1986,9 +1904,7 @@ class PhiInstr : public Definition {
|
|
|
| virtual void InferRange(RangeAnalysis* analysis, Range* range);
|
|
|
| - BitVector* reaching_defs() const {
|
| - return reaching_defs_;
|
| - }
|
| + BitVector* reaching_defs() const { return reaching_defs_; }
|
|
|
| void set_reaching_defs(BitVector* reaching_defs) {
|
| reaching_defs_ = reaching_defs;
|
| @@ -2009,19 +1925,13 @@ class PhiInstr : public Definition {
|
|
|
| PRINT_TO_SUPPORT
|
|
|
| - enum ReceiverType {
|
| - kUnknownReceiver = -1,
|
| - kNotReceiver = 0,
|
| - kReceiver = 1
|
| - };
|
| + enum ReceiverType { kUnknownReceiver = -1, kNotReceiver = 0, kReceiver = 1 };
|
|
|
| ReceiverType is_receiver() const {
|
| return static_cast<ReceiverType>(is_receiver_);
|
| }
|
|
|
| - void set_is_receiver(ReceiverType is_receiver) {
|
| - is_receiver_ = is_receiver;
|
| - }
|
| + void set_is_receiver(ReceiverType is_receiver) { is_receiver_ = is_receiver; }
|
|
|
| private:
|
| // Direct access to inputs_ in order to resize it due to unreachable
|
| @@ -2047,7 +1957,7 @@ class ParameterInstr : public Definition {
|
| ParameterInstr(intptr_t index,
|
| BlockEntryInstr* block,
|
| Register base_reg = FPREG)
|
| - : index_(index), base_reg_(base_reg), block_(block) { }
|
| + : index_(index), base_reg_(base_reg), block_(block) {}
|
|
|
| DECLARE_INSTRUCTION(Parameter)
|
|
|
| @@ -2092,9 +2002,7 @@ class ParameterInstr : public Definition {
|
|
|
| class PushArgumentInstr : public TemplateDefinition<1, NoThrow> {
|
| public:
|
| - explicit PushArgumentInstr(Value* value) {
|
| - SetInputAt(0, value);
|
| - }
|
| + explicit PushArgumentInstr(Value* value) { SetInputAt(0, value); }
|
|
|
| DECLARE_INSTRUCTION(PushArgument)
|
|
|
| @@ -2156,8 +2064,7 @@ class ThrowInstr : public TemplateInstruction<0, Throws> {
|
| public:
|
| explicit ThrowInstr(TokenPosition token_pos)
|
| : TemplateInstruction(Thread::Current()->GetNextDeoptId()),
|
| - token_pos_(token_pos) {
|
| - }
|
| + token_pos_(token_pos) {}
|
|
|
| DECLARE_INSTRUCTION(Throw)
|
|
|
| @@ -2183,8 +2090,7 @@ class ReThrowInstr : public TemplateInstruction<0, Throws> {
|
| ReThrowInstr(TokenPosition token_pos, intptr_t catch_try_index)
|
| : TemplateInstruction(Thread::Current()->GetNextDeoptId()),
|
| token_pos_(token_pos),
|
| - catch_try_index_(catch_try_index) {
|
| - }
|
| + catch_try_index_(catch_try_index) {}
|
|
|
| DECLARE_INSTRUCTION(ReThrow)
|
|
|
| @@ -2207,8 +2113,7 @@ class ReThrowInstr : public TemplateInstruction<0, Throws> {
|
|
|
| class StopInstr : public TemplateInstruction<0, NoThrow> {
|
| public:
|
| - explicit StopInstr(const char* message)
|
| - : message_(message) {
|
| + explicit StopInstr(const char* message) : message_(message) {
|
| ASSERT(message != NULL);
|
| }
|
|
|
| @@ -2234,12 +2139,11 @@ class StopInstr : public TemplateInstruction<0, NoThrow> {
|
| class GotoInstr : public TemplateInstruction<0, NoThrow> {
|
| public:
|
| explicit GotoInstr(JoinEntryInstr* entry)
|
| - : TemplateInstruction(Thread::Current()->GetNextDeoptId()),
|
| - block_(NULL),
|
| - successor_(entry),
|
| - edge_weight_(0.0),
|
| - parallel_move_(NULL) {
|
| - }
|
| + : TemplateInstruction(Thread::Current()->GetNextDeoptId()),
|
| + block_(NULL),
|
| + successor_(entry),
|
| + edge_weight_(0.0),
|
| + parallel_move_(NULL) {}
|
|
|
| DECLARE_INSTRUCTION(Goto)
|
|
|
| @@ -2265,13 +2169,9 @@ class GotoInstr : public TemplateInstruction<0, NoThrow> {
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
|
|
| - ParallelMoveInstr* parallel_move() const {
|
| - return parallel_move_;
|
| - }
|
| + ParallelMoveInstr* parallel_move() const { return parallel_move_; }
|
|
|
| - bool HasParallelMove() const {
|
| - return parallel_move_ != NULL;
|
| - }
|
| + bool HasParallelMove() const { return parallel_move_ != NULL; }
|
|
|
| bool HasNonRedundantParallelMove() const {
|
| return HasParallelMove() && !parallel_move()->IsRedundant();
|
| @@ -2315,9 +2215,8 @@ class GotoInstr : public TemplateInstruction<0, NoThrow> {
|
| // to IndirectGoto as an input.
|
| class IndirectGotoInstr : public TemplateInstruction<1, NoThrow> {
|
| public:
|
| - IndirectGotoInstr(TypedData* offsets,
|
| - Value* offset_from_start)
|
| - : offsets_(*offsets) {
|
| + IndirectGotoInstr(TypedData* offsets, Value* offset_from_start)
|
| + : offsets_(*offsets) {
|
| SetInputAt(0, offset_from_start);
|
| }
|
|
|
| @@ -2374,17 +2273,13 @@ class ComparisonInstr : public Definition {
|
| virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler,
|
| BranchLabels labels) = 0;
|
|
|
| - void SetDeoptId(const Instruction& instr) {
|
| - CopyDeoptIdFrom(instr);
|
| - }
|
| + void SetDeoptId(const Instruction& instr) { CopyDeoptIdFrom(instr); }
|
|
|
| // Operation class id is computed from collected ICData.
|
| void set_operation_cid(intptr_t value) { operation_cid_ = value; }
|
| intptr_t operation_cid() const { return operation_cid_; }
|
|
|
| - virtual void NegateComparison() {
|
| - kind_ = Token::NegateComparison(kind_);
|
| - }
|
| + virtual void NegateComparison() { kind_ = Token::NegateComparison(kind_); }
|
|
|
| virtual bool CanBecomeDeoptimizationTarget() const { return true; }
|
| virtual intptr_t DeoptimizationTarget() const { return GetDeoptId(); }
|
| @@ -2392,7 +2287,7 @@ class ComparisonInstr : public Definition {
|
| virtual bool AttributesEqual(Instruction* other) const {
|
| ComparisonInstr* other_comparison = other->AsComparison();
|
| return kind() == other_comparison->kind() &&
|
| - (operation_cid() == other_comparison->operation_cid());
|
| + (operation_cid() == other_comparison->operation_cid());
|
| }
|
|
|
| DEFINE_INSTRUCTION_TYPE_CHECK(Comparison)
|
| @@ -2404,8 +2299,7 @@ class ComparisonInstr : public Definition {
|
| : Definition(deopt_id),
|
| token_pos_(token_pos),
|
| kind_(kind),
|
| - operation_cid_(kIllegalCid) {
|
| - }
|
| + operation_cid_(kIllegalCid) {}
|
|
|
| private:
|
| const TokenPosition token_pos_;
|
| @@ -2425,22 +2319,23 @@ class PureComparison : public ComparisonInstr {
|
|
|
| protected:
|
| PureComparison(TokenPosition token_pos, Token::Kind kind, intptr_t deopt_id)
|
| - : ComparisonInstr(token_pos, kind, deopt_id) { }
|
| + : ComparisonInstr(token_pos, kind, deopt_id) {}
|
| };
|
|
|
|
|
| -template<intptr_t N,
|
| - typename ThrowsTrait,
|
| - template<typename Impure, typename Pure> class CSETrait = NoCSE>
|
| -class TemplateComparison : public CSETrait<
|
| - ComparisonInstr, PureComparison>::Base {
|
| +template <intptr_t N,
|
| + typename ThrowsTrait,
|
| + template <typename Impure, typename Pure> class CSETrait = NoCSE>
|
| +class TemplateComparison
|
| + : public CSETrait<ComparisonInstr, PureComparison>::Base {
|
| public:
|
| TemplateComparison(TokenPosition token_pos,
|
| Token::Kind kind,
|
| intptr_t deopt_id = Thread::kNoDeoptId)
|
| - : CSETrait<ComparisonInstr, PureComparison>::Base(
|
| - token_pos, kind, deopt_id),
|
| - inputs_() { }
|
| + : CSETrait<ComparisonInstr, PureComparison>::Base(token_pos,
|
| + kind,
|
| + deopt_id),
|
| + inputs_() {}
|
|
|
| virtual intptr_t InputCount() const { return N; }
|
| virtual Value* InputAt(intptr_t i) const { return inputs_[i]; }
|
| @@ -2451,9 +2346,7 @@ class TemplateComparison : public CSETrait<
|
| EmbeddedArray<Value*, N> inputs_;
|
|
|
| private:
|
| - virtual void RawSetInputAt(intptr_t i, Value* value) {
|
| - inputs_[i] = value;
|
| - }
|
| + virtual void RawSetInputAt(intptr_t i, Value* value) { inputs_[i] = value; }
|
| };
|
|
|
|
|
| @@ -2493,9 +2386,7 @@ class BranchInstr : public Instruction {
|
| return comparison()->CanBecomeDeoptimizationTarget();
|
| }
|
|
|
| - virtual EffectSet Effects() const {
|
| - return comparison()->Effects();
|
| - }
|
| + virtual EffectSet Effects() const { return comparison()->Effects(); }
|
|
|
| ComparisonInstr* comparison() const { return comparison_; }
|
| void SetComparison(ComparisonInstr* comp);
|
| @@ -2521,23 +2412,17 @@ class BranchInstr : public Instruction {
|
| }
|
|
|
| // Return compile type constrained by the comparison of this branch.
|
| - ConstrainedCompileType* constrained_type() const {
|
| - return constrained_type_;
|
| - }
|
| + ConstrainedCompileType* constrained_type() const { return constrained_type_; }
|
|
|
| void set_constant_target(TargetEntryInstr* target) {
|
| ASSERT(target == true_successor() || target == false_successor());
|
| constant_target_ = target;
|
| }
|
| - TargetEntryInstr* constant_target() const {
|
| - return constant_target_;
|
| - }
|
| + TargetEntryInstr* constant_target() const { return constant_target_; }
|
|
|
| virtual void InheritDeoptTarget(Zone* zone, Instruction* other);
|
|
|
| - virtual bool MayThrow() const {
|
| - return comparison()->MayThrow();
|
| - }
|
| + virtual bool MayThrow() const { return comparison()->MayThrow(); }
|
|
|
| TargetEntryInstr* true_successor() const { return true_successor_; }
|
| TargetEntryInstr* false_successor() const { return false_successor_; }
|
| @@ -2569,15 +2454,11 @@ class BranchInstr : public Instruction {
|
| class DeoptimizeInstr : public TemplateInstruction<0, NoThrow, Pure> {
|
| public:
|
| DeoptimizeInstr(ICData::DeoptReasonId deopt_reason, intptr_t deopt_id)
|
| - : TemplateInstruction(deopt_id),
|
| - deopt_reason_(deopt_reason) {
|
| - }
|
| + : TemplateInstruction(deopt_id), deopt_reason_(deopt_reason) {}
|
|
|
| virtual bool CanDeoptimize() const { return true; }
|
|
|
| - virtual bool AttributesEqual(Instruction* other) const {
|
| - return true;
|
| - }
|
| + virtual bool AttributesEqual(Instruction* other) const { return true; }
|
|
|
| DECLARE_INSTRUCTION(Deoptimize)
|
|
|
| @@ -2590,9 +2471,7 @@ class DeoptimizeInstr : public TemplateInstruction<0, NoThrow, Pure> {
|
|
|
| class RedefinitionInstr : public TemplateDefinition<1, NoThrow> {
|
| public:
|
| - explicit RedefinitionInstr(Value* value) {
|
| - SetInputAt(0, value);
|
| - }
|
| + explicit RedefinitionInstr(Value* value) { SetInputAt(0, value); }
|
|
|
| DECLARE_INSTRUCTION(Redefinition)
|
|
|
| @@ -2613,8 +2492,7 @@ class RedefinitionInstr : public TemplateDefinition<1, NoThrow> {
|
| class ConstraintInstr : public TemplateDefinition<1, NoThrow> {
|
| public:
|
| ConstraintInstr(Value* value, Range* constraint)
|
| - : constraint_(constraint),
|
| - target_(NULL) {
|
| + : constraint_(constraint), target_(NULL) {
|
| SetInputAt(0, value);
|
| }
|
|
|
| @@ -2639,12 +2517,8 @@ class ConstraintInstr : public TemplateDefinition<1, NoThrow> {
|
| // Constraints for branches have their target block stored in order
|
| // to find the comparison that generated the constraint:
|
| // target->predecessor->last_instruction->comparison.
|
| - void set_target(TargetEntryInstr* target) {
|
| - target_ = target;
|
| - }
|
| - TargetEntryInstr* target() const {
|
| - return target_;
|
| - }
|
| + void set_target(TargetEntryInstr* target) { target_ = target; }
|
| + TargetEntryInstr* target() const { return target_; }
|
|
|
| PRINT_OPERANDS_TO_SUPPORT
|
|
|
| @@ -2694,9 +2568,7 @@ class UnboxedConstantInstr : public ConstantInstr {
|
| explicit UnboxedConstantInstr(const Object& value,
|
| Representation representation);
|
|
|
| - virtual Representation representation() const {
|
| - return representation_;
|
| - }
|
| + virtual Representation representation() const { return representation_; }
|
|
|
| // Either NULL or the address of the unboxed constant.
|
| uword constant_address() const { return constant_address_; }
|
| @@ -2802,8 +2674,7 @@ class AssertBooleanInstr : public TemplateDefinition<1, Throws, Pure> {
|
| class CurrentContextInstr : public TemplateDefinition<0, NoThrow> {
|
| public:
|
| CurrentContextInstr()
|
| - : TemplateDefinition(Thread::Current()->GetNextDeoptId()) {
|
| - }
|
| + : TemplateDefinition(Thread::Current()->GetNextDeoptId()) {}
|
|
|
| DECLARE_INSTRUCTION(CurrentContext)
|
| virtual CompileType ComputeType() const;
|
| @@ -2898,18 +2769,14 @@ class InstanceCallInstr : public TemplateDefinition<0, Throws> {
|
| Token::IsUnaryOperator(token_kind) ||
|
| Token::IsIndexOperator(token_kind) ||
|
| Token::IsTypeTestOperator(token_kind) ||
|
| - Token::IsTypeCastOperator(token_kind) ||
|
| - token_kind == Token::kGET ||
|
| - token_kind == Token::kSET ||
|
| - token_kind == Token::kILLEGAL);
|
| + Token::IsTypeCastOperator(token_kind) || token_kind == Token::kGET ||
|
| + token_kind == Token::kSET || token_kind == Token::kILLEGAL);
|
| }
|
|
|
| DECLARE_INSTRUCTION(InstanceCall)
|
|
|
| const ICData* ic_data() const { return ic_data_; }
|
| - bool HasICData() const {
|
| - return (ic_data() != NULL) && !ic_data()->IsNull();
|
| - }
|
| + bool HasICData() const { return (ic_data() != NULL) && !ic_data()->IsNull(); }
|
|
|
| // ICData can be replaced by optimizer.
|
| void set_ic_data(const ICData* value) { ic_data_ = value; }
|
| @@ -2925,9 +2792,7 @@ class InstanceCallInstr : public TemplateDefinition<0, Throws> {
|
| intptr_t checked_argument_count() const { return checked_argument_count_; }
|
|
|
| bool has_unique_selector() const { return has_unique_selector_; }
|
| - void set_has_unique_selector(bool b) {
|
| - has_unique_selector_ = b;
|
| - }
|
| + void set_has_unique_selector(bool b) { has_unique_selector_ = b; }
|
|
|
| virtual bool CanDeoptimize() const { return true; }
|
|
|
| @@ -3037,8 +2902,7 @@ class StrictCompareInstr : public TemplateComparison<2, NoThrow, Pure> {
|
|
|
| virtual Definition* Canonicalize(FlowGraph* flow_graph);
|
|
|
| - virtual void EmitBranchCode(FlowGraphCompiler* compiler,
|
| - BranchInstr* branch);
|
| + virtual void EmitBranchCode(FlowGraphCompiler* compiler, BranchInstr* branch);
|
|
|
| virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler,
|
| BranchLabels labels);
|
| @@ -3085,8 +2949,7 @@ class TestSmiInstr : public TemplateComparison<2, NoThrow, Pure> {
|
| return kTagged;
|
| }
|
|
|
| - virtual void EmitBranchCode(FlowGraphCompiler* compiler,
|
| - BranchInstr* branch);
|
| + virtual void EmitBranchCode(FlowGraphCompiler* compiler, BranchInstr* branch);
|
|
|
| virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler,
|
| BranchLabels labels);
|
| @@ -3135,8 +2998,7 @@ class TestCidsInstr : public TemplateComparison<1, NoThrow, Pure> {
|
|
|
| virtual bool AttributesEqual(Instruction* other) const;
|
|
|
| - virtual void EmitBranchCode(FlowGraphCompiler* compiler,
|
| - BranchInstr* branch);
|
| + virtual void EmitBranchCode(FlowGraphCompiler* compiler, BranchInstr* branch);
|
|
|
| virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler,
|
| BranchLabels labels);
|
| @@ -3175,8 +3037,7 @@ class EqualityCompareInstr : public TemplateComparison<2, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual void EmitBranchCode(FlowGraphCompiler* compiler,
|
| - BranchInstr* branch);
|
| + virtual void EmitBranchCode(FlowGraphCompiler* compiler, BranchInstr* branch);
|
|
|
| virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler,
|
| BranchLabels labels);
|
| @@ -3218,8 +3079,7 @@ class RelationalOpInstr : public TemplateComparison<2, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual void EmitBranchCode(FlowGraphCompiler* compiler,
|
| - BranchInstr* branch);
|
| + virtual void EmitBranchCode(FlowGraphCompiler* compiler, BranchInstr* branch);
|
|
|
| virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler,
|
| BranchLabels labels);
|
| @@ -3242,9 +3102,7 @@ class RelationalOpInstr : public TemplateComparison<2, NoThrow, Pure> {
|
| // materialization of true and false constants.
|
| class IfThenElseInstr : public Definition {
|
| public:
|
| - IfThenElseInstr(ComparisonInstr* comparison,
|
| - Value* if_true,
|
| - Value* if_false)
|
| + IfThenElseInstr(ComparisonInstr* comparison, Value* if_true, Value* if_false)
|
| : Definition(Thread::Current()->GetNextDeoptId()),
|
| comparison_(comparison),
|
| if_true_(Smi::Cast(if_true->BoundConstant()).Value()),
|
| @@ -3266,9 +3124,7 @@ class IfThenElseInstr : public Definition {
|
|
|
| Value* InputAt(intptr_t i) const { return comparison()->InputAt(i); }
|
|
|
| - virtual bool CanDeoptimize() const {
|
| - return comparison()->CanDeoptimize();
|
| - }
|
| + virtual bool CanDeoptimize() const { return comparison()->CanDeoptimize(); }
|
|
|
| virtual bool CanBecomeDeoptimizationTarget() const {
|
| return comparison()->CanBecomeDeoptimizationTarget();
|
| @@ -3339,7 +3195,7 @@ class StaticCallInstr : public TemplateDefinition<0, Throws> {
|
| ic_data_ = GetICData(ic_data_array);
|
| ASSERT(function.IsZoneHandle());
|
| ASSERT(!function.IsNull());
|
| - ASSERT(argument_names.IsZoneHandle() || argument_names.InVMHeap());
|
| + ASSERT(argument_names.IsZoneHandle() || argument_names.InVMHeap());
|
| }
|
|
|
| StaticCallInstr(TokenPosition token_pos,
|
| @@ -3358,14 +3214,12 @@ class StaticCallInstr : public TemplateDefinition<0, Throws> {
|
| identity_(AliasIdentity::Unknown()) {
|
| ASSERT(function.IsZoneHandle());
|
| ASSERT(!function.IsNull());
|
| - ASSERT(argument_names.IsZoneHandle() || argument_names.InVMHeap());
|
| + ASSERT(argument_names.IsZoneHandle() || argument_names.InVMHeap());
|
| }
|
|
|
| // ICData for static calls carries call count.
|
| const ICData* ic_data() const { return ic_data_; }
|
| - bool HasICData() const {
|
| - return (ic_data() != NULL) && !ic_data()->IsNull();
|
| - }
|
| + bool HasICData() const { return (ic_data() != NULL) && !ic_data()->IsNull(); }
|
|
|
| DECLARE_INSTRUCTION(StaticCall)
|
| virtual CompileType ComputeType() const;
|
| @@ -3402,9 +3256,7 @@ class StaticCallInstr : public TemplateDefinition<0, Throws> {
|
| is_known_list_constructor_ = value;
|
| }
|
|
|
| - bool IsRecognizedFactory() const {
|
| - return is_known_list_constructor();
|
| - }
|
| + bool IsRecognizedFactory() const { return is_known_list_constructor(); }
|
|
|
| virtual AliasIdentity Identity() const { return identity_; }
|
| virtual void SetIdentity(AliasIdentity identity) { identity_ = identity; }
|
| @@ -3430,9 +3282,8 @@ class StaticCallInstr : public TemplateDefinition<0, Throws> {
|
|
|
| class LoadLocalInstr : public TemplateDefinition<0, NoThrow> {
|
| public:
|
| - LoadLocalInstr(const LocalVariable& local,
|
| - TokenPosition token_pos)
|
| - : local_(local), is_last_(false), token_pos_(token_pos) { }
|
| + LoadLocalInstr(const LocalVariable& local, TokenPosition token_pos)
|
| + : local_(local), is_last_(false), token_pos_(token_pos) {}
|
|
|
| DECLARE_INSTRUCTION(LoadLocal)
|
| virtual CompileType ComputeType() const;
|
| @@ -3497,16 +3348,12 @@ class DropTempsInstr : public Definition {
|
| return false;
|
| }
|
|
|
| - virtual TokenPosition token_pos() const {
|
| - return TokenPosition::kTempMove;
|
| - }
|
| + virtual TokenPosition token_pos() const { return TokenPosition::kTempMove; }
|
|
|
| PRINT_OPERANDS_TO_SUPPORT
|
|
|
| private:
|
| - virtual void RawSetInputAt(intptr_t i, Value* value) {
|
| - value_ = value;
|
| - }
|
| + virtual void RawSetInputAt(intptr_t i, Value* value) { value_ = value; }
|
|
|
| const intptr_t num_temps_;
|
| Value* value_;
|
| @@ -3565,7 +3412,7 @@ class NativeCallInstr : public TemplateDefinition<0, Throws> {
|
| native_c_function_(NULL),
|
| is_bootstrap_native_(false),
|
| link_lazily_(node->link_lazily()),
|
| - token_pos_(node->token_pos()) { }
|
| + token_pos_(node->token_pos()) {}
|
|
|
| NativeCallInstr(const String* name,
|
| const Function* function,
|
| @@ -3576,7 +3423,7 @@ class NativeCallInstr : public TemplateDefinition<0, Throws> {
|
| native_c_function_(NULL),
|
| is_bootstrap_native_(false),
|
| link_lazily_(link_lazily),
|
| - token_pos_(position) { }
|
| + token_pos_(position) {}
|
|
|
| DECLARE_INSTRUCTION(NativeCall)
|
|
|
| @@ -3615,11 +3462,8 @@ class NativeCallInstr : public TemplateDefinition<0, Throws> {
|
|
|
| class DebugStepCheckInstr : public TemplateInstruction<0, NoThrow> {
|
| public:
|
| - DebugStepCheckInstr(TokenPosition token_pos,
|
| - RawPcDescriptors::Kind stub_kind)
|
| - : token_pos_(token_pos),
|
| - stub_kind_(stub_kind) {
|
| - }
|
| + DebugStepCheckInstr(TokenPosition token_pos, RawPcDescriptors::Kind stub_kind)
|
| + : token_pos_(token_pos), stub_kind_(stub_kind) {}
|
|
|
| DECLARE_INSTRUCTION(DebugStepCheck)
|
|
|
| @@ -3636,10 +3480,7 @@ class DebugStepCheckInstr : public TemplateInstruction<0, NoThrow> {
|
| };
|
|
|
|
|
| -enum StoreBarrierType {
|
| - kNoStoreBarrier,
|
| - kEmitStoreBarrier
|
| -};
|
| +enum StoreBarrierType { kNoStoreBarrier, kEmitStoreBarrier };
|
|
|
|
|
| class StoreInstanceFieldInstr : public TemplateDefinition<2, NoThrow> {
|
| @@ -3677,10 +3518,7 @@ class StoreInstanceFieldInstr : public TemplateDefinition<2, NoThrow> {
|
|
|
| void set_is_initialization(bool value) { is_initialization_ = value; }
|
|
|
| - enum {
|
| - kInstancePos = 0,
|
| - kValuePos = 1
|
| - };
|
| + enum { kInstancePos = 0, kValuePos = 1 };
|
|
|
| Value* instance() const { return inputs_[kInstancePos]; }
|
| Value* value() const { return inputs_[kValuePos]; }
|
| @@ -3692,16 +3530,14 @@ class StoreInstanceFieldInstr : public TemplateDefinition<2, NoThrow> {
|
| intptr_t offset_in_bytes() const { return offset_in_bytes_; }
|
|
|
| bool ShouldEmitStoreBarrier() const {
|
| - return value()->NeedsStoreBuffer()
|
| - && (emit_store_barrier_ == kEmitStoreBarrier);
|
| + return value()->NeedsStoreBuffer() &&
|
| + (emit_store_barrier_ == kEmitStoreBarrier);
|
| }
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| // May require a deoptimization target for input conversions.
|
| - virtual intptr_t DeoptimizationTarget() const {
|
| - return GetDeoptId();
|
| - }
|
| + virtual intptr_t DeoptimizationTarget() const { return GetDeoptId(); }
|
|
|
| // Currently CSE/LICM don't operate on any instructions that can be affected
|
| // by stores/loads. LoadOptimizer handles loads separately. Hence stores
|
| @@ -3739,11 +3575,8 @@ class StoreInstanceFieldInstr : public TemplateDefinition<2, NoThrow> {
|
|
|
| class GuardFieldInstr : public TemplateInstruction<1, NoThrow, Pure> {
|
| public:
|
| - GuardFieldInstr(Value* value,
|
| - const Field& field,
|
| - intptr_t deopt_id)
|
| - : TemplateInstruction(deopt_id),
|
| - field_(field) {
|
| + GuardFieldInstr(Value* value, const Field& field, intptr_t deopt_id)
|
| + : TemplateInstruction(deopt_id), field_(field) {
|
| SetInputAt(0, value);
|
| CheckField(field);
|
| }
|
| @@ -3769,9 +3602,7 @@ class GuardFieldInstr : public TemplateInstruction<1, NoThrow, Pure> {
|
|
|
| class GuardFieldClassInstr : public GuardFieldInstr {
|
| public:
|
| - GuardFieldClassInstr(Value* value,
|
| - const Field& field,
|
| - intptr_t deopt_id)
|
| + GuardFieldClassInstr(Value* value, const Field& field, intptr_t deopt_id)
|
| : GuardFieldInstr(value, field, deopt_id) {
|
| CheckField(field);
|
| }
|
| @@ -3789,9 +3620,7 @@ class GuardFieldClassInstr : public GuardFieldInstr {
|
|
|
| class GuardFieldLengthInstr : public GuardFieldInstr {
|
| public:
|
| - GuardFieldLengthInstr(Value* value,
|
| - const Field& field,
|
| - intptr_t deopt_id)
|
| + GuardFieldLengthInstr(Value* value, const Field& field, intptr_t deopt_id)
|
| : GuardFieldInstr(value, field, deopt_id) {
|
| CheckField(field);
|
| }
|
| @@ -3845,16 +3674,13 @@ class StoreStaticFieldInstr : public TemplateDefinition<1, NoThrow> {
|
| StoreStaticFieldInstr(const Field& field,
|
| Value* value,
|
| TokenPosition token_pos)
|
| - : field_(field),
|
| - token_pos_(token_pos) {
|
| + : field_(field), token_pos_(token_pos) {
|
| ASSERT(field.IsZoneHandle());
|
| SetInputAt(kValuePos, value);
|
| CheckField(field);
|
| }
|
|
|
| - enum {
|
| - kValuePos = 0
|
| - };
|
| + enum { kValuePos = 0 };
|
|
|
| DECLARE_INSTRUCTION(StoreStaticField)
|
|
|
| @@ -4026,9 +3852,7 @@ class OneByteStringFromCharCodeInstr
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual bool AttributesEqual(Instruction* other) const {
|
| - return true;
|
| - }
|
| + virtual bool AttributesEqual(Instruction* other) const { return true; }
|
|
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(OneByteStringFromCharCodeInstr);
|
| @@ -4104,11 +3928,7 @@ class StoreIndexedInstr : public TemplateDefinition<3, NoThrow> {
|
| TokenPosition token_pos);
|
| DECLARE_INSTRUCTION(StoreIndexed)
|
|
|
| - enum {
|
| - kArrayPos = 0,
|
| - kIndexPos = 1,
|
| - kValuePos = 2
|
| - };
|
| + enum { kArrayPos = 0, kIndexPos = 1, kValuePos = 2 };
|
|
|
| Value* array() const { return inputs_[kArrayPos]; }
|
| Value* index() const { return inputs_[kIndexPos]; }
|
| @@ -4119,8 +3939,8 @@ class StoreIndexedInstr : public TemplateDefinition<3, NoThrow> {
|
| bool aligned() const { return alignment_ == kAlignedAccess; }
|
|
|
| bool ShouldEmitStoreBarrier() const {
|
| - return value()->NeedsStoreBuffer()
|
| - && (emit_store_barrier_ == kEmitStoreBarrier);
|
| + return value()->NeedsStoreBuffer() &&
|
| + (emit_store_barrier_ == kEmitStoreBarrier);
|
| }
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
| @@ -4153,9 +3973,7 @@ class StoreIndexedInstr : public TemplateDefinition<3, NoThrow> {
|
| // Note overrideable, built-in: value ? false : true.
|
| class BooleanNegateInstr : public TemplateDefinition<1, NoThrow> {
|
| public:
|
| - explicit BooleanNegateInstr(Value* value) {
|
| - SetInputAt(0, value);
|
| - }
|
| + explicit BooleanNegateInstr(Value* value) { SetInputAt(0, value); }
|
|
|
| DECLARE_INSTRUCTION(BooleanNegate)
|
| virtual CompileType ComputeType() const;
|
| @@ -4344,29 +4162,20 @@ class MaterializeObjectInstr : public Definition {
|
| Definition* allocation() const { return allocation_; }
|
| const Class& cls() const { return cls_; }
|
|
|
| - intptr_t num_variables() const {
|
| - return num_variables_;
|
| - }
|
| + intptr_t num_variables() const { return num_variables_; }
|
|
|
| intptr_t FieldOffsetAt(intptr_t i) const {
|
| - return slots_[i]->IsField()
|
| - ? Field::Cast(*slots_[i]).Offset()
|
| - : Smi::Cast(*slots_[i]).Value();
|
| + return slots_[i]->IsField() ? Field::Cast(*slots_[i]).Offset()
|
| + : Smi::Cast(*slots_[i]).Value();
|
| }
|
|
|
| - const Location& LocationAt(intptr_t i) {
|
| - return locations_[i];
|
| - }
|
| + const Location& LocationAt(intptr_t i) { return locations_[i]; }
|
|
|
| DECLARE_INSTRUCTION(MaterializeObject)
|
|
|
| - virtual intptr_t InputCount() const {
|
| - return values_->length();
|
| - }
|
| + virtual intptr_t InputCount() const { return values_->length(); }
|
|
|
| - virtual Value* InputAt(intptr_t i) const {
|
| - return (*values_)[i];
|
| - }
|
| + virtual Value* InputAt(intptr_t i) const { return (*values_)[i]; }
|
|
|
| // SelectRepresentations pass is run once more while MaterializeObject
|
| // instructions are still in the graph. To avoid any redundant boxing
|
| @@ -4386,13 +4195,10 @@ class MaterializeObjectInstr : public Definition {
|
|
|
| virtual bool MayThrow() const { return false; }
|
|
|
| - void RemapRegisters(intptr_t* cpu_reg_slots,
|
| - intptr_t* fpu_reg_slots);
|
| + void RemapRegisters(intptr_t* cpu_reg_slots, intptr_t* fpu_reg_slots);
|
|
|
| bool was_visited_for_liveness() const { return visited_for_liveness_; }
|
| - void mark_visited_for_liveness() {
|
| - visited_for_liveness_ = true;
|
| - }
|
| + void mark_visited_for_liveness() { visited_for_liveness_ = true; }
|
|
|
| PRINT_OPERANDS_TO_SUPPORT
|
|
|
| @@ -4422,15 +4228,12 @@ class CreateArrayInstr : public TemplateDefinition<2, Throws> {
|
| Value* num_elements)
|
| : TemplateDefinition(Thread::Current()->GetNextDeoptId()),
|
| token_pos_(token_pos),
|
| - identity_(AliasIdentity::Unknown()) {
|
| + identity_(AliasIdentity::Unknown()) {
|
| SetInputAt(kElementTypePos, element_type);
|
| SetInputAt(kLengthPos, num_elements);
|
| }
|
|
|
| - enum {
|
| - kElementTypePos = 0,
|
| - kLengthPos = 1
|
| - };
|
| + enum { kElementTypePos = 0, kLengthPos = 1 };
|
|
|
| DECLARE_INSTRUCTION(CreateArray)
|
| virtual CompileType ComputeType() const;
|
| @@ -4467,9 +4270,7 @@ class LoadUntaggedInstr : public TemplateDefinition<1, NoThrow> {
|
| SetInputAt(0, object);
|
| }
|
|
|
| - virtual Representation representation() const {
|
| - return kUntagged;
|
| - }
|
| + virtual Representation representation() const { return kUntagged; }
|
| DECLARE_INSTRUCTION(LoadUntagged)
|
| virtual CompileType ComputeType() const;
|
|
|
| @@ -4496,13 +4297,9 @@ class LoadUntaggedInstr : public TemplateDefinition<1, NoThrow> {
|
|
|
| class LoadClassIdInstr : public TemplateDefinition<1, NoThrow> {
|
| public:
|
| - explicit LoadClassIdInstr(Value* object) {
|
| - SetInputAt(0, object);
|
| - }
|
| + explicit LoadClassIdInstr(Value* object) { SetInputAt(0, object); }
|
|
|
| - virtual Representation representation() const {
|
| - return kTagged;
|
| - }
|
| + virtual Representation representation() const { return kTagged; }
|
| DECLARE_INSTRUCTION(LoadClassId)
|
| virtual CompileType ComputeType() const;
|
|
|
| @@ -4579,9 +4376,7 @@ class LoadFieldInstr : public TemplateDefinition<1, NoThrow> {
|
| recognized_kind_ = kind;
|
| }
|
|
|
| - MethodRecognizer::Kind recognized_kind() const {
|
| - return recognized_kind_;
|
| - }
|
| + MethodRecognizer::Kind recognized_kind() const { return recognized_kind_; }
|
|
|
| DECLARE_INSTRUCTION(LoadField)
|
| virtual CompileType ComputeType() const;
|
| @@ -4636,8 +4431,7 @@ class InstantiateTypeInstr : public TemplateDefinition<1, Throws> {
|
| DECLARE_INSTRUCTION(InstantiateType)
|
|
|
| Value* instantiator() const { return inputs_[0]; }
|
| - const AbstractType& type() const { return type_;
|
| - }
|
| + const AbstractType& type() const { return type_; }
|
| const Class& instantiator_class() const { return instantiator_class_; }
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
|
|
| @@ -4673,9 +4467,7 @@ class InstantiateTypeArgumentsInstr : public TemplateDefinition<1, Throws> {
|
| DECLARE_INSTRUCTION(InstantiateTypeArguments)
|
|
|
| Value* instantiator() const { return inputs_[0]; }
|
| - const TypeArguments& type_arguments() const {
|
| - return type_arguments_;
|
| - }
|
| + const TypeArguments& type_arguments() const { return type_arguments_; }
|
| const Class& instantiator_class() const { return instantiator_class_; }
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
|
|
| @@ -4698,10 +4490,8 @@ class InstantiateTypeArgumentsInstr : public TemplateDefinition<1, Throws> {
|
|
|
| class AllocateContextInstr : public TemplateDefinition<0, NoThrow> {
|
| public:
|
| - AllocateContextInstr(TokenPosition token_pos,
|
| - intptr_t num_context_variables)
|
| - : token_pos_(token_pos),
|
| - num_context_variables_(num_context_variables) { }
|
| + AllocateContextInstr(TokenPosition token_pos, intptr_t num_context_variables)
|
| + : token_pos_(token_pos), num_context_variables_(num_context_variables) {}
|
|
|
| DECLARE_INSTRUCTION(AllocateContext)
|
| virtual CompileType ComputeType() const;
|
| @@ -4732,9 +4522,7 @@ class InitStaticFieldInstr : public TemplateInstruction<1, Throws> {
|
| CheckField(field);
|
| }
|
|
|
| - virtual TokenPosition token_pos() const {
|
| - return field_.token_pos();
|
| - }
|
| + virtual TokenPosition token_pos() const { return field_.token_pos(); }
|
| const Field& field() const { return field_; }
|
|
|
| DECLARE_INSTRUCTION(InitStaticField)
|
| @@ -4874,9 +4662,7 @@ class BoxInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| virtual CompileType ComputeType() const;
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
| - virtual intptr_t DeoptimizationTarget() const {
|
| - return Thread::kNoDeoptId;
|
| - }
|
| + virtual intptr_t DeoptimizationTarget() const { return Thread::kNoDeoptId; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -4889,9 +4675,7 @@ class BoxInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| Definition* Canonicalize(FlowGraph* flow_graph);
|
|
|
| - virtual TokenPosition token_pos() const {
|
| - return TokenPosition::kBox;
|
| - }
|
| + virtual TokenPosition token_pos() const { return TokenPosition::kBox; }
|
|
|
| protected:
|
| BoxInstr(Representation from_representation, Value* value)
|
| @@ -4913,7 +4697,7 @@ class BoxInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| class BoxIntegerInstr : public BoxInstr {
|
| public:
|
| BoxIntegerInstr(Representation representation, Value* value)
|
| - : BoxInstr(representation, value) { }
|
| + : BoxInstr(representation, value) {}
|
|
|
| virtual bool ValueFitsSmi() const;
|
|
|
| @@ -4934,7 +4718,7 @@ class BoxIntegerInstr : public BoxInstr {
|
| class BoxInteger32Instr : public BoxIntegerInstr {
|
| public:
|
| BoxInteger32Instr(Representation representation, Value* value)
|
| - : BoxIntegerInstr(representation, value) { }
|
| + : BoxIntegerInstr(representation, value) {}
|
|
|
| DECLARE_INSTRUCTION_BACKEND()
|
|
|
| @@ -4946,7 +4730,7 @@ class BoxInteger32Instr : public BoxIntegerInstr {
|
| class BoxInt32Instr : public BoxInteger32Instr {
|
| public:
|
| explicit BoxInt32Instr(Value* value)
|
| - : BoxInteger32Instr(kUnboxedInt32, value) { }
|
| + : BoxInteger32Instr(kUnboxedInt32, value) {}
|
|
|
| DECLARE_INSTRUCTION_NO_BACKEND(BoxInt32)
|
|
|
| @@ -4958,7 +4742,7 @@ class BoxInt32Instr : public BoxInteger32Instr {
|
| class BoxUint32Instr : public BoxInteger32Instr {
|
| public:
|
| explicit BoxUint32Instr(Value* value)
|
| - : BoxInteger32Instr(kUnboxedUint32, value) { }
|
| + : BoxInteger32Instr(kUnboxedUint32, value) {}
|
|
|
| DECLARE_INSTRUCTION_NO_BACKEND(BoxUint32)
|
|
|
| @@ -4969,8 +4753,7 @@ class BoxUint32Instr : public BoxInteger32Instr {
|
|
|
| class BoxInt64Instr : public BoxIntegerInstr {
|
| public:
|
| - explicit BoxInt64Instr(Value* value)
|
| - : BoxIntegerInstr(kUnboxedMint, value) { }
|
| + explicit BoxInt64Instr(Value* value) : BoxIntegerInstr(kUnboxedMint, value) {}
|
|
|
| virtual Definition* Canonicalize(FlowGraph* flow_graph);
|
|
|
| @@ -4990,17 +4773,14 @@ class UnboxInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| virtual bool CanDeoptimize() const {
|
| const intptr_t value_cid = value()->Type()->ToCid();
|
|
|
| - if (CanConvertSmi() &&
|
| - (value()->Type()->ToCid() == kSmiCid)) {
|
| + if (CanConvertSmi() && (value()->Type()->ToCid() == kSmiCid)) {
|
| return false;
|
| }
|
|
|
| return (value_cid != BoxCid());
|
| }
|
|
|
| - virtual Representation representation() const {
|
| - return representation_;
|
| - }
|
| + virtual Representation representation() const { return representation_; }
|
|
|
| DECLARE_INSTRUCTION(Unbox)
|
| virtual CompileType ComputeType() const;
|
| @@ -5011,20 +4791,13 @@ class UnboxInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| Definition* Canonicalize(FlowGraph* flow_graph);
|
|
|
| - virtual intptr_t DeoptimizationTarget() const {
|
| - return GetDeoptId();
|
| - }
|
| + virtual intptr_t DeoptimizationTarget() const { return GetDeoptId(); }
|
|
|
| - virtual TokenPosition token_pos() const {
|
| - return TokenPosition::kBox;
|
| - }
|
| + virtual TokenPosition token_pos() const { return TokenPosition::kBox; }
|
|
|
| protected:
|
| - UnboxInstr(Representation representation,
|
| - Value* value,
|
| - intptr_t deopt_id)
|
| - : TemplateDefinition(deopt_id),
|
| - representation_(representation) {
|
| + UnboxInstr(Representation representation, Value* value, intptr_t deopt_id)
|
| + : TemplateDefinition(deopt_id), representation_(representation) {
|
| SetInputAt(0, value);
|
| }
|
|
|
| @@ -5033,13 +4806,9 @@ class UnboxInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| void EmitLoadFromBox(FlowGraphCompiler* compiler);
|
| void EmitSmiConversion(FlowGraphCompiler* compiler);
|
|
|
| - intptr_t BoxCid() const {
|
| - return Boxing::BoxCid(representation_);
|
| - }
|
| + intptr_t BoxCid() const { return Boxing::BoxCid(representation_); }
|
|
|
| - intptr_t ValueOffset() const {
|
| - return Boxing::ValueOffset(representation_);
|
| - }
|
| + intptr_t ValueOffset() const { return Boxing::ValueOffset(representation_); }
|
|
|
| const Representation representation_;
|
|
|
| @@ -5056,8 +4825,7 @@ class UnboxIntegerInstr : public UnboxInstr {
|
| Value* value,
|
| intptr_t deopt_id)
|
| : UnboxInstr(representation, value, deopt_id),
|
| - is_truncating_(truncation_mode == kTruncate) {
|
| - }
|
| + is_truncating_(truncation_mode == kTruncate) {}
|
|
|
| bool is_truncating() const { return is_truncating_; }
|
|
|
| @@ -5066,7 +4834,7 @@ class UnboxIntegerInstr : public UnboxInstr {
|
| virtual bool AttributesEqual(Instruction* other) const {
|
| UnboxIntegerInstr* other_unbox = other->AsUnboxInteger();
|
| return UnboxInstr::AttributesEqual(other) &&
|
| - (other_unbox->is_truncating_ == is_truncating_);
|
| + (other_unbox->is_truncating_ == is_truncating_);
|
| }
|
|
|
| virtual Definition* Canonicalize(FlowGraph* flow_graph);
|
| @@ -5088,7 +4856,7 @@ class UnboxInteger32Instr : public UnboxIntegerInstr {
|
| TruncationMode truncation_mode,
|
| Value* value,
|
| intptr_t deopt_id)
|
| - : UnboxIntegerInstr(representation, truncation_mode, value, deopt_id) { }
|
| + : UnboxIntegerInstr(representation, truncation_mode, value, deopt_id) {}
|
|
|
| DECLARE_INSTRUCTION_BACKEND()
|
|
|
| @@ -5120,8 +4888,7 @@ class UnboxInt32Instr : public UnboxInteger32Instr {
|
| UnboxInt32Instr(TruncationMode truncation_mode,
|
| Value* value,
|
| intptr_t deopt_id)
|
| - : UnboxInteger32Instr(kUnboxedInt32, truncation_mode, value, deopt_id) {
|
| - }
|
| + : UnboxInteger32Instr(kUnboxedInt32, truncation_mode, value, deopt_id) {}
|
|
|
| virtual bool CanDeoptimize() const;
|
|
|
| @@ -5139,8 +4906,7 @@ class UnboxInt32Instr : public UnboxInteger32Instr {
|
| class UnboxInt64Instr : public UnboxIntegerInstr {
|
| public:
|
| UnboxInt64Instr(Value* value, intptr_t deopt_id)
|
| - : UnboxIntegerInstr(kUnboxedMint, kNoTruncation, value, deopt_id) {
|
| - }
|
| + : UnboxIntegerInstr(kUnboxedMint, kNoTruncation, value, deopt_id) {}
|
|
|
| virtual void InferRange(RangeAnalysis* analysis, Range* range);
|
|
|
| @@ -5152,12 +4918,8 @@ class UnboxInt64Instr : public UnboxIntegerInstr {
|
|
|
|
|
| bool Definition::IsMintDefinition() {
|
| - return (Type()->ToCid() == kMintCid) ||
|
| - IsBinaryMintOp() ||
|
| - IsUnaryMintOp() ||
|
| - IsShiftMintOp() ||
|
| - IsBoxInt64() ||
|
| - IsUnboxInt64();
|
| + return (Type()->ToCid() == kMintCid) || IsBinaryMintOp() || IsUnaryMintOp() ||
|
| + IsShiftMintOp() || IsBoxInt64() || IsUnboxInt64();
|
| }
|
|
|
|
|
| @@ -5178,9 +4940,7 @@ class MathUnaryInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedDouble;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -5222,13 +4982,12 @@ class MathUnaryInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| class CaseInsensitiveCompareUC16Instr
|
| : public TemplateDefinition<4, NoThrow, Pure> {
|
| public:
|
| - CaseInsensitiveCompareUC16Instr(
|
| - Value* str,
|
| - Value* lhs_index,
|
| - Value* rhs_index,
|
| - Value* length,
|
| - intptr_t cid)
|
| - : cid_(cid) {
|
| + CaseInsensitiveCompareUC16Instr(Value* str,
|
| + Value* lhs_index,
|
| + Value* rhs_index,
|
| + Value* length,
|
| + intptr_t cid)
|
| + : cid_(cid) {
|
| ASSERT(cid == kTwoByteStringCid || cid == kExternalTwoByteStringCid);
|
| ASSERT(index_scale() == 2);
|
| SetInputAt(0, str);
|
| @@ -5249,9 +5008,7 @@ class CaseInsensitiveCompareUC16Instr
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kTagged;
|
| - }
|
| + virtual Representation representation() const { return kTagged; }
|
|
|
| DECLARE_INSTRUCTION(CaseInsensitiveCompareUC16)
|
| virtual CompileType ComputeType() const;
|
| @@ -5333,9 +5090,7 @@ class BinaryDoubleOpInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
| Value* right,
|
| intptr_t deopt_id,
|
| TokenPosition token_pos)
|
| - : TemplateDefinition(deopt_id),
|
| - op_kind_(op_kind),
|
| - token_pos_(token_pos) {
|
| + : TemplateDefinition(deopt_id), op_kind_(op_kind), token_pos_(token_pos) {
|
| SetInputAt(0, left);
|
| SetInputAt(1, right);
|
| }
|
| @@ -5349,9 +5104,7 @@ class BinaryDoubleOpInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedDouble;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1));
|
| @@ -5389,8 +5142,7 @@ class DoubleTestOpInstr : public TemplateComparison<1, NoThrow, Pure> {
|
| Value* value,
|
| intptr_t deopt_id,
|
| TokenPosition token_pos)
|
| - : TemplateComparison(token_pos, Token::kEQ, deopt_id),
|
| - op_kind_(op_kind) {
|
| + : TemplateComparison(token_pos, Token::kEQ, deopt_id), op_kind_(op_kind) {
|
| SetInputAt(0, value);
|
| }
|
|
|
| @@ -5413,14 +5165,13 @@ class DoubleTestOpInstr : public TemplateComparison<1, NoThrow, Pure> {
|
| virtual Definition* Canonicalize(FlowGraph* flow_graph);
|
|
|
| virtual bool AttributesEqual(Instruction* other) const {
|
| - return op_kind_ == other->AsDoubleTestOp()->op_kind()
|
| - && ComparisonInstr::AttributesEqual(other);
|
| + return op_kind_ == other->AsDoubleTestOp()->op_kind() &&
|
| + ComparisonInstr::AttributesEqual(other);
|
| }
|
|
|
| virtual ComparisonInstr* CopyWithNewOperands(Value* left, Value* right);
|
|
|
| - virtual void EmitBranchCode(FlowGraphCompiler* compiler,
|
| - BranchInstr* branch);
|
| + virtual void EmitBranchCode(FlowGraphCompiler* compiler, BranchInstr* branch);
|
|
|
| virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler,
|
| BranchLabels labels);
|
| @@ -5450,9 +5201,7 @@ class BinaryFloat32x4OpInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1));
|
| @@ -5483,7 +5232,8 @@ class BinaryFloat32x4OpInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| class Simd32x4ShuffleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| public:
|
| - Simd32x4ShuffleInstr(MethodRecognizer::Kind op_kind, Value* value,
|
| + Simd32x4ShuffleInstr(MethodRecognizer::Kind op_kind,
|
| + Value* value,
|
| intptr_t mask,
|
| intptr_t deopt_id)
|
| : TemplateDefinition(deopt_id), op_kind_(op_kind), mask_(mask) {
|
| @@ -5551,8 +5301,11 @@ class Simd32x4ShuffleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| class Simd32x4ShuffleMixInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
| public:
|
| - Simd32x4ShuffleMixInstr(MethodRecognizer::Kind op_kind, Value* xy,
|
| - Value* zw, intptr_t mask, intptr_t deopt_id)
|
| + Simd32x4ShuffleMixInstr(MethodRecognizer::Kind op_kind,
|
| + Value* xy,
|
| + Value* zw,
|
| + intptr_t mask,
|
| + intptr_t deopt_id)
|
| : TemplateDefinition(deopt_id), op_kind_(op_kind), mask_(mask) {
|
| SetInputAt(0, xy);
|
| SetInputAt(1, zw);
|
| @@ -5629,9 +5382,7 @@ class Float32x4ConstructorInstr : public TemplateDefinition<4, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx >= 0 && idx < 4);
|
| @@ -5667,9 +5418,7 @@ class Float32x4SplatInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -5697,13 +5446,11 @@ class Float32x4SplatInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| // TODO(vegorov) replace with UnboxedConstantInstr.
|
| class Float32x4ZeroInstr : public TemplateDefinition<0, NoThrow, Pure> {
|
| public:
|
| - Float32x4ZeroInstr() { }
|
| + Float32x4ZeroInstr() {}
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| DECLARE_INSTRUCTION(Float32x4Zero)
|
| virtual CompileType ComputeType() const;
|
| @@ -5733,9 +5480,7 @@ class Float32x4ComparisonInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedInt32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedInt32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1));
|
| @@ -5782,9 +5527,7 @@ class Float32x4MinMaxInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1));
|
| @@ -5831,9 +5574,7 @@ class Float32x4ScaleInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1));
|
| @@ -5880,9 +5621,7 @@ class Float32x4SqrtInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -5917,8 +5656,7 @@ class Float32x4ZeroArgInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| Float32x4ZeroArgInstr(MethodRecognizer::Kind op_kind,
|
| Value* left,
|
| intptr_t deopt_id)
|
| - : TemplateDefinition(deopt_id),
|
| - op_kind_(op_kind) {
|
| + : TemplateDefinition(deopt_id), op_kind_(op_kind) {
|
| SetInputAt(0, left);
|
| }
|
|
|
| @@ -5928,9 +5666,7 @@ class Float32x4ZeroArgInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -5977,9 +5713,7 @@ class Float32x4ClampInstr : public TemplateDefinition<3, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1) || (idx == 2));
|
| @@ -6010,8 +5744,7 @@ class Float32x4WithInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
| Value* left,
|
| Value* replacement,
|
| intptr_t deopt_id)
|
| - : TemplateDefinition(deopt_id),
|
| - op_kind_(op_kind) {
|
| + : TemplateDefinition(deopt_id), op_kind_(op_kind) {
|
| SetInputAt(0, replacement);
|
| SetInputAt(1, left);
|
| }
|
| @@ -6023,9 +5756,7 @@ class Float32x4WithInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1));
|
| @@ -6129,9 +5860,7 @@ class Float32x4ToInt32x4Instr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedInt32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedInt32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -6167,9 +5896,7 @@ class Float32x4ToFloat64x2Instr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat64x2;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat64x2; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -6205,9 +5932,7 @@ class Float64x2ToFloat32x4Instr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -6245,9 +5970,7 @@ class Float64x2ConstructorInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat64x2;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat64x2; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx >= 0 && idx < 2);
|
| @@ -6283,9 +6006,7 @@ class Float64x2SplatInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat64x2;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat64x2; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -6312,13 +6033,11 @@ class Float64x2SplatInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| class Float64x2ZeroInstr : public TemplateDefinition<0, NoThrow, Pure> {
|
| public:
|
| - Float64x2ZeroInstr() { }
|
| + Float64x2ZeroInstr() {}
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat64x2;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat64x2; }
|
|
|
| DECLARE_INSTRUCTION(Float64x2Zero)
|
| virtual CompileType ComputeType() const;
|
| @@ -6399,9 +6118,7 @@ class Float64x2OneArgInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat64x2;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat64x2; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| if (idx == 0) {
|
| @@ -6459,9 +6176,7 @@ class Int32x4ConstructorInstr : public TemplateDefinition<4, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedInt32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedInt32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx >= 0) && (idx < 4));
|
| @@ -6508,9 +6223,7 @@ class Int32x4BoolConstructorInstr
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedInt32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedInt32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx >= 0) && (idx < 4));
|
| @@ -6550,9 +6263,7 @@ class Int32x4GetFlagInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kTagged;
|
| - }
|
| + virtual Representation representation() const { return kTagged; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -6596,9 +6307,7 @@ class Simd32x4GetSignMaskInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kTagged;
|
| - }
|
| + virtual Representation representation() const { return kTagged; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -6649,9 +6358,7 @@ class Int32x4SelectInstr : public TemplateDefinition<3, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1) || (idx == 2));
|
| @@ -6697,9 +6404,7 @@ class Int32x4SetFlagInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedInt32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedInt32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1));
|
| @@ -6742,9 +6447,7 @@ class Int32x4ToFloat32x4Instr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -6772,9 +6475,9 @@ class Int32x4ToFloat32x4Instr : public TemplateDefinition<1, NoThrow, Pure> {
|
| class BinaryInt32x4OpInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
| public:
|
| BinaryInt32x4OpInstr(Token::Kind op_kind,
|
| - Value* left,
|
| - Value* right,
|
| - intptr_t deopt_id)
|
| + Value* left,
|
| + Value* right,
|
| + intptr_t deopt_id)
|
| : TemplateDefinition(deopt_id), op_kind_(op_kind) {
|
| SetInputAt(0, left);
|
| SetInputAt(1, right);
|
| @@ -6787,9 +6490,7 @@ class BinaryInt32x4OpInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedInt32x4;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedInt32x4; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1));
|
| @@ -6836,9 +6537,7 @@ class BinaryFloat64x2OpInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedFloat64x2;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedFloat64x2; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1));
|
| @@ -6869,12 +6568,9 @@ class BinaryFloat64x2OpInstr : public TemplateDefinition<2, NoThrow, Pure> {
|
|
|
| class UnaryIntegerOpInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| public:
|
| - UnaryIntegerOpInstr(Token::Kind op_kind,
|
| - Value* value,
|
| - intptr_t deopt_id)
|
| + UnaryIntegerOpInstr(Token::Kind op_kind, Value* value, intptr_t deopt_id)
|
| : TemplateDefinition(deopt_id), op_kind_(op_kind) {
|
| - ASSERT((op_kind == Token::kNEGATE) ||
|
| - (op_kind == Token::kBIT_NOT));
|
| + ASSERT((op_kind == Token::kNEGATE) || (op_kind == Token::kBIT_NOT));
|
| SetInputAt(0, value);
|
| }
|
|
|
| @@ -6911,9 +6607,7 @@ class UnaryIntegerOpInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| // Handles both Smi operations: BIT_OR and NEGATE.
|
| class UnarySmiOpInstr : public UnaryIntegerOpInstr {
|
| public:
|
| - UnarySmiOpInstr(Token::Kind op_kind,
|
| - Value* value,
|
| - intptr_t deopt_id)
|
| + UnarySmiOpInstr(Token::Kind op_kind, Value* value, intptr_t deopt_id)
|
| : UnaryIntegerOpInstr(op_kind, value, deopt_id) {}
|
|
|
| virtual bool CanDeoptimize() const { return op_kind() == Token::kNEGATE; }
|
| @@ -6929,9 +6623,7 @@ class UnarySmiOpInstr : public UnaryIntegerOpInstr {
|
|
|
| class UnaryUint32OpInstr : public UnaryIntegerOpInstr {
|
| public:
|
| - UnaryUint32OpInstr(Token::Kind op_kind,
|
| - Value* value,
|
| - intptr_t deopt_id)
|
| + UnaryUint32OpInstr(Token::Kind op_kind, Value* value, intptr_t deopt_id)
|
| : UnaryIntegerOpInstr(op_kind, value, deopt_id) {
|
| ASSERT(op_kind == Token::kBIT_NOT);
|
| }
|
| @@ -6940,9 +6632,7 @@ class UnaryUint32OpInstr : public UnaryIntegerOpInstr {
|
|
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedUint32;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedUint32; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -6963,15 +6653,11 @@ class UnaryMintOpInstr : public UnaryIntegerOpInstr {
|
| ASSERT(op_kind == Token::kBIT_NOT);
|
| }
|
|
|
| - virtual bool CanDeoptimize() const {
|
| - return false;
|
| - }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedMint;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedMint; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -6991,9 +6677,7 @@ class CheckedSmiOpInstr : public TemplateDefinition<2, Throws> {
|
| Value* left,
|
| Value* right,
|
| InstanceCallInstr* call)
|
| - : TemplateDefinition(call->deopt_id()),
|
| - call_(call),
|
| - op_kind_(op_kind) {
|
| + : TemplateDefinition(call->deopt_id()), call_(call), op_kind_(op_kind) {
|
| SetInputAt(0, left);
|
| SetInputAt(1, right);
|
| }
|
| @@ -7052,8 +6736,7 @@ class CheckedSmiComparisonInstr : public TemplateComparison<2, Throws> {
|
|
|
| DECLARE_INSTRUCTION(CheckedSmiComparison)
|
|
|
| - virtual void EmitBranchCode(FlowGraphCompiler* compiler,
|
| - BranchInstr* branch);
|
| + virtual void EmitBranchCode(FlowGraphCompiler* compiler, BranchInstr* branch);
|
|
|
| virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler,
|
| BranchLabels labels);
|
| @@ -7164,8 +6847,7 @@ class BinarySmiOpInstr : public BinaryIntegerOpInstr {
|
| Value* left,
|
| Value* right,
|
| intptr_t deopt_id)
|
| - : BinaryIntegerOpInstr(op_kind, left, right, deopt_id) {
|
| - }
|
| + : BinaryIntegerOpInstr(op_kind, left, right, deopt_id) {}
|
|
|
| virtual bool CanDeoptimize() const;
|
|
|
| @@ -7215,9 +6897,7 @@ class BinaryInt32OpInstr : public BinaryIntegerOpInstr {
|
|
|
| virtual bool CanDeoptimize() const;
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedInt32;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedInt32; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1));
|
| @@ -7244,13 +6924,9 @@ class BinaryUint32OpInstr : public BinaryIntegerOpInstr {
|
| mark_truncating();
|
| }
|
|
|
| - virtual bool CanDeoptimize() const {
|
| - return false;
|
| - }
|
| + virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedUint32;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedUint32; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1));
|
| @@ -7278,9 +6954,7 @@ class ShiftUint32OpInstr : public BinaryIntegerOpInstr {
|
|
|
| virtual bool CanDeoptimize() const { return true; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedUint32;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedUint32; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1));
|
| @@ -7302,18 +6976,15 @@ class BinaryMintOpInstr : public BinaryIntegerOpInstr {
|
| Value* left,
|
| Value* right,
|
| intptr_t deopt_id)
|
| - : BinaryIntegerOpInstr(op_kind, left, right, deopt_id) {
|
| - }
|
| + : BinaryIntegerOpInstr(op_kind, left, right, deopt_id) {}
|
|
|
| virtual bool CanDeoptimize() const {
|
| - return (can_overflow() && ((op_kind() == Token::kADD) ||
|
| - (op_kind() == Token::kSUB)))
|
| - || (op_kind() == Token::kMUL); // Deopt if inputs are not int32.
|
| + return (can_overflow() &&
|
| + ((op_kind() == Token::kADD) || (op_kind() == Token::kSUB))) ||
|
| + (op_kind() == Token::kMUL); // Deopt if inputs are not int32.
|
| }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedMint;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedMint; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1));
|
| @@ -7341,13 +7012,11 @@ class ShiftMintOpInstr : public BinaryIntegerOpInstr {
|
| }
|
|
|
| virtual bool CanDeoptimize() const {
|
| - return has_shift_count_check()
|
| - || (can_overflow() && (op_kind() == Token::kSHL));
|
| + return has_shift_count_check() ||
|
| + (can_overflow() && (op_kind() == Token::kSHL));
|
| }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedMint;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedMint; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((idx == 0) || (idx == 1));
|
| @@ -7369,9 +7038,7 @@ class ShiftMintOpInstr : public BinaryIntegerOpInstr {
|
| // Handles only NEGATE.
|
| class UnaryDoubleOpInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| public:
|
| - UnaryDoubleOpInstr(Token::Kind op_kind,
|
| - Value* value,
|
| - intptr_t deopt_id)
|
| + UnaryDoubleOpInstr(Token::Kind op_kind, Value* value, intptr_t deopt_id)
|
| : TemplateDefinition(deopt_id), op_kind_(op_kind) {
|
| ASSERT(op_kind == Token::kNEGATE);
|
| SetInputAt(0, value);
|
| @@ -7391,9 +7058,7 @@ class UnaryDoubleOpInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| return GetDeoptId();
|
| }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedDouble;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -7416,8 +7081,7 @@ class CheckStackOverflowInstr : public TemplateInstruction<0, NoThrow> {
|
| CheckStackOverflowInstr(TokenPosition token_pos, intptr_t loop_depth)
|
| : TemplateInstruction(Thread::Current()->GetNextDeoptId()),
|
| token_pos_(token_pos),
|
| - loop_depth_(loop_depth) {
|
| - }
|
| + loop_depth_(loop_depth) {}
|
|
|
| virtual TokenPosition token_pos() const { return token_pos_; }
|
| bool in_loop() const { return loop_depth_ > 0; }
|
| @@ -7453,9 +7117,7 @@ class SmiToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| DECLARE_INSTRUCTION(SmiToDouble)
|
| virtual CompileType ComputeType() const;
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedDouble;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| @@ -7470,9 +7132,7 @@ class SmiToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| class Int32ToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| public:
|
| - explicit Int32ToDoubleInstr(Value* value) {
|
| - SetInputAt(0, value);
|
| - }
|
| + explicit Int32ToDoubleInstr(Value* value) { SetInputAt(0, value); }
|
|
|
| Value* value() const { return inputs_[0]; }
|
|
|
| @@ -7484,9 +7144,7 @@ class Int32ToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| return kUnboxedInt32;
|
| }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedDouble;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| @@ -7514,9 +7172,7 @@ class MintToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| return kUnboxedMint;
|
| }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedDouble;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| virtual intptr_t DeoptimizationTarget() const {
|
| // Direct access since this instruction cannot deoptimize, and the deopt-id
|
| @@ -7594,8 +7250,7 @@ class DoubleToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| DoubleToDoubleInstr(Value* value,
|
| MethodRecognizer::Kind recognized_kind,
|
| intptr_t deopt_id)
|
| - : TemplateDefinition(deopt_id),
|
| - recognized_kind_(recognized_kind) {
|
| + : TemplateDefinition(deopt_id), recognized_kind_(recognized_kind) {
|
| SetInputAt(0, value);
|
| }
|
|
|
| @@ -7608,9 +7263,7 @@ class DoubleToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedDouble;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -7630,7 +7283,7 @@ class DoubleToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| };
|
|
|
|
|
| -class DoubleToFloatInstr: public TemplateDefinition<1, NoThrow, Pure> {
|
| +class DoubleToFloatInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| public:
|
| DoubleToFloatInstr(Value* value, intptr_t deopt_id)
|
| : TemplateDefinition(deopt_id) {
|
| @@ -7669,7 +7322,7 @@ class DoubleToFloatInstr: public TemplateDefinition<1, NoThrow, Pure> {
|
| };
|
|
|
|
|
| -class FloatToDoubleInstr: public TemplateDefinition<1, NoThrow, Pure> {
|
| +class FloatToDoubleInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
| public:
|
| FloatToDoubleInstr(Value* value, intptr_t deopt_id)
|
| : TemplateDefinition(deopt_id) {
|
| @@ -7684,9 +7337,7 @@ class FloatToDoubleInstr: public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedDouble;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -7724,9 +7375,7 @@ class InvokeMathCFunctionInstr : public PureDefinition {
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| - virtual Representation representation() const {
|
| - return kUnboxedDouble;
|
| - }
|
| + virtual Representation representation() const { return kUnboxedDouble; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT((0 <= idx) && (idx < InputCount()));
|
| @@ -7735,13 +7384,9 @@ class InvokeMathCFunctionInstr : public PureDefinition {
|
|
|
| virtual intptr_t DeoptimizationTarget() const { return GetDeoptId(); }
|
|
|
| - virtual intptr_t InputCount() const {
|
| - return inputs_->length();
|
| - }
|
| + virtual intptr_t InputCount() const { return inputs_->length(); }
|
|
|
| - virtual Value* InputAt(intptr_t i) const {
|
| - return (*inputs_)[i];
|
| - }
|
| + virtual Value* InputAt(intptr_t i) const { return (*inputs_)[i]; }
|
|
|
| virtual bool AttributesEqual(Instruction* other) const {
|
| InvokeMathCFunctionInstr* other_invoke = other->AsInvokeMathCFunction();
|
| @@ -7791,9 +7436,7 @@ class ExtractNthOutputInstr : public TemplateDefinition<1, NoThrow, Pure> {
|
|
|
| intptr_t index() const { return index_; }
|
|
|
| - virtual Representation representation() const {
|
| - return definition_rep_;
|
| - }
|
| + virtual Representation representation() const { return definition_rep_; }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -7848,9 +7491,7 @@ class MergedMathInstr : public PureDefinition {
|
|
|
| virtual intptr_t InputCount() const { return inputs_->length(); }
|
|
|
| - virtual Value* InputAt(intptr_t i) const {
|
| - return (*inputs_)[i];
|
| - }
|
| + virtual Value* InputAt(intptr_t i) const { return (*inputs_)[i]; }
|
|
|
| static intptr_t OutputIndexOf(MethodRecognizer::Kind kind);
|
| static intptr_t OutputIndexOf(Token::Kind token);
|
| @@ -7942,9 +7583,7 @@ class CheckClassInstr : public TemplateInstruction<1, NoThrow> {
|
|
|
| virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
|
|
| - bool IsNullCheck() const {
|
| - return DeoptIfNull() || DeoptIfNotNull();
|
| - }
|
| + bool IsNullCheck() const { return DeoptIfNull() || DeoptIfNotNull(); }
|
|
|
| bool DeoptIfNull() const;
|
| bool DeoptIfNotNull() const;
|
| @@ -8055,9 +7694,7 @@ class CheckArrayBoundInstr : public TemplateInstruction<2, NoThrow, Pure> {
|
|
|
| bool IsRedundant(const RangeBoundary& length);
|
|
|
| - void mark_generalized() {
|
| - generalized_ = true;
|
| - }
|
| + void mark_generalized() { generalized_ = true; }
|
|
|
| virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
|
|
| @@ -8071,10 +7708,7 @@ class CheckArrayBoundInstr : public TemplateInstruction<2, NoThrow, Pure> {
|
| void set_licm_hoisted(bool value) { licm_hoisted_ = value; }
|
|
|
| // Give a name to the location/input indices.
|
| - enum {
|
| - kLengthPos = 0,
|
| - kIndexPos = 1
|
| - };
|
| + enum { kLengthPos = 0, kIndexPos = 1 };
|
|
|
| private:
|
| bool generalized_;
|
| @@ -8103,10 +7737,7 @@ class GenericCheckBoundInstr : public TemplateInstruction<2, Throws, NoCSE> {
|
| virtual bool CanDeoptimize() const { return true; }
|
|
|
| // Give a name to the location/input indices.
|
| - enum {
|
| - kLengthPos = 0,
|
| - kIndexPos = 1
|
| - };
|
| + enum { kLengthPos = 0, kIndexPos = 1 };
|
|
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(GenericCheckBoundInstr);
|
| @@ -8124,11 +7755,9 @@ class UnboxedIntConverterInstr : public TemplateDefinition<1, NoThrow> {
|
| to_representation_(to),
|
| is_truncating_(to == kUnboxedUint32) {
|
| ASSERT(from != to);
|
| - ASSERT((from == kUnboxedMint) ||
|
| - (from == kUnboxedUint32) ||
|
| + ASSERT((from == kUnboxedMint) || (from == kUnboxedUint32) ||
|
| (from == kUnboxedInt32));
|
| - ASSERT((to == kUnboxedMint) ||
|
| - (to == kUnboxedUint32) ||
|
| + ASSERT((to == kUnboxedMint) || (to == kUnboxedUint32) ||
|
| (to == kUnboxedInt32));
|
| SetInputAt(0, value);
|
| }
|
| @@ -8145,9 +7774,7 @@ class UnboxedIntConverterInstr : public TemplateDefinition<1, NoThrow> {
|
|
|
| virtual bool CanDeoptimize() const;
|
|
|
| - virtual Representation representation() const {
|
| - return to();
|
| - }
|
| + virtual Representation representation() const { return to(); }
|
|
|
| virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| ASSERT(idx == 0);
|
| @@ -8159,9 +7786,8 @@ class UnboxedIntConverterInstr : public TemplateDefinition<1, NoThrow> {
|
| virtual bool AttributesEqual(Instruction* other) const {
|
| ASSERT(other->IsUnboxedIntConverter());
|
| UnboxedIntConverterInstr* converter = other->AsUnboxedIntConverter();
|
| - return (converter->from() == from()) &&
|
| - (converter->to() == to()) &&
|
| - (converter->is_truncating() == is_truncating());
|
| + return (converter->from() == from()) && (converter->to() == to()) &&
|
| + (converter->is_truncating() == is_truncating());
|
| }
|
|
|
| virtual void InferRange(RangeAnalysis* analysis, Range* range);
|
| @@ -8210,12 +7836,12 @@ class Environment : public ZoneAllocated {
|
| class ShallowIterator : public ValueObject {
|
| public:
|
| explicit ShallowIterator(Environment* environment)
|
| - : environment_(environment), index_(0) { }
|
| + : environment_(environment), index_(0) {}
|
|
|
| ShallowIterator(const ShallowIterator& other)
|
| : ValueObject(),
|
| environment_(other.environment_),
|
| - index_(other.index_) { }
|
| + index_(other.index_) {}
|
|
|
| ShallowIterator& operator=(const ShallowIterator& other) {
|
| environment_ = other.environment_;
|
| @@ -8325,17 +7951,14 @@ class Environment : public ZoneAllocated {
|
|
|
| Environment* Outermost() {
|
| Environment* result = this;
|
| - while (result->outer() != NULL) result = result->outer();
|
| + while (result->outer() != NULL)
|
| + result = result->outer();
|
| return result;
|
| }
|
|
|
| - Value* ValueAt(intptr_t ix) const {
|
| - return values_[ix];
|
| - }
|
| + Value* ValueAt(intptr_t ix) const { return values_[ix]; }
|
|
|
| - intptr_t Length() const {
|
| - return values_.length();
|
| - }
|
| + intptr_t Length() const { return values_.length(); }
|
|
|
| Location LocationAt(intptr_t index) const {
|
| ASSERT((index >= 0) && (index < values_.length()));
|
| @@ -8353,9 +7976,7 @@ class Environment : public ZoneAllocated {
|
| return env->ValueAt(index);
|
| }
|
|
|
| - intptr_t fixed_parameter_count() const {
|
| - return fixed_parameter_count_;
|
| - }
|
| + intptr_t fixed_parameter_count() const { return fixed_parameter_count_; }
|
|
|
| intptr_t CountArgsPushed() {
|
| intptr_t count = 0;
|
| @@ -8369,9 +7990,7 @@ class Environment : public ZoneAllocated {
|
|
|
| const Function& function() const { return parsed_function_.function(); }
|
|
|
| - Environment* DeepCopy(Zone* zone) const {
|
| - return DeepCopy(zone, Length());
|
| - }
|
| + Environment* DeepCopy(Zone* zone) const { return DeepCopy(zone, Length()); }
|
|
|
| void DeepCopyTo(Zone* zone, Instruction* instr) const;
|
| void DeepCopyToOuter(Zone* zone, Instruction* instr) const;
|
| @@ -8414,8 +8033,7 @@ class Environment : public ZoneAllocated {
|
| fixed_parameter_count_(fixed_parameter_count),
|
| deopt_id_(deopt_id),
|
| parsed_function_(parsed_function),
|
| - outer_(outer) {
|
| - }
|
| + outer_(outer) {}
|
|
|
|
|
| GrowableArray<Value*> values_;
|
| @@ -8434,8 +8052,8 @@ class Environment : public ZoneAllocated {
|
| class FlowGraphVisitor : public ValueObject {
|
| public:
|
| explicit FlowGraphVisitor(const GrowableArray<BlockEntryInstr*>& block_order)
|
| - : current_iterator_(NULL), block_order_(block_order) { }
|
| - virtual ~FlowGraphVisitor() { }
|
| + : current_iterator_(NULL), block_order_(block_order) {}
|
| + virtual ~FlowGraphVisitor() {}
|
|
|
| ForwardInstructionIterator* current_iterator() const {
|
| return current_iterator_;
|
| @@ -8445,10 +8063,10 @@ class FlowGraphVisitor : public ValueObject {
|
| // instructions in order from the block entry to exit.
|
| virtual void VisitBlocks();
|
|
|
| - // Visit functions for instruction classes, with an empty default
|
| - // implementation.
|
| +// Visit functions for instruction classes, with an empty default
|
| +// implementation.
|
| #define DECLARE_VISIT_INSTRUCTION(ShortName) \
|
| - virtual void Visit##ShortName(ShortName##Instr* instr) { }
|
| + virtual void Visit##ShortName(ShortName##Instr* instr) {}
|
|
|
| FOR_EACH_INSTRUCTION(DECLARE_VISIT_INSTRUCTION)
|
|
|
| @@ -8464,11 +8082,11 @@ class FlowGraphVisitor : public ValueObject {
|
|
|
|
|
| // Helper macros for platform ports.
|
| -#define DEFINE_UNIMPLEMENTED_INSTRUCTION(Name) \
|
| - LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
|
| - UNIMPLEMENTED(); \
|
| - return NULL; \
|
| - } \
|
| +#define DEFINE_UNIMPLEMENTED_INSTRUCTION(Name) \
|
| + LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
|
| + UNIMPLEMENTED(); \
|
| + return NULL; \
|
| + } \
|
| void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
|
|
|
|
|
|
|