diff options
Diffstat (limited to 'deps/v8/src/hydrogen-instructions.h')
-rw-r--r-- | deps/v8/src/hydrogen-instructions.h | 1496 |
1 files changed, 766 insertions, 730 deletions
diff --git a/deps/v8/src/hydrogen-instructions.h b/deps/v8/src/hydrogen-instructions.h index ed1243507c..695c629a70 100644 --- a/deps/v8/src/hydrogen-instructions.h +++ b/deps/v8/src/hydrogen-instructions.h @@ -8,6 +8,7 @@ #include "src/v8.h" #include "src/allocation.h" +#include "src/base/bits.h" #include "src/code-stubs.h" #include "src/conversions.h" #include "src/data-flow.h" @@ -36,133 +37,134 @@ class LInstruction; class LChunkBuilder; class OStream; -#define HYDROGEN_ABSTRACT_INSTRUCTION_LIST(V) \ - V(ArithmeticBinaryOperation) \ - V(BinaryOperation) \ - V(BitwiseBinaryOperation) \ - V(ControlInstruction) \ - V(Instruction) \ - - -#define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \ - V(AbnormalExit) \ - V(AccessArgumentsAt) \ - V(Add) \ - V(AllocateBlockContext) \ - V(Allocate) \ - V(ApplyArguments) \ - V(ArgumentsElements) \ - V(ArgumentsLength) \ - V(ArgumentsObject) \ - V(Bitwise) \ - V(BlockEntry) \ - V(BoundsCheck) \ - V(BoundsCheckBaseIndexInformation) \ - V(Branch) \ - V(CallWithDescriptor) \ - V(CallJSFunction) \ - V(CallFunction) \ - V(CallNew) \ - V(CallNewArray) \ - V(CallRuntime) \ - V(CallStub) \ - V(CapturedObject) \ - V(Change) \ - V(CheckHeapObject) \ - V(CheckInstanceType) \ - V(CheckMaps) \ - V(CheckMapValue) \ - V(CheckSmi) \ - V(CheckValue) \ - V(ClampToUint8) \ - V(ClassOfTestAndBranch) \ - V(CompareNumericAndBranch) \ - V(CompareHoleAndBranch) \ - V(CompareGeneric) \ - V(CompareMinusZeroAndBranch) \ - V(CompareObjectEqAndBranch) \ - V(CompareMap) \ - V(Constant) \ - V(ConstructDouble) \ - V(Context) \ - V(DateField) \ - V(DebugBreak) \ - V(DeclareGlobals) \ - V(Deoptimize) \ - V(Div) \ - V(DoubleBits) \ - V(DummyUse) \ - V(EnterInlined) \ - V(EnvironmentMarker) \ - V(ForceRepresentation) \ - V(ForInCacheArray) \ - V(ForInPrepareMap) \ - V(FunctionLiteral) \ - V(GetCachedArrayIndex) \ - V(Goto) \ - V(HasCachedArrayIndexAndBranch) \ - V(HasInstanceTypeAndBranch) \ - V(InnerAllocatedObject) \ - V(InstanceOf) \ - V(InstanceOfKnownGlobal) \ - V(InvokeFunction) \ - V(IsConstructCallAndBranch) \ - V(IsObjectAndBranch) \ - V(IsStringAndBranch) \ - V(IsSmiAndBranch) \ - V(IsUndetectableAndBranch) \ - V(LeaveInlined) \ - V(LoadContextSlot) \ - V(LoadFieldByIndex) \ - V(LoadFunctionPrototype) \ - V(LoadGlobalCell) \ - V(LoadGlobalGeneric) \ - V(LoadKeyed) \ - V(LoadKeyedGeneric) \ - V(LoadNamedField) \ - V(LoadNamedGeneric) \ - V(LoadRoot) \ - V(MapEnumLength) \ - V(MathFloorOfDiv) \ - V(MathMinMax) \ - V(Mod) \ - V(Mul) \ - V(OsrEntry) \ - V(Parameter) \ - V(Power) \ - V(PushArguments) \ - V(RegExpLiteral) \ - V(Return) \ - V(Ror) \ - V(Sar) \ - V(SeqStringGetChar) \ - V(SeqStringSetChar) \ - V(Shl) \ - V(Shr) \ - V(Simulate) \ - V(StackCheck) \ - V(StoreCodeEntry) \ - V(StoreContextSlot) \ - V(StoreFrameContext) \ - V(StoreGlobalCell) \ - V(StoreKeyed) \ - V(StoreKeyedGeneric) \ - V(StoreNamedField) \ - V(StoreNamedGeneric) \ - V(StringAdd) \ - V(StringCharCodeAt) \ - V(StringCharFromCode) \ - V(StringCompareAndBranch) \ - V(Sub) \ - V(ThisFunction) \ - V(ToFastProperties) \ - V(TransitionElementsKind) \ - V(TrapAllocationMemento) \ - V(Typeof) \ - V(TypeofIsAndBranch) \ - V(UnaryMathOperation) \ - V(UnknownOSRValue) \ - V(UseConst) \ +#define HYDROGEN_ABSTRACT_INSTRUCTION_LIST(V) \ + V(ArithmeticBinaryOperation) \ + V(BinaryOperation) \ + V(BitwiseBinaryOperation) \ + V(ControlInstruction) \ + V(Instruction) + + +#define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \ + V(AbnormalExit) \ + V(AccessArgumentsAt) \ + V(Add) \ + V(AllocateBlockContext) \ + V(Allocate) \ + V(ApplyArguments) \ + V(ArgumentsElements) \ + V(ArgumentsLength) \ + V(ArgumentsObject) \ + V(Bitwise) \ + V(BlockEntry) \ + V(BoundsCheck) \ + V(BoundsCheckBaseIndexInformation) \ + V(Branch) \ + V(CallWithDescriptor) \ + V(CallJSFunction) \ + V(CallFunction) \ + V(CallNew) \ + V(CallNewArray) \ + V(CallRuntime) \ + V(CallStub) \ + V(CapturedObject) \ + V(Change) \ + V(CheckHeapObject) \ + V(CheckInstanceType) \ + V(CheckMaps) \ + V(CheckMapValue) \ + V(CheckSmi) \ + V(CheckValue) \ + V(ClampToUint8) \ + V(ClassOfTestAndBranch) \ + V(CompareNumericAndBranch) \ + V(CompareHoleAndBranch) \ + V(CompareGeneric) \ + V(CompareMinusZeroAndBranch) \ + V(CompareObjectEqAndBranch) \ + V(CompareMap) \ + V(Constant) \ + V(ConstructDouble) \ + V(Context) \ + V(DateField) \ + V(DebugBreak) \ + V(DeclareGlobals) \ + V(Deoptimize) \ + V(Div) \ + V(DoubleBits) \ + V(DummyUse) \ + V(EnterInlined) \ + V(EnvironmentMarker) \ + V(ForceRepresentation) \ + V(ForInCacheArray) \ + V(ForInPrepareMap) \ + V(FunctionLiteral) \ + V(GetCachedArrayIndex) \ + V(Goto) \ + V(HasCachedArrayIndexAndBranch) \ + V(HasInstanceTypeAndBranch) \ + V(InnerAllocatedObject) \ + V(InstanceOf) \ + V(InstanceOfKnownGlobal) \ + V(InvokeFunction) \ + V(IsConstructCallAndBranch) \ + V(IsObjectAndBranch) \ + V(IsStringAndBranch) \ + V(IsSmiAndBranch) \ + V(IsUndetectableAndBranch) \ + V(LeaveInlined) \ + V(LoadContextSlot) \ + V(LoadFieldByIndex) \ + V(LoadFunctionPrototype) \ + V(LoadGlobalCell) \ + V(LoadGlobalGeneric) \ + V(LoadKeyed) \ + V(LoadKeyedGeneric) \ + V(LoadNamedField) \ + V(LoadNamedGeneric) \ + V(LoadRoot) \ + V(MapEnumLength) \ + V(MathFloorOfDiv) \ + V(MathMinMax) \ + V(Mod) \ + V(Mul) \ + V(OsrEntry) \ + V(Parameter) \ + V(Power) \ + V(PushArguments) \ + V(RegExpLiteral) \ + V(Return) \ + V(Ror) \ + V(Sar) \ + V(SeqStringGetChar) \ + V(SeqStringSetChar) \ + V(Shl) \ + V(Shr) \ + V(Simulate) \ + V(StackCheck) \ + V(StoreCodeEntry) \ + V(StoreContextSlot) \ + V(StoreFrameContext) \ + V(StoreGlobalCell) \ + V(StoreKeyed) \ + V(StoreKeyedGeneric) \ + V(StoreNamedField) \ + V(StoreNamedGeneric) \ + V(StringAdd) \ + V(StringCharCodeAt) \ + V(StringCharFromCode) \ + V(StringCompareAndBranch) \ + V(Sub) \ + V(TailCallThroughMegamorphicCache) \ + V(ThisFunction) \ + V(ToFastProperties) \ + V(TransitionElementsKind) \ + V(TrapAllocationMemento) \ + V(Typeof) \ + V(TypeofIsAndBranch) \ + V(UnaryMathOperation) \ + V(UnknownOSRValue) \ + V(UseConst) \ V(WrapReceiver) #define GVN_TRACKED_FLAG_LIST(V) \ @@ -189,7 +191,7 @@ class OStream; #define DECLARE_ABSTRACT_INSTRUCTION(type) \ - virtual bool Is##type() const V8_FINAL V8_OVERRIDE { return true; } \ + virtual bool Is##type() const FINAL OVERRIDE { return true; } \ static H##type* cast(HValue* value) { \ DCHECK(value->Is##type()); \ return reinterpret_cast<H##type*>(value); \ @@ -198,12 +200,12 @@ class OStream; #define DECLARE_CONCRETE_INSTRUCTION(type) \ virtual LInstruction* CompileToLithium( \ - LChunkBuilder* builder) V8_FINAL V8_OVERRIDE; \ + LChunkBuilder* builder) FINAL OVERRIDE; \ static H##type* cast(HValue* value) { \ DCHECK(value->Is##type()); \ return reinterpret_cast<H##type*>(value); \ } \ - virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ + virtual Opcode opcode() const FINAL OVERRIDE { \ return HValue::k##type; \ } @@ -211,7 +213,7 @@ class OStream; enum PropertyAccessType { LOAD, STORE }; -class Range V8_FINAL : public ZoneObject { +class Range FINAL : public ZoneObject { public: Range() : lower_(kMinInt), @@ -315,7 +317,7 @@ class HUseListNode: public ZoneObject { // We reuse use list nodes behind the scenes as uses are added and deleted. // This class is the safe way to iterate uses while deleting them. -class HUseIterator V8_FINAL BASE_EMBEDDED { +class HUseIterator FINAL BASE_EMBEDDED { public: bool Done() { return current_ == NULL; } void Advance(); @@ -364,7 +366,7 @@ static inline GVNFlag GVNFlagFromInt(int i) { } -class DecompositionResult V8_FINAL BASE_EMBEDDED { +class DecompositionResult FINAL BASE_EMBEDDED { public: DecompositionResult() : base_(NULL), offset_(0), scale_(0) {} @@ -453,10 +455,10 @@ class HSourcePosition { // Offset from the start of the inlined function. typedef BitField<int, 9, 23> PositionField; - // On HPositionInfo can use this constructor. explicit HSourcePosition(int value) : value_(value) { } friend class HPositionInfo; + friend class LCodeGenBase; // If FLAG_hydrogen_track_positions is set contains bitfields InliningIdField // and PositionField. @@ -1145,7 +1147,7 @@ class HInstruction : public HValue { HInstruction* next() const { return next_; } HInstruction* previous() const { return previous_; } - virtual OStream& PrintTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintTo(OStream& os) const OVERRIDE; // NOLINT virtual OStream& PrintDataTo(OStream& os) const; // NOLINT bool IsLinked() const { return block() != NULL; } @@ -1166,7 +1168,7 @@ class HInstruction : public HValue { } // The position is a write-once variable. - virtual HSourcePosition position() const V8_OVERRIDE { + virtual HSourcePosition position() const OVERRIDE { return HSourcePosition(position_.position()); } bool has_position() const { @@ -1178,7 +1180,7 @@ class HInstruction : public HValue { position_.set_position(position); } - virtual HSourcePosition operand_position(int index) const V8_OVERRIDE { + virtual HSourcePosition operand_position(int index) const OVERRIDE { const HSourcePosition pos = position_.operand_position(index); return pos.IsUnknown() ? position() : pos; } @@ -1195,7 +1197,7 @@ class HInstruction : public HValue { virtual LInstruction* CompileToLithium(LChunkBuilder* builder) = 0; #ifdef DEBUG - virtual void Verify() V8_OVERRIDE; + virtual void Verify() OVERRIDE; #endif bool CanDeoptimize(); @@ -1213,7 +1215,7 @@ class HInstruction : public HValue { SetDependsOnFlag(kOsrEntries); } - virtual void DeleteFromGraph() V8_OVERRIDE { Unlink(); } + virtual void DeleteFromGraph() OVERRIDE { Unlink(); } private: void InitializeAsFirst(HBasicBlock* block) { @@ -1232,8 +1234,8 @@ class HInstruction : public HValue { template<int V> class HTemplateInstruction : public HInstruction { public: - virtual int OperandCount() const V8_FINAL V8_OVERRIDE { return V; } - virtual HValue* OperandAt(int i) const V8_FINAL V8_OVERRIDE { + virtual int OperandCount() const FINAL OVERRIDE { return V; } + virtual HValue* OperandAt(int i) const FINAL OVERRIDE { return inputs_[i]; } @@ -1241,7 +1243,7 @@ class HTemplateInstruction : public HInstruction { explicit HTemplateInstruction(HType type = HType::Tagged()) : HInstruction(type) {} - virtual void InternalSetOperandAt(int i, HValue* value) V8_FINAL V8_OVERRIDE { + virtual void InternalSetOperandAt(int i, HValue* value) FINAL OVERRIDE { inputs_[i] = value; } @@ -1256,7 +1258,7 @@ class HControlInstruction : public HInstruction { virtual int SuccessorCount() const = 0; virtual void SetSuccessorAt(int i, HBasicBlock* block) = 0; - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT virtual bool KnownSuccessorBlock(HBasicBlock** block) { *block = NULL; @@ -1280,7 +1282,7 @@ class HControlInstruction : public HInstruction { }; -class HSuccessorIterator V8_FINAL BASE_EMBEDDED { +class HSuccessorIterator FINAL BASE_EMBEDDED { public: explicit HSuccessorIterator(const HControlInstruction* instr) : instr_(instr), current_(0) {} @@ -1298,18 +1300,18 @@ class HSuccessorIterator V8_FINAL BASE_EMBEDDED { template<int S, int V> class HTemplateControlInstruction : public HControlInstruction { public: - int SuccessorCount() const V8_OVERRIDE { return S; } - HBasicBlock* SuccessorAt(int i) const V8_OVERRIDE { return successors_[i]; } - void SetSuccessorAt(int i, HBasicBlock* block) V8_OVERRIDE { + int SuccessorCount() const OVERRIDE { return S; } + HBasicBlock* SuccessorAt(int i) const OVERRIDE { return successors_[i]; } + void SetSuccessorAt(int i, HBasicBlock* block) OVERRIDE { successors_[i] = block; } - int OperandCount() const V8_OVERRIDE { return V; } - HValue* OperandAt(int i) const V8_OVERRIDE { return inputs_[i]; } + int OperandCount() const OVERRIDE { return V; } + HValue* OperandAt(int i) const OVERRIDE { return inputs_[i]; } protected: - void InternalSetOperandAt(int i, HValue* value) V8_OVERRIDE { + void InternalSetOperandAt(int i, HValue* value) OVERRIDE { inputs_[i] = value; } @@ -1319,9 +1321,9 @@ class HTemplateControlInstruction : public HControlInstruction { }; -class HBlockEntry V8_FINAL : public HTemplateInstruction<0> { +class HBlockEntry FINAL : public HTemplateInstruction<0> { public: - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } @@ -1329,7 +1331,7 @@ class HBlockEntry V8_FINAL : public HTemplateInstruction<0> { }; -class HDummyUse V8_FINAL : public HTemplateInstruction<1> { +class HDummyUse FINAL : public HTemplateInstruction<1> { public: explicit HDummyUse(HValue* value) : HTemplateInstruction<1>(HType::Smi()) { @@ -1341,23 +1343,23 @@ class HDummyUse V8_FINAL : public HTemplateInstruction<1> { HValue* value() const { return OperandAt(0); } - virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual bool HasEscapingOperandAt(int index) OVERRIDE { return false; } + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(DummyUse); }; // Inserts an int3/stop break instruction for debugging purposes. -class HDebugBreak V8_FINAL : public HTemplateInstruction<0> { +class HDebugBreak FINAL : public HTemplateInstruction<0> { public: DECLARE_INSTRUCTION_FACTORY_P0(HDebugBreak); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } @@ -1365,28 +1367,28 @@ class HDebugBreak V8_FINAL : public HTemplateInstruction<0> { }; -class HGoto V8_FINAL : public HTemplateControlInstruction<1, 0> { +class HGoto FINAL : public HTemplateControlInstruction<1, 0> { public: explicit HGoto(HBasicBlock* target) { SetSuccessorAt(0, target); } - virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE { + virtual bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE { *block = FirstSuccessor(); return true; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(Goto) }; -class HDeoptimize V8_FINAL : public HTemplateControlInstruction<1, 0> { +class HDeoptimize FINAL : public HTemplateControlInstruction<1, 0> { public: static HDeoptimize* New(Zone* zone, HValue* context, @@ -1396,12 +1398,12 @@ class HDeoptimize V8_FINAL : public HTemplateControlInstruction<1, 0> { return new(zone) HDeoptimize(reason, type, unreachable_continuation); } - virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE { + virtual bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE { *block = NULL; return true; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } @@ -1433,13 +1435,13 @@ class HUnaryControlInstruction : public HTemplateControlInstruction<2, 1> { SetSuccessorAt(1, false_target); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT HValue* value() const { return OperandAt(0); } }; -class HBranch V8_FINAL : public HUnaryControlInstruction { +class HBranch FINAL : public HUnaryControlInstruction { public: DECLARE_INSTRUCTION_FACTORY_P1(HBranch, HValue*); DECLARE_INSTRUCTION_FACTORY_P2(HBranch, HValue*, @@ -1448,14 +1450,14 @@ class HBranch V8_FINAL : public HUnaryControlInstruction { ToBooleanStub::Types, HBasicBlock*, HBasicBlock*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } - virtual Representation observed_input_representation(int index) V8_OVERRIDE; + virtual Representation observed_input_representation(int index) OVERRIDE; - virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; + virtual bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE; - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT ToBooleanStub::Types expected_input_types() const { return expected_input_types_; @@ -1477,13 +1479,13 @@ class HBranch V8_FINAL : public HUnaryControlInstruction { }; -class HCompareMap V8_FINAL : public HUnaryControlInstruction { +class HCompareMap FINAL : public HUnaryControlInstruction { public: DECLARE_INSTRUCTION_FACTORY_P2(HCompareMap, HValue*, Handle<Map>); DECLARE_INSTRUCTION_FACTORY_P4(HCompareMap, HValue*, Handle<Map>, HBasicBlock*, HBasicBlock*); - virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE { + virtual bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE { if (known_successor_index() != kNoKnownSuccessorIndex) { *block = SuccessorAt(known_successor_index()); return true; @@ -1492,7 +1494,7 @@ class HCompareMap V8_FINAL : public HUnaryControlInstruction { return false; } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT static const int kNoKnownSuccessorIndex = -1; int known_successor_index() const { return known_successor_index_; } @@ -1503,7 +1505,7 @@ class HCompareMap V8_FINAL : public HUnaryControlInstruction { Unique<Map> map() const { return map_; } bool map_is_stable() const { return map_is_stable_; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -1530,20 +1532,20 @@ class HCompareMap V8_FINAL : public HUnaryControlInstruction { }; -class HContext V8_FINAL : public HTemplateInstruction<0> { +class HContext FINAL : public HTemplateInstruction<0> { public: static HContext* New(Zone* zone) { return new(zone) HContext(); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } DECLARE_CONCRETE_INSTRUCTION(Context) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: HContext() { @@ -1551,22 +1553,22 @@ class HContext V8_FINAL : public HTemplateInstruction<0> { SetFlag(kUseGVN); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } }; -class HReturn V8_FINAL : public HTemplateControlInstruction<0, 3> { +class HReturn FINAL : public HTemplateControlInstruction<0, 3> { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HReturn, HValue*, HValue*); DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(HReturn, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { // TODO(titzer): require an Int32 input for faster returns. if (index == 2) return Representation::Smi(); return Representation::Tagged(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT HValue* value() const { return OperandAt(0); } HValue* context() const { return OperandAt(1); } @@ -1583,11 +1585,11 @@ class HReturn V8_FINAL : public HTemplateControlInstruction<0, 3> { }; -class HAbnormalExit V8_FINAL : public HTemplateControlInstruction<0, 0> { +class HAbnormalExit FINAL : public HTemplateControlInstruction<0, 0> { public: DECLARE_INSTRUCTION_FACTORY_P0(HAbnormalExit); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } @@ -1609,15 +1611,15 @@ class HUnaryOperation : public HTemplateInstruction<1> { } HValue* value() const { return OperandAt(0); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT }; -class HUseConst V8_FINAL : public HUnaryOperation { +class HUseConst FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HUseConst, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } @@ -1628,18 +1630,18 @@ class HUseConst V8_FINAL : public HUnaryOperation { }; -class HForceRepresentation V8_FINAL : public HTemplateInstruction<1> { +class HForceRepresentation FINAL : public HTemplateInstruction<1> { public: static HInstruction* New(Zone* zone, HValue* context, HValue* value, Representation required_representation); HValue* value() const { return OperandAt(0); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return representation(); // Same as the output representation. } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(ForceRepresentation) @@ -1651,7 +1653,7 @@ class HForceRepresentation V8_FINAL : public HTemplateInstruction<1> { }; -class HChange V8_FINAL : public HUnaryOperation { +class HChange FINAL : public HUnaryOperation { public: HChange(HValue* value, Representation to, @@ -1681,46 +1683,46 @@ class HChange V8_FINAL : public HUnaryOperation { return CheckUsesForFlag(kAllowUndefinedAsNaN); } - virtual HType CalculateInferredType() V8_OVERRIDE; - virtual HValue* Canonicalize() V8_OVERRIDE; + virtual HType CalculateInferredType() OVERRIDE; + virtual HValue* Canonicalize() OVERRIDE; Representation from() const { return value()->representation(); } Representation to() const { return representation(); } bool deoptimize_on_minus_zero() const { return CheckFlag(kBailoutOnMinusZero); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return from(); } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(Change) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: - virtual bool IsDeletable() const V8_OVERRIDE { + virtual bool IsDeletable() const OVERRIDE { return !from().IsTagged() || value()->type().IsSmi(); } }; -class HClampToUint8 V8_FINAL : public HUnaryOperation { +class HClampToUint8 FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HClampToUint8, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } DECLARE_CONCRETE_INSTRUCTION(ClampToUint8) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: explicit HClampToUint8(HValue* value) @@ -1730,16 +1732,16 @@ class HClampToUint8 V8_FINAL : public HUnaryOperation { SetFlag(kUseGVN); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } }; -class HDoubleBits V8_FINAL : public HUnaryOperation { +class HDoubleBits FINAL : public HUnaryOperation { public: enum Bits { HIGH, LOW }; DECLARE_INSTRUCTION_FACTORY_P2(HDoubleBits, HValue*, Bits); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Double(); } @@ -1748,7 +1750,7 @@ class HDoubleBits V8_FINAL : public HUnaryOperation { Bits bits() { return bits_; } protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { return other->IsDoubleBits() && HDoubleBits::cast(other)->bits() == bits(); } @@ -1759,17 +1761,17 @@ class HDoubleBits V8_FINAL : public HUnaryOperation { SetFlag(kUseGVN); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } Bits bits_; }; -class HConstructDouble V8_FINAL : public HTemplateInstruction<2> { +class HConstructDouble FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_FACTORY_P2(HConstructDouble, HValue*, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Integer32(); } @@ -1779,7 +1781,7 @@ class HConstructDouble V8_FINAL : public HTemplateInstruction<2> { HValue* lo() { return OperandAt(1); } protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: explicit HConstructDouble(HValue* hi, HValue* lo) { @@ -1789,7 +1791,7 @@ class HConstructDouble V8_FINAL : public HTemplateInstruction<2> { SetOperandAt(1, lo); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } }; @@ -1799,7 +1801,7 @@ enum RemovableSimulate { }; -class HSimulate V8_FINAL : public HInstruction { +class HSimulate FINAL : public HInstruction { public: HSimulate(BailoutId ast_id, int pop_count, @@ -1814,7 +1816,7 @@ class HSimulate V8_FINAL : public HInstruction { done_with_replay_(false) {} ~HSimulate() {} - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT bool HasAstId() const { return !ast_id_.IsNone(); } BailoutId ast_id() const { return ast_id_; } @@ -1844,13 +1846,13 @@ class HSimulate V8_FINAL : public HInstruction { } return -1; } - virtual int OperandCount() const V8_OVERRIDE { return values_.length(); } - virtual HValue* OperandAt(int index) const V8_OVERRIDE { + virtual int OperandCount() const OVERRIDE { return values_.length(); } + virtual HValue* OperandAt(int index) const OVERRIDE { return values_[index]; } - virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual bool HasEscapingOperandAt(int index) OVERRIDE { return false; } + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } @@ -1863,13 +1865,13 @@ class HSimulate V8_FINAL : public HInstruction { DECLARE_CONCRETE_INSTRUCTION(Simulate) #ifdef DEBUG - virtual void Verify() V8_OVERRIDE; + virtual void Verify() OVERRIDE; void set_closure(Handle<JSFunction> closure) { closure_ = closure; } Handle<JSFunction> closure() const { return closure_; } #endif protected: - virtual void InternalSetOperandAt(int index, HValue* value) V8_OVERRIDE { + virtual void InternalSetOperandAt(int index, HValue* value) OVERRIDE { values_[index] = value; } @@ -1903,7 +1905,7 @@ class HSimulate V8_FINAL : public HInstruction { }; -class HEnvironmentMarker V8_FINAL : public HTemplateInstruction<1> { +class HEnvironmentMarker FINAL : public HTemplateInstruction<1> { public: enum Kind { BIND, LOOKUP }; @@ -1916,11 +1918,11 @@ class HEnvironmentMarker V8_FINAL : public HTemplateInstruction<1> { next_simulate_ = simulate; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT #ifdef DEBUG void set_closure(Handle<JSFunction> closure) { @@ -1947,7 +1949,7 @@ class HEnvironmentMarker V8_FINAL : public HTemplateInstruction<1> { }; -class HStackCheck V8_FINAL : public HTemplateInstruction<1> { +class HStackCheck FINAL : public HTemplateInstruction<1> { public: enum Type { kFunctionEntry, @@ -1958,7 +1960,7 @@ class HStackCheck V8_FINAL : public HTemplateInstruction<1> { HValue* context() { return OperandAt(0); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -1994,30 +1996,29 @@ enum InliningKind { class HArgumentsObject; +class HConstant; -class HEnterInlined V8_FINAL : public HTemplateInstruction<0> { +class HEnterInlined FINAL : public HTemplateInstruction<0> { public: - static HEnterInlined* New(Zone* zone, - HValue* context, - BailoutId return_id, + static HEnterInlined* New(Zone* zone, HValue* context, BailoutId return_id, Handle<JSFunction> closure, - int arguments_count, + HConstant* closure_context, int arguments_count, FunctionLiteral* function, - InliningKind inlining_kind, - Variable* arguments_var, + InliningKind inlining_kind, Variable* arguments_var, HArgumentsObject* arguments_object) { - return new(zone) HEnterInlined(return_id, closure, arguments_count, - function, inlining_kind, arguments_var, - arguments_object, zone); + return new (zone) HEnterInlined(return_id, closure, closure_context, + arguments_count, function, inlining_kind, + arguments_var, arguments_object, zone); } void RegisterReturnTarget(HBasicBlock* return_target, Zone* zone); ZoneList<HBasicBlock*>* return_targets() { return &return_targets_; } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT Handle<JSFunction> closure() const { return closure_; } + HConstant* closure_context() const { return closure_context_; } int arguments_count() const { return arguments_count_; } bool arguments_pushed() const { return arguments_pushed_; } void set_arguments_pushed() { arguments_pushed_ = true; } @@ -2025,7 +2026,7 @@ class HEnterInlined V8_FINAL : public HTemplateInstruction<0> { InliningKind inlining_kind() const { return inlining_kind_; } BailoutId ReturnId() const { return return_id_; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } @@ -2035,27 +2036,25 @@ class HEnterInlined V8_FINAL : public HTemplateInstruction<0> { DECLARE_CONCRETE_INSTRUCTION(EnterInlined) private: - HEnterInlined(BailoutId return_id, - Handle<JSFunction> closure, - int arguments_count, - FunctionLiteral* function, - InliningKind inlining_kind, - Variable* arguments_var, - HArgumentsObject* arguments_object, + HEnterInlined(BailoutId return_id, Handle<JSFunction> closure, + HConstant* closure_context, int arguments_count, + FunctionLiteral* function, InliningKind inlining_kind, + Variable* arguments_var, HArgumentsObject* arguments_object, Zone* zone) : return_id_(return_id), closure_(closure), + closure_context_(closure_context), arguments_count_(arguments_count), arguments_pushed_(false), function_(function), inlining_kind_(inlining_kind), arguments_var_(arguments_var), arguments_object_(arguments_object), - return_targets_(2, zone) { - } + return_targets_(2, zone) {} BailoutId return_id_; Handle<JSFunction> closure_; + HConstant* closure_context_; int arguments_count_; bool arguments_pushed_; FunctionLiteral* function_; @@ -2066,18 +2065,18 @@ class HEnterInlined V8_FINAL : public HTemplateInstruction<0> { }; -class HLeaveInlined V8_FINAL : public HTemplateInstruction<0> { +class HLeaveInlined FINAL : public HTemplateInstruction<0> { public: HLeaveInlined(HEnterInlined* entry, int drop_count) : entry_(entry), drop_count_(drop_count) { } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } - virtual int argument_delta() const V8_OVERRIDE { + virtual int argument_delta() const OVERRIDE { return entry_->arguments_pushed() ? -drop_count_ : 0; } @@ -2089,7 +2088,7 @@ class HLeaveInlined V8_FINAL : public HTemplateInstruction<0> { }; -class HPushArguments V8_FINAL : public HInstruction { +class HPushArguments FINAL : public HInstruction { public: static HPushArguments* New(Zone* zone, HValue* context) { return new(zone) HPushArguments(zone); @@ -2124,17 +2123,17 @@ class HPushArguments V8_FINAL : public HInstruction { return instr; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual int argument_delta() const V8_OVERRIDE { return inputs_.length(); } + virtual int argument_delta() const OVERRIDE { return inputs_.length(); } HValue* argument(int i) { return OperandAt(i); } - virtual int OperandCount() const V8_FINAL V8_OVERRIDE { + virtual int OperandCount() const FINAL OVERRIDE { return inputs_.length(); } - virtual HValue* OperandAt(int i) const V8_FINAL V8_OVERRIDE { + virtual HValue* OperandAt(int i) const FINAL OVERRIDE { return inputs_[i]; } @@ -2143,7 +2142,7 @@ class HPushArguments V8_FINAL : public HInstruction { DECLARE_CONCRETE_INSTRUCTION(PushArguments) protected: - virtual void InternalSetOperandAt(int i, HValue* value) V8_FINAL V8_OVERRIDE { + virtual void InternalSetOperandAt(int i, HValue* value) FINAL OVERRIDE { inputs_[i] = value; } @@ -2157,18 +2156,18 @@ class HPushArguments V8_FINAL : public HInstruction { }; -class HThisFunction V8_FINAL : public HTemplateInstruction<0> { +class HThisFunction FINAL : public HTemplateInstruction<0> { public: DECLARE_INSTRUCTION_FACTORY_P0(HThisFunction); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } DECLARE_CONCRETE_INSTRUCTION(ThisFunction) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: HThisFunction() { @@ -2176,11 +2175,11 @@ class HThisFunction V8_FINAL : public HTemplateInstruction<0> { SetFlag(kUseGVN); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } }; -class HDeclareGlobals V8_FINAL : public HUnaryOperation { +class HDeclareGlobals FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HDeclareGlobals, Handle<FixedArray>, @@ -2192,7 +2191,7 @@ class HDeclareGlobals V8_FINAL : public HUnaryOperation { DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals) - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -2221,7 +2220,7 @@ class HCall : public HTemplateInstruction<V> { this->SetAllSideEffects(); } - virtual HType CalculateInferredType() V8_FINAL V8_OVERRIDE { + virtual HType CalculateInferredType() FINAL OVERRIDE { return HType::Tagged(); } @@ -2229,7 +2228,7 @@ class HCall : public HTemplateInstruction<V> { return argument_count_; } - virtual int argument_delta() const V8_OVERRIDE { + virtual int argument_delta() const OVERRIDE { return -argument_count(); } @@ -2246,11 +2245,11 @@ class HUnaryCall : public HCall<1> { } virtual Representation RequiredInputRepresentation( - int index) V8_FINAL V8_OVERRIDE { + int index) FINAL OVERRIDE { return Representation::Tagged(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT HValue* value() const { return OperandAt(0); } }; @@ -2264,10 +2263,10 @@ class HBinaryCall : public HCall<2> { SetOperandAt(1, second); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT virtual Representation RequiredInputRepresentation( - int index) V8_FINAL V8_OVERRIDE { + int index) FINAL OVERRIDE { return Representation::Tagged(); } @@ -2276,7 +2275,7 @@ class HBinaryCall : public HCall<2> { }; -class HCallJSFunction V8_FINAL : public HCall<1> { +class HCallJSFunction FINAL : public HCall<1> { public: static HCallJSFunction* New(Zone* zone, HValue* context, @@ -2286,17 +2285,17 @@ class HCallJSFunction V8_FINAL : public HCall<1> { HValue* function() const { return OperandAt(0); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT virtual Representation RequiredInputRepresentation( - int index) V8_FINAL V8_OVERRIDE { + int index) FINAL OVERRIDE { DCHECK(index == 0); return Representation::Tagged(); } bool pass_argument_count() const { return pass_argument_count_; } - virtual bool HasStackCheck() V8_FINAL V8_OVERRIDE { + virtual bool HasStackCheck() FINAL OVERRIDE { return has_stack_check_; } @@ -2319,41 +2318,39 @@ class HCallJSFunction V8_FINAL : public HCall<1> { }; -class HCallWithDescriptor V8_FINAL : public HInstruction { +class HCallWithDescriptor FINAL : public HInstruction { public: - static HCallWithDescriptor* New(Zone* zone, HValue* context, - HValue* target, - int argument_count, - const InterfaceDescriptor* descriptor, - const Vector<HValue*>& operands) { - DCHECK(operands.length() == descriptor->GetEnvironmentLength()); - HCallWithDescriptor* res = - new(zone) HCallWithDescriptor(target, argument_count, - descriptor, operands, zone); + static HCallWithDescriptor* New(Zone* zone, HValue* context, HValue* target, + int argument_count, + CallInterfaceDescriptor descriptor, + const Vector<HValue*>& operands) { + DCHECK(operands.length() == descriptor.GetEnvironmentLength()); + HCallWithDescriptor* res = new (zone) + HCallWithDescriptor(target, argument_count, descriptor, operands, zone); return res; } - virtual int OperandCount() const V8_FINAL V8_OVERRIDE { + virtual int OperandCount() const FINAL OVERRIDE { return values_.length(); } - virtual HValue* OperandAt(int index) const V8_FINAL V8_OVERRIDE { + virtual HValue* OperandAt(int index) const FINAL OVERRIDE { return values_[index]; } virtual Representation RequiredInputRepresentation( - int index) V8_FINAL V8_OVERRIDE { + int index) FINAL OVERRIDE { if (index == 0) { return Representation::Tagged(); } else { int par_index = index - 1; - DCHECK(par_index < descriptor_->GetEnvironmentLength()); - return descriptor_->GetParameterRepresentation(par_index); + DCHECK(par_index < descriptor_.GetEnvironmentLength()); + return descriptor_.GetParameterRepresentation(par_index); } } DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor) - virtual HType CalculateInferredType() V8_FINAL V8_OVERRIDE { + virtual HType CalculateInferredType() FINAL OVERRIDE { return HType::Tagged(); } @@ -2361,29 +2358,25 @@ class HCallWithDescriptor V8_FINAL : public HInstruction { return argument_count_; } - virtual int argument_delta() const V8_OVERRIDE { + virtual int argument_delta() const OVERRIDE { return -argument_count_; } - const InterfaceDescriptor* descriptor() const { - return descriptor_; - } + CallInterfaceDescriptor descriptor() const { return descriptor_; } HValue* target() { return OperandAt(0); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT private: // The argument count includes the receiver. - HCallWithDescriptor(HValue* target, - int argument_count, - const InterfaceDescriptor* descriptor, - const Vector<HValue*>& operands, - Zone* zone) - : descriptor_(descriptor), - values_(descriptor->GetEnvironmentLength() + 1, zone) { + HCallWithDescriptor(HValue* target, int argument_count, + CallInterfaceDescriptor descriptor, + const Vector<HValue*>& operands, Zone* zone) + : descriptor_(descriptor), + values_(descriptor.GetEnvironmentLength() + 1, zone) { argument_count_ = argument_count; AddOperand(target, zone); for (int i = 0; i < operands.length(); i++) { @@ -2399,17 +2392,17 @@ class HCallWithDescriptor V8_FINAL : public HInstruction { } void InternalSetOperandAt(int index, - HValue* value) V8_FINAL V8_OVERRIDE { + HValue* value) FINAL OVERRIDE { values_[index] = value; } - const InterfaceDescriptor* descriptor_; + CallInterfaceDescriptor descriptor_; ZoneList<HValue*> values_; int argument_count_; }; -class HInvokeFunction V8_FINAL : public HBinaryCall { +class HInvokeFunction FINAL : public HBinaryCall { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HInvokeFunction, HValue*, int); @@ -2440,7 +2433,7 @@ class HInvokeFunction V8_FINAL : public HBinaryCall { Handle<JSFunction> known_function() { return known_function_; } int formal_parameter_count() const { return formal_parameter_count_; } - virtual bool HasStackCheck() V8_FINAL V8_OVERRIDE { + virtual bool HasStackCheck() FINAL OVERRIDE { return has_stack_check_; } @@ -2458,7 +2451,7 @@ class HInvokeFunction V8_FINAL : public HBinaryCall { }; -class HCallFunction V8_FINAL : public HBinaryCall { +class HCallFunction FINAL : public HBinaryCall { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallFunction, HValue*, int); DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3( @@ -2470,7 +2463,7 @@ class HCallFunction V8_FINAL : public HBinaryCall { DECLARE_CONCRETE_INSTRUCTION(CallFunction) - virtual int argument_delta() const V8_OVERRIDE { return -argument_count(); } + virtual int argument_delta() const OVERRIDE { return -argument_count(); } private: HCallFunction(HValue* context, @@ -2483,7 +2476,7 @@ class HCallFunction V8_FINAL : public HBinaryCall { }; -class HCallNew V8_FINAL : public HBinaryCall { +class HCallNew FINAL : public HBinaryCall { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallNew, HValue*, int); @@ -2498,7 +2491,7 @@ class HCallNew V8_FINAL : public HBinaryCall { }; -class HCallNewArray V8_FINAL : public HBinaryCall { +class HCallNewArray FINAL : public HBinaryCall { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HCallNewArray, HValue*, @@ -2508,7 +2501,7 @@ class HCallNewArray V8_FINAL : public HBinaryCall { HValue* context() { return first(); } HValue* constructor() { return second(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT ElementsKind elements_kind() const { return elements_kind_; } @@ -2524,14 +2517,14 @@ class HCallNewArray V8_FINAL : public HBinaryCall { }; -class HCallRuntime V8_FINAL : public HCall<1> { +class HCallRuntime FINAL : public HCall<1> { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HCallRuntime, Handle<String>, const Runtime::Function*, int); - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT HValue* context() { return OperandAt(0); } const Runtime::Function* function() const { return c_function_; } @@ -2541,7 +2534,7 @@ class HCallRuntime V8_FINAL : public HCall<1> { save_doubles_ = save_doubles; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -2563,18 +2556,18 @@ class HCallRuntime V8_FINAL : public HCall<1> { }; -class HMapEnumLength V8_FINAL : public HUnaryOperation { +class HMapEnumLength FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HMapEnumLength, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(MapEnumLength) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: explicit HMapEnumLength(HValue* value) @@ -2584,11 +2577,11 @@ class HMapEnumLength V8_FINAL : public HUnaryOperation { SetDependsOnFlag(kMaps); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } }; -class HUnaryMathOperation V8_FINAL : public HTemplateInstruction<2> { +class HUnaryMathOperation FINAL : public HTemplateInstruction<2> { public: static HInstruction* New(Zone* zone, HValue* context, @@ -2598,9 +2591,9 @@ class HUnaryMathOperation V8_FINAL : public HTemplateInstruction<2> { HValue* context() const { return OperandAt(0); } HValue* value() const { return OperandAt(1); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { if (index == 0) { return Representation::Tagged(); } else { @@ -2624,11 +2617,11 @@ class HUnaryMathOperation V8_FINAL : public HTemplateInstruction<2> { } } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; - virtual HValue* Canonicalize() V8_OVERRIDE; - virtual Representation RepresentationFromUses() V8_OVERRIDE; - virtual Representation RepresentationFromInputs() V8_OVERRIDE; + virtual HValue* Canonicalize() OVERRIDE; + virtual Representation RepresentationFromUses() OVERRIDE; + virtual Representation RepresentationFromInputs() OVERRIDE; BuiltinFunctionId op() const { return op_; } const char* OpName() const; @@ -2636,7 +2629,7 @@ class HUnaryMathOperation V8_FINAL : public HTemplateInstruction<2> { DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { HUnaryMathOperation* b = HUnaryMathOperation::cast(other); return op_ == b->op(); } @@ -2688,7 +2681,7 @@ class HUnaryMathOperation V8_FINAL : public HTemplateInstruction<2> { SetFlag(kAllowUndefinedAsNaN); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } HValue* SimplifiedDividendForMathFloorOfDiv(HDiv* hdiv); HValue* SimplifiedDivisorForMathFloorOfDiv(HDiv* hdiv); @@ -2697,12 +2690,12 @@ class HUnaryMathOperation V8_FINAL : public HTemplateInstruction<2> { }; -class HLoadRoot V8_FINAL : public HTemplateInstruction<0> { +class HLoadRoot FINAL : public HTemplateInstruction<0> { public: DECLARE_INSTRUCTION_FACTORY_P1(HLoadRoot, Heap::RootListIndex); DECLARE_INSTRUCTION_FACTORY_P2(HLoadRoot, Heap::RootListIndex, HType); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } @@ -2711,7 +2704,7 @@ class HLoadRoot V8_FINAL : public HTemplateInstruction<0> { DECLARE_CONCRETE_INSTRUCTION(LoadRoot) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { HLoadRoot* b = HLoadRoot::cast(other); return index_ == b->index_; } @@ -2725,13 +2718,13 @@ class HLoadRoot V8_FINAL : public HTemplateInstruction<0> { SetDependsOnFlag(kCalls); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } const Heap::RootListIndex index_; }; -class HCheckMaps V8_FINAL : public HTemplateInstruction<2> { +class HCheckMaps FINAL : public HTemplateInstruction<2> { public: static HCheckMaps* New(Zone* zone, HValue* context, HValue* value, Handle<Map> map, HValue* typecheck = NULL) { @@ -2758,17 +2751,17 @@ class HCheckMaps V8_FINAL : public HTemplateInstruction<2> { ClearDependsOnFlag(kMaps); } - virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual bool HasEscapingOperandAt(int index) OVERRIDE { return false; } + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual HType CalculateInferredType() V8_OVERRIDE { + virtual HType CalculateInferredType() OVERRIDE { if (value()->type().IsHeapObject()) return value()->type(); return HType::HeapObject(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT HValue* value() const { return OperandAt(0); } HValue* typecheck() const { return OperandAt(1); } @@ -2780,7 +2773,7 @@ class HCheckMaps V8_FINAL : public HTemplateInstruction<2> { bool HasMigrationTarget() const { return has_migration_target_; } - virtual HValue* Canonicalize() V8_OVERRIDE; + virtual HValue* Canonicalize() OVERRIDE; static HCheckMaps* CreateAndInsertAfter(Zone* zone, HValue* value, @@ -2802,7 +2795,7 @@ class HCheckMaps V8_FINAL : public HTemplateInstruction<2> { DECLARE_CONCRETE_INSTRUCTION(CheckMaps) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { return this->maps()->Equals(HCheckMaps::cast(other)->maps()); } @@ -2850,7 +2843,7 @@ class HCheckMaps V8_FINAL : public HTemplateInstruction<2> { }; -class HCheckValue V8_FINAL : public HUnaryOperation { +class HCheckValue FINAL : public HUnaryOperation { public: static HCheckValue* New(Zone* zone, HValue* context, HValue* value, Handle<JSFunction> func) { @@ -2869,19 +2862,19 @@ class HCheckValue V8_FINAL : public HUnaryOperation { return new(zone) HCheckValue(value, target, object_in_new_space); } - virtual void FinalizeUniqueness() V8_OVERRIDE { + virtual void FinalizeUniqueness() OVERRIDE { object_ = Unique<HeapObject>(object_.handle()); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual HValue* Canonicalize() V8_OVERRIDE; + virtual HValue* Canonicalize() OVERRIDE; #ifdef DEBUG - virtual void Verify() V8_OVERRIDE; + virtual void Verify() OVERRIDE; #endif Unique<HeapObject> object() const { return object_; } @@ -2890,7 +2883,7 @@ class HCheckValue V8_FINAL : public HUnaryOperation { DECLARE_CONCRETE_INSTRUCTION(CheckValue) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { HCheckValue* b = HCheckValue::cast(other); return object_ == b->object_; } @@ -2910,7 +2903,7 @@ class HCheckValue V8_FINAL : public HUnaryOperation { }; -class HCheckInstanceType V8_FINAL : public HUnaryOperation { +class HCheckInstanceType FINAL : public HUnaryOperation { public: enum Check { IS_SPEC_OBJECT, @@ -2922,13 +2915,13 @@ class HCheckInstanceType V8_FINAL : public HUnaryOperation { DECLARE_INSTRUCTION_FACTORY_P2(HCheckInstanceType, HValue*, Check); - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual HType CalculateInferredType() V8_OVERRIDE { + virtual HType CalculateInferredType() OVERRIDE { switch (check_) { case IS_SPEC_OBJECT: return HType::JSObject(); case IS_JS_ARRAY: return HType::JSArray(); @@ -2939,7 +2932,7 @@ class HCheckInstanceType V8_FINAL : public HUnaryOperation { return HType::Tagged(); } - virtual HValue* Canonicalize() V8_OVERRIDE; + virtual HValue* Canonicalize() OVERRIDE; bool is_interval_check() const { return check_ <= LAST_INTERVAL_CHECK; } void GetCheckInterval(InstanceType* first, InstanceType* last); @@ -2953,7 +2946,7 @@ class HCheckInstanceType V8_FINAL : public HUnaryOperation { // TODO(ager): It could be nice to allow the ommision of instance // type checks if we have already performed an instance type check // with a larger range. - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { HCheckInstanceType* b = HCheckInstanceType::cast(other); return check_ == b->check_; } @@ -2973,15 +2966,15 @@ class HCheckInstanceType V8_FINAL : public HUnaryOperation { }; -class HCheckSmi V8_FINAL : public HUnaryOperation { +class HCheckSmi FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HCheckSmi, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual HValue* Canonicalize() V8_OVERRIDE { + virtual HValue* Canonicalize() OVERRIDE { HType value_type = value()->type(); if (value_type.IsSmi()) { return NULL; @@ -2992,7 +2985,7 @@ class HCheckSmi V8_FINAL : public HUnaryOperation { DECLARE_CONCRETE_INSTRUCTION(CheckSmi) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: explicit HCheckSmi(HValue* value) : HUnaryOperation(value, HType::Smi()) { @@ -3002,32 +2995,32 @@ class HCheckSmi V8_FINAL : public HUnaryOperation { }; -class HCheckHeapObject V8_FINAL : public HUnaryOperation { +class HCheckHeapObject FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HCheckHeapObject, HValue*); - virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual bool HasEscapingOperandAt(int index) OVERRIDE { return false; } + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual HType CalculateInferredType() V8_OVERRIDE { + virtual HType CalculateInferredType() OVERRIDE { if (value()->type().IsHeapObject()) return value()->type(); return HType::HeapObject(); } #ifdef DEBUG - virtual void Verify() V8_OVERRIDE; + virtual void Verify() OVERRIDE; #endif - virtual HValue* Canonicalize() V8_OVERRIDE { + virtual HValue* Canonicalize() OVERRIDE { return value()->type().IsHeapObject() ? NULL : this; } DECLARE_CONCRETE_INSTRUCTION(CheckHeapObject) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: explicit HCheckHeapObject(HValue* value) : HUnaryOperation(value) { @@ -3054,11 +3047,10 @@ struct InductionVariableLimitUpdate { class HBoundsCheck; class HPhi; -class HConstant; class HBitwise; -class InductionVariableData V8_FINAL : public ZoneObject { +class InductionVariableData FINAL : public ZoneObject { public: class InductionVariableCheck : public ZoneObject { public: @@ -3258,7 +3250,7 @@ class InductionVariableData V8_FINAL : public ZoneObject { }; -class HPhi V8_FINAL : public HValue { +class HPhi FINAL : public HValue { public: HPhi(int merged_index, Zone* zone) : inputs_(2, zone), @@ -3274,20 +3266,20 @@ class HPhi V8_FINAL : public HValue { SetFlag(kAllowUndefinedAsNaN); } - virtual Representation RepresentationFromInputs() V8_OVERRIDE; + virtual Representation RepresentationFromInputs() OVERRIDE; - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; virtual void InferRepresentation( - HInferRepresentationPhase* h_infer) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + HInferRepresentationPhase* h_infer) OVERRIDE; + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return representation(); } - virtual Representation KnownOptimalRepresentation() V8_OVERRIDE { + virtual Representation KnownOptimalRepresentation() OVERRIDE { return representation(); } - virtual HType CalculateInferredType() V8_OVERRIDE; - virtual int OperandCount() const V8_OVERRIDE { return inputs_.length(); } - virtual HValue* OperandAt(int index) const V8_OVERRIDE { + virtual HType CalculateInferredType() OVERRIDE; + virtual int OperandCount() const OVERRIDE { return inputs_.length(); } + virtual HValue* OperandAt(int index) const OVERRIDE { return inputs_[index]; } HValue* GetRedundantReplacement(); @@ -3297,7 +3289,7 @@ class HPhi V8_FINAL : public HValue { bool IsReceiver() const { return merged_index_ == 0; } bool HasMergedIndex() const { return merged_index_ != kInvalidMergedIndex; } - virtual HSourcePosition position() const V8_OVERRIDE; + virtual HSourcePosition position() const OVERRIDE; int merged_index() const { return merged_index_; } @@ -3316,10 +3308,10 @@ class HPhi V8_FINAL : public HValue { induction_variable_data_ = InductionVariableData::ExaminePhi(this); } - virtual OStream& PrintTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintTo(OStream& os) const OVERRIDE; // NOLINT #ifdef DEBUG - virtual void Verify() V8_OVERRIDE; + virtual void Verify() OVERRIDE; #endif void InitRealUses(int id); @@ -3356,7 +3348,7 @@ class HPhi V8_FINAL : public HValue { DCHECK(value->IsPhi()); return reinterpret_cast<HPhi*>(value); } - virtual Opcode opcode() const V8_OVERRIDE { return HValue::kPhi; } + virtual Opcode opcode() const OVERRIDE { return HValue::kPhi; } void SimplifyConstantInputs(); @@ -3364,8 +3356,8 @@ class HPhi V8_FINAL : public HValue { static const int kInvalidMergedIndex = -1; protected: - virtual void DeleteFromGraph() V8_OVERRIDE; - virtual void InternalSetOperandAt(int index, HValue* value) V8_OVERRIDE { + virtual void DeleteFromGraph() OVERRIDE; + virtual void InternalSetOperandAt(int index, HValue* value) OVERRIDE { inputs_[index] = value; } @@ -3379,7 +3371,7 @@ class HPhi V8_FINAL : public HValue { InductionVariableData* induction_variable_data_; // TODO(titzer): we can't eliminate the receiver for generating backtraces - virtual bool IsDeletable() const V8_OVERRIDE { return !IsReceiver(); } + virtual bool IsDeletable() const OVERRIDE { return !IsReceiver(); } }; @@ -3388,24 +3380,24 @@ class HDematerializedObject : public HInstruction { public: HDematerializedObject(int count, Zone* zone) : values_(count, zone) {} - virtual int OperandCount() const V8_FINAL V8_OVERRIDE { + virtual int OperandCount() const FINAL OVERRIDE { return values_.length(); } - virtual HValue* OperandAt(int index) const V8_FINAL V8_OVERRIDE { + virtual HValue* OperandAt(int index) const FINAL OVERRIDE { return values_[index]; } - virtual bool HasEscapingOperandAt(int index) V8_FINAL V8_OVERRIDE { + virtual bool HasEscapingOperandAt(int index) FINAL OVERRIDE { return false; } virtual Representation RequiredInputRepresentation( - int index) V8_FINAL V8_OVERRIDE { + int index) FINAL OVERRIDE { return Representation::None(); } protected: virtual void InternalSetOperandAt(int index, - HValue* value) V8_FINAL V8_OVERRIDE { + HValue* value) FINAL OVERRIDE { values_[index] = value; } @@ -3414,7 +3406,7 @@ class HDematerializedObject : public HInstruction { }; -class HArgumentsObject V8_FINAL : public HDematerializedObject { +class HArgumentsObject FINAL : public HDematerializedObject { public: static HArgumentsObject* New(Zone* zone, HValue* context, int count) { return new(zone) HArgumentsObject(count, zone); @@ -3441,7 +3433,7 @@ class HArgumentsObject V8_FINAL : public HDematerializedObject { }; -class HCapturedObject V8_FINAL : public HDematerializedObject { +class HCapturedObject FINAL : public HDematerializedObject { public: HCapturedObject(int length, int id, Zone* zone) : HDematerializedObject(length, zone), capture_id_(id) { @@ -3468,7 +3460,7 @@ class HCapturedObject V8_FINAL : public HDematerializedObject { // Replay effects of this instruction on the given environment. void ReplayEnvironment(HEnvironment* env); - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(CapturedObject) @@ -3478,11 +3470,11 @@ class HCapturedObject V8_FINAL : public HDematerializedObject { // Note that we cannot DCE captured objects as they are used to replay // the environment. This method is here as an explicit reminder. // TODO(mstarzinger): Turn HSimulates into full snapshots maybe? - virtual bool IsDeletable() const V8_FINAL V8_OVERRIDE { return false; } + virtual bool IsDeletable() const FINAL OVERRIDE { return false; } }; -class HConstant V8_FINAL : public HTemplateInstruction<0> { +class HConstant FINAL : public HTemplateInstruction<0> { public: DECLARE_INSTRUCTION_FACTORY_P1(HConstant, int32_t); DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation); @@ -3499,6 +3491,14 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> { zone, context, value, representation)); } + virtual Handle<Map> GetMonomorphicJSObjectMap() OVERRIDE { + Handle<Object> object = object_.handle(); + if (!object.is_null() && object->IsHeapObject()) { + return v8::internal::handle(HeapObject::cast(*object)->map()); + } + return Handle<Map>(); + } + static HConstant* CreateAndInsertBefore(Zone* zone, HValue* context, int32_t value, @@ -3542,9 +3542,9 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> { bool IsSpecialDouble() const { return has_double_value_ && - (BitCast<int64_t>(double_value_) == BitCast<int64_t>(-0.0) || - FixedDoubleArray::is_the_hole_nan(double_value_) || - std::isnan(double_value_)); + (bit_cast<int64_t>(double_value_) == bit_cast<int64_t>(-0.0) || + FixedDoubleArray::is_the_hole_nan(double_value_) || + std::isnan(double_value_)); } bool NotInNewSpace() const { @@ -3561,11 +3561,11 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> { return instance_type_ == MAP_TYPE; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } - virtual Representation KnownOptimalRepresentation() V8_OVERRIDE { + virtual Representation KnownOptimalRepresentation() OVERRIDE { if (HasSmiValue() && SmiValuesAre31Bits()) return Representation::Smi(); if (HasInteger32Value()) return Representation::Integer32(); if (HasNumberValue()) return Representation::Double(); @@ -3573,8 +3573,8 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> { return Representation::Tagged(); } - virtual bool EmitAtUses() V8_OVERRIDE; - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual bool EmitAtUses() OVERRIDE; + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT HConstant* CopyToRepresentation(Representation r, Zone* zone) const; Maybe<HConstant*> CopyToTruncatedInt32(Zone* zone); Maybe<HConstant*> CopyToTruncatedNumber(Zone* zone); @@ -3593,7 +3593,8 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> { if (HasDoubleValue() && FixedDoubleArray::is_the_hole_nan(double_value_)) { return true; } - return object_.IsKnownGlobal(isolate()->heap()->the_hole_value()); + return object_.IsInitialized() && + object_.IsKnownGlobal(isolate()->heap()->the_hole_value()); } bool HasNumberValue() const { return has_double_value_; } int32_t NumberValueAsInteger32() const { @@ -3644,11 +3645,11 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> { return object_map_; } - virtual intptr_t Hashcode() V8_OVERRIDE { + virtual intptr_t Hashcode() OVERRIDE { if (has_int32_value_) { return static_cast<intptr_t>(int32_value_); } else if (has_double_value_) { - return static_cast<intptr_t>(BitCast<int64_t>(double_value_)); + return static_cast<intptr_t>(bit_cast<int64_t>(double_value_)); } else if (has_external_reference_value_) { return reinterpret_cast<intptr_t>(external_reference_value_.address()); } else { @@ -3657,7 +3658,7 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> { } } - virtual void FinalizeUniqueness() V8_OVERRIDE { + virtual void FinalizeUniqueness() OVERRIDE { if (!has_double_value_ && !has_external_reference_value_) { DCHECK(!object_.handle().is_null()); object_ = Unique<Object>(object_.handle()); @@ -3672,15 +3673,15 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> { return object_.IsInitialized() && object_ == other; } - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { HConstant* other_constant = HConstant::cast(other); if (has_int32_value_) { return other_constant->has_int32_value_ && int32_value_ == other_constant->int32_value_; } else if (has_double_value_) { return other_constant->has_double_value_ && - BitCast<int64_t>(double_value_) == - BitCast<int64_t>(other_constant->double_value_); + bit_cast<int64_t>(double_value_) == + bit_cast<int64_t>(other_constant->double_value_); } else if (has_external_reference_value_) { return other_constant->has_external_reference_value_ && external_reference_value_ == @@ -3697,13 +3698,13 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> { } #ifdef DEBUG - virtual void Verify() V8_OVERRIDE { } + virtual void Verify() OVERRIDE { } #endif DECLARE_CONCRETE_INSTRUCTION(Constant) protected: - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; private: friend class HGraph; @@ -3731,7 +3732,7 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> { void Initialize(Representation r); - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } // If this is a numerical constant, object_ either points to the // HeapObject the constant originated from or is null. If the @@ -3816,30 +3817,30 @@ class HBinaryOperation : public HTemplateInstruction<3> { observed_output_representation_ = observed; } - virtual Representation observed_input_representation(int index) V8_OVERRIDE { + virtual Representation observed_input_representation(int index) OVERRIDE { if (index == 0) return Representation::Tagged(); return observed_input_representation_[index - 1]; } virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) V8_OVERRIDE { + const char* reason) OVERRIDE { Representation rep = !FLAG_smi_binop && new_rep.IsSmi() ? Representation::Integer32() : new_rep; HValue::UpdateRepresentation(rep, h_infer, reason); } virtual void InferRepresentation( - HInferRepresentationPhase* h_infer) V8_OVERRIDE; - virtual Representation RepresentationFromInputs() V8_OVERRIDE; + HInferRepresentationPhase* h_infer) OVERRIDE; + virtual Representation RepresentationFromInputs() OVERRIDE; Representation RepresentationFromOutput(); - virtual void AssumeRepresentation(Representation r) V8_OVERRIDE; + virtual void AssumeRepresentation(Representation r) OVERRIDE; virtual bool IsCommutative() const { return false; } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { if (index == 0) return Representation::Tagged(); return representation(); } @@ -3854,7 +3855,10 @@ class HBinaryOperation : public HTemplateInstruction<3> { bool RightIsPowerOf2() { if (!right()->IsInteger32Constant()) return false; int32_t value = right()->GetInteger32Constant(); - return IsPowerOf2(value) || IsPowerOf2(-value); + if (value < 0) { + return base::bits::IsPowerOfTwo32(static_cast<uint32_t>(-value)); + } + return base::bits::IsPowerOfTwo32(static_cast<uint32_t>(value)); } DECLARE_ABSTRACT_INSTRUCTION(BinaryOperation) @@ -3867,22 +3871,22 @@ class HBinaryOperation : public HTemplateInstruction<3> { }; -class HWrapReceiver V8_FINAL : public HTemplateInstruction<2> { +class HWrapReceiver FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_FACTORY_P2(HWrapReceiver, HValue*, HValue*); - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } HValue* receiver() const { return OperandAt(0); } HValue* function() const { return OperandAt(1); } - virtual HValue* Canonicalize() V8_OVERRIDE; + virtual HValue* Canonicalize() OVERRIDE; - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT bool known_function() const { return known_function_; } DECLARE_CONCRETE_INSTRUCTION(WrapReceiver) @@ -3901,12 +3905,12 @@ class HWrapReceiver V8_FINAL : public HTemplateInstruction<2> { }; -class HApplyArguments V8_FINAL : public HTemplateInstruction<4> { +class HApplyArguments FINAL : public HTemplateInstruction<4> { public: DECLARE_INSTRUCTION_FACTORY_P4(HApplyArguments, HValue*, HValue*, HValue*, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { // The length is untagged, all other inputs are tagged. return (index == 2) ? Representation::Integer32() @@ -3935,20 +3939,20 @@ class HApplyArguments V8_FINAL : public HTemplateInstruction<4> { }; -class HArgumentsElements V8_FINAL : public HTemplateInstruction<0> { +class HArgumentsElements FINAL : public HTemplateInstruction<0> { public: DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsElements, bool); DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements) - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } bool from_inlined() const { return from_inlined_; } protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: explicit HArgumentsElements(bool from_inlined) : from_inlined_(from_inlined) { @@ -3958,24 +3962,24 @@ class HArgumentsElements V8_FINAL : public HTemplateInstruction<0> { SetFlag(kUseGVN); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } bool from_inlined_; }; -class HArgumentsLength V8_FINAL : public HUnaryOperation { +class HArgumentsLength FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsLength, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: explicit HArgumentsLength(HValue* value) : HUnaryOperation(value) { @@ -3983,17 +3987,17 @@ class HArgumentsLength V8_FINAL : public HUnaryOperation { SetFlag(kUseGVN); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } }; -class HAccessArgumentsAt V8_FINAL : public HTemplateInstruction<3> { +class HAccessArgumentsAt FINAL : public HTemplateInstruction<3> { public: DECLARE_INSTRUCTION_FACTORY_P3(HAccessArgumentsAt, HValue*, HValue*, HValue*); - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { // The arguments elements is considered tagged. return index == 0 ? Representation::Tagged() @@ -4015,14 +4019,14 @@ class HAccessArgumentsAt V8_FINAL : public HTemplateInstruction<3> { SetOperandAt(2, index); } - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } }; class HBoundsCheckBaseIndexInformation; -class HBoundsCheck V8_FINAL : public HTemplateInstruction<2> { +class HBoundsCheck FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_FACTORY_P2(HBoundsCheck, HValue*, HValue*); @@ -4051,21 +4055,21 @@ class HBoundsCheck V8_FINAL : public HTemplateInstruction<2> { } } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return representation(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT virtual void InferRepresentation( - HInferRepresentationPhase* h_infer) V8_OVERRIDE; + HInferRepresentationPhase* h_infer) OVERRIDE; HValue* index() const { return OperandAt(0); } HValue* length() const { return OperandAt(1); } bool allow_equality() const { return allow_equality_; } void set_allow_equality(bool v) { allow_equality_ = v; } - virtual int RedefinedOperandIndex() V8_OVERRIDE { return 0; } - virtual bool IsPurelyInformativeDefinition() V8_OVERRIDE { + virtual int RedefinedOperandIndex() OVERRIDE { return 0; } + virtual bool IsPurelyInformativeDefinition() OVERRIDE { return skip_check(); } @@ -4074,9 +4078,9 @@ class HBoundsCheck V8_FINAL : public HTemplateInstruction<2> { protected: friend class HBoundsCheckBaseIndexInformation; - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } bool skip_check_; HValue* base_; int offset_; @@ -4098,13 +4102,13 @@ class HBoundsCheck V8_FINAL : public HTemplateInstruction<2> { SetFlag(kUseGVN); } - virtual bool IsDeletable() const V8_OVERRIDE { + virtual bool IsDeletable() const OVERRIDE { return skip_check() && !FLAG_debug_code; } }; -class HBoundsCheckBaseIndexInformation V8_FINAL +class HBoundsCheckBaseIndexInformation FINAL : public HTemplateInstruction<2> { public: explicit HBoundsCheckBaseIndexInformation(HBoundsCheck* check) { @@ -4122,14 +4126,14 @@ class HBoundsCheckBaseIndexInformation V8_FINAL DECLARE_CONCRETE_INSTRUCTION(BoundsCheckBaseIndexInformation) - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return representation(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual int RedefinedOperandIndex() V8_OVERRIDE { return 0; } - virtual bool IsPurelyInformativeDefinition() V8_OVERRIDE { return true; } + virtual int RedefinedOperandIndex() OVERRIDE { return 0; } + virtual bool IsPurelyInformativeDefinition() OVERRIDE { return true; } }; @@ -4144,7 +4148,7 @@ class HBitwiseBinaryOperation : public HBinaryOperation { SetAllSideEffects(); } - virtual void RepresentationChanged(Representation to) V8_OVERRIDE { + virtual void RepresentationChanged(Representation to) OVERRIDE { if (to.IsTagged() && (left()->ToNumberCanBeObserved() || right()->ToNumberCanBeObserved())) { SetAllSideEffects(); @@ -4158,13 +4162,13 @@ class HBitwiseBinaryOperation : public HBinaryOperation { virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) V8_OVERRIDE { + const char* reason) OVERRIDE { // We only generate either int32 or generic tagged bitwise operations. if (new_rep.IsDouble()) new_rep = Representation::Integer32(); HBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); } - virtual Representation observed_input_representation(int index) V8_OVERRIDE { + virtual Representation observed_input_representation(int index) OVERRIDE { Representation r = HBinaryOperation::observed_input_representation(index); if (r.IsDouble()) return Representation::Integer32(); return r; @@ -4178,11 +4182,11 @@ class HBitwiseBinaryOperation : public HBinaryOperation { DECLARE_ABSTRACT_INSTRUCTION(BitwiseBinaryOperation) private: - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } }; -class HMathFloorOfDiv V8_FINAL : public HBinaryOperation { +class HMathFloorOfDiv FINAL : public HBinaryOperation { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HMathFloorOfDiv, HValue*, @@ -4191,7 +4195,7 @@ class HMathFloorOfDiv V8_FINAL : public HBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: HMathFloorOfDiv(HValue* context, HValue* left, HValue* right) @@ -4206,9 +4210,9 @@ class HMathFloorOfDiv V8_FINAL : public HBinaryOperation { SetFlag(kAllowUndefinedAsNaN); } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } }; @@ -4221,7 +4225,7 @@ class HArithmeticBinaryOperation : public HBinaryOperation { SetFlag(kAllowUndefinedAsNaN); } - virtual void RepresentationChanged(Representation to) V8_OVERRIDE { + virtual void RepresentationChanged(Representation to) OVERRIDE { if (to.IsTagged() && (left()->ToNumberCanBeObserved() || right()->ToNumberCanBeObserved())) { SetAllSideEffects(); @@ -4236,23 +4240,23 @@ class HArithmeticBinaryOperation : public HBinaryOperation { DECLARE_ABSTRACT_INSTRUCTION(ArithmeticBinaryOperation) private: - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } }; -class HCompareGeneric V8_FINAL : public HBinaryOperation { +class HCompareGeneric FINAL : public HBinaryOperation { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HCompareGeneric, HValue*, HValue*, Token::Value); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return index == 0 ? Representation::Tagged() : representation(); } Token::Value token() const { return token_; } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(CompareGeneric) @@ -4291,18 +4295,18 @@ class HCompareNumericAndBranch : public HTemplateControlInstruction<2, 2> { } virtual void InferRepresentation( - HInferRepresentationPhase* h_infer) V8_OVERRIDE; + HInferRepresentationPhase* h_infer) OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return representation(); } - virtual Representation observed_input_representation(int index) V8_OVERRIDE { + virtual Representation observed_input_representation(int index) OVERRIDE { return observed_input_representation_[index]; } - virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; + virtual bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE; - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT void SetOperandPositions(Zone* zone, HSourcePosition left_pos, @@ -4333,16 +4337,16 @@ class HCompareNumericAndBranch : public HTemplateControlInstruction<2, 2> { }; -class HCompareHoleAndBranch V8_FINAL : public HUnaryControlInstruction { +class HCompareHoleAndBranch FINAL : public HUnaryControlInstruction { public: DECLARE_INSTRUCTION_FACTORY_P1(HCompareHoleAndBranch, HValue*); DECLARE_INSTRUCTION_FACTORY_P3(HCompareHoleAndBranch, HValue*, HBasicBlock*, HBasicBlock*); virtual void InferRepresentation( - HInferRepresentationPhase* h_infer) V8_OVERRIDE; + HInferRepresentationPhase* h_infer) OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return representation(); } @@ -4359,18 +4363,18 @@ class HCompareHoleAndBranch V8_FINAL : public HUnaryControlInstruction { }; -class HCompareMinusZeroAndBranch V8_FINAL : public HUnaryControlInstruction { +class HCompareMinusZeroAndBranch FINAL : public HUnaryControlInstruction { public: DECLARE_INSTRUCTION_FACTORY_P1(HCompareMinusZeroAndBranch, HValue*); virtual void InferRepresentation( - HInferRepresentationPhase* h_infer) V8_OVERRIDE; + HInferRepresentationPhase* h_infer) OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return representation(); } - virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; + virtual bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(CompareMinusZeroAndBranch) @@ -4387,7 +4391,7 @@ class HCompareObjectEqAndBranch : public HTemplateControlInstruction<2, 2> { DECLARE_INSTRUCTION_FACTORY_P4(HCompareObjectEqAndBranch, HValue*, HValue*, HBasicBlock*, HBasicBlock*); - virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; + virtual bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE; static const int kNoKnownSuccessorIndex = -1; int known_successor_index() const { return known_successor_index_; } @@ -4398,13 +4402,13 @@ class HCompareObjectEqAndBranch : public HTemplateControlInstruction<2, 2> { HValue* left() const { return OperandAt(0); } HValue* right() const { return OperandAt(1); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual Representation observed_input_representation(int index) V8_OVERRIDE { + virtual Representation observed_input_representation(int index) OVERRIDE { return Representation::Tagged(); } @@ -4426,17 +4430,17 @@ class HCompareObjectEqAndBranch : public HTemplateControlInstruction<2, 2> { }; -class HIsObjectAndBranch V8_FINAL : public HUnaryControlInstruction { +class HIsObjectAndBranch FINAL : public HUnaryControlInstruction { public: DECLARE_INSTRUCTION_FACTORY_P1(HIsObjectAndBranch, HValue*); DECLARE_INSTRUCTION_FACTORY_P3(HIsObjectAndBranch, HValue*, HBasicBlock*, HBasicBlock*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; + virtual bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch) @@ -4448,17 +4452,17 @@ class HIsObjectAndBranch V8_FINAL : public HUnaryControlInstruction { }; -class HIsStringAndBranch V8_FINAL : public HUnaryControlInstruction { +class HIsStringAndBranch FINAL : public HUnaryControlInstruction { public: DECLARE_INSTRUCTION_FACTORY_P1(HIsStringAndBranch, HValue*); DECLARE_INSTRUCTION_FACTORY_P3(HIsStringAndBranch, HValue*, HBasicBlock*, HBasicBlock*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; + virtual bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE; static const int kNoKnownSuccessorIndex = -1; int known_successor_index() const { return known_successor_index_; } @@ -4482,7 +4486,7 @@ class HIsStringAndBranch V8_FINAL : public HUnaryControlInstruction { }; -class HIsSmiAndBranch V8_FINAL : public HUnaryControlInstruction { +class HIsSmiAndBranch FINAL : public HUnaryControlInstruction { public: DECLARE_INSTRUCTION_FACTORY_P1(HIsSmiAndBranch, HValue*); DECLARE_INSTRUCTION_FACTORY_P3(HIsSmiAndBranch, HValue*, @@ -4490,12 +4494,12 @@ class HIsSmiAndBranch V8_FINAL : public HUnaryControlInstruction { DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch) - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } virtual int RedefinedOperandIndex() { return 0; } private: @@ -4508,17 +4512,17 @@ class HIsSmiAndBranch V8_FINAL : public HUnaryControlInstruction { }; -class HIsUndetectableAndBranch V8_FINAL : public HUnaryControlInstruction { +class HIsUndetectableAndBranch FINAL : public HUnaryControlInstruction { public: DECLARE_INSTRUCTION_FACTORY_P1(HIsUndetectableAndBranch, HValue*); DECLARE_INSTRUCTION_FACTORY_P3(HIsUndetectableAndBranch, HValue*, HBasicBlock*, HBasicBlock*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; + virtual bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch) @@ -4542,9 +4546,9 @@ class HStringCompareAndBranch : public HTemplateControlInstruction<2, 3> { HValue* right() { return OperandAt(2); } Token::Value token() const { return token_; } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -4576,7 +4580,7 @@ class HIsConstructCallAndBranch : public HTemplateControlInstruction<2, 0> { public: DECLARE_INSTRUCTION_FACTORY_P0(HIsConstructCallAndBranch); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } @@ -4586,7 +4590,7 @@ class HIsConstructCallAndBranch : public HTemplateControlInstruction<2, 0> { }; -class HHasInstanceTypeAndBranch V8_FINAL : public HUnaryControlInstruction { +class HHasInstanceTypeAndBranch FINAL : public HUnaryControlInstruction { public: DECLARE_INSTRUCTION_FACTORY_P2( HHasInstanceTypeAndBranch, HValue*, InstanceType); @@ -4596,13 +4600,13 @@ class HHasInstanceTypeAndBranch V8_FINAL : public HUnaryControlInstruction { InstanceType from() { return from_; } InstanceType to() { return to_; } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; + virtual bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch) @@ -4619,11 +4623,11 @@ class HHasInstanceTypeAndBranch V8_FINAL : public HUnaryControlInstruction { }; -class HHasCachedArrayIndexAndBranch V8_FINAL : public HUnaryControlInstruction { +class HHasCachedArrayIndexAndBranch FINAL : public HUnaryControlInstruction { public: DECLARE_INSTRUCTION_FACTORY_P1(HHasCachedArrayIndexAndBranch, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -4634,18 +4638,18 @@ class HHasCachedArrayIndexAndBranch V8_FINAL : public HUnaryControlInstruction { }; -class HGetCachedArrayIndex V8_FINAL : public HUnaryOperation { +class HGetCachedArrayIndex FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HGetCachedArrayIndex, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: explicit HGetCachedArrayIndex(HValue* value) : HUnaryOperation(value) { @@ -4653,22 +4657,22 @@ class HGetCachedArrayIndex V8_FINAL : public HUnaryOperation { SetFlag(kUseGVN); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } }; -class HClassOfTestAndBranch V8_FINAL : public HUnaryControlInstruction { +class HClassOfTestAndBranch FINAL : public HUnaryControlInstruction { public: DECLARE_INSTRUCTION_FACTORY_P2(HClassOfTestAndBranch, HValue*, Handle<String>); DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch) - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT Handle<String> class_name() const { return class_name_; } @@ -4681,22 +4685,22 @@ class HClassOfTestAndBranch V8_FINAL : public HUnaryControlInstruction { }; -class HTypeofIsAndBranch V8_FINAL : public HUnaryControlInstruction { +class HTypeofIsAndBranch FINAL : public HUnaryControlInstruction { public: DECLARE_INSTRUCTION_FACTORY_P2(HTypeofIsAndBranch, HValue*, Handle<String>); Handle<String> type_literal() const { return type_literal_.handle(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch) - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } - virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; + virtual bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE; - virtual void FinalizeUniqueness() V8_OVERRIDE { + virtual void FinalizeUniqueness() OVERRIDE { type_literal_ = Unique<String>(type_literal_.handle()); } @@ -4709,15 +4713,15 @@ class HTypeofIsAndBranch V8_FINAL : public HUnaryControlInstruction { }; -class HInstanceOf V8_FINAL : public HBinaryOperation { +class HInstanceOf FINAL : public HBinaryOperation { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HInstanceOf, HValue*, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(InstanceOf) @@ -4730,7 +4734,7 @@ class HInstanceOf V8_FINAL : public HBinaryOperation { }; -class HInstanceOfKnownGlobal V8_FINAL : public HTemplateInstruction<2> { +class HInstanceOfKnownGlobal FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HInstanceOfKnownGlobal, HValue*, @@ -4740,7 +4744,7 @@ class HInstanceOfKnownGlobal V8_FINAL : public HTemplateInstruction<2> { HValue* left() { return OperandAt(1); } Handle<JSFunction> function() { return function_; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -4761,7 +4765,7 @@ class HInstanceOfKnownGlobal V8_FINAL : public HTemplateInstruction<2> { }; -class HPower V8_FINAL : public HTemplateInstruction<2> { +class HPower FINAL : public HTemplateInstruction<2> { public: static HInstruction* New(Zone* zone, HValue* context, @@ -4771,19 +4775,19 @@ class HPower V8_FINAL : public HTemplateInstruction<2> { HValue* left() { return OperandAt(0); } HValue* right() const { return OperandAt(1); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return index == 0 ? Representation::Double() : Representation::None(); } - virtual Representation observed_input_representation(int index) V8_OVERRIDE { + virtual Representation observed_input_representation(int index) OVERRIDE { return RequiredInputRepresentation(index); } DECLARE_CONCRETE_INSTRUCTION(Power) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: HPower(HValue* left, HValue* right) { @@ -4794,13 +4798,13 @@ class HPower V8_FINAL : public HTemplateInstruction<2> { SetChangesFlag(kNewSpacePromotion); } - virtual bool IsDeletable() const V8_OVERRIDE { + virtual bool IsDeletable() const OVERRIDE { return !right()->representation().IsTagged(); } }; -class HAdd V8_FINAL : public HArithmeticBinaryOperation { +class HAdd FINAL : public HArithmeticBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, @@ -4810,13 +4814,13 @@ class HAdd V8_FINAL : public HArithmeticBinaryOperation { // Add is only commutative if two integer values are added and not if two // tagged values are added (because it might be a String concatenation). // We also do not commute (pointer + offset). - virtual bool IsCommutative() const V8_OVERRIDE { + virtual bool IsCommutative() const OVERRIDE { return !representation().IsTagged() && !representation().IsExternal(); } - virtual HValue* Canonicalize() V8_OVERRIDE; + virtual HValue* Canonicalize() OVERRIDE; - virtual bool TryDecompose(DecompositionResult* decomposition) V8_OVERRIDE { + virtual bool TryDecompose(DecompositionResult* decomposition) OVERRIDE { if (left()->IsInteger32Constant()) { decomposition->Apply(right(), left()->GetInteger32Constant()); return true; @@ -4828,7 +4832,7 @@ class HAdd V8_FINAL : public HArithmeticBinaryOperation { } } - virtual void RepresentationChanged(Representation to) V8_OVERRIDE { + virtual void RepresentationChanged(Representation to) OVERRIDE { if (to.IsTagged() && (left()->ToNumberCanBeObserved() || right()->ToNumberCanBeObserved() || left()->ToStringCanBeObserved() || right()->ToStringCanBeObserved())) { @@ -4844,16 +4848,16 @@ class HAdd V8_FINAL : public HArithmeticBinaryOperation { } } - virtual Representation RepresentationFromInputs() V8_OVERRIDE; + virtual Representation RepresentationFromInputs() OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE; + virtual Representation RequiredInputRepresentation(int index) OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(Add) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; private: HAdd(HValue* context, HValue* left, HValue* right) @@ -4863,16 +4867,16 @@ class HAdd V8_FINAL : public HArithmeticBinaryOperation { }; -class HSub V8_FINAL : public HArithmeticBinaryOperation { +class HSub FINAL : public HArithmeticBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, HValue* left, HValue* right); - virtual HValue* Canonicalize() V8_OVERRIDE; + virtual HValue* Canonicalize() OVERRIDE; - virtual bool TryDecompose(DecompositionResult* decomposition) V8_OVERRIDE { + virtual bool TryDecompose(DecompositionResult* decomposition) OVERRIDE { if (right()->IsInteger32Constant()) { decomposition->Apply(left(), -right()->GetInteger32Constant()); return true; @@ -4884,9 +4888,9 @@ class HSub V8_FINAL : public HArithmeticBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Sub) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; private: HSub(HValue* context, HValue* left, HValue* right) @@ -4896,7 +4900,7 @@ class HSub V8_FINAL : public HArithmeticBinaryOperation { }; -class HMul V8_FINAL : public HArithmeticBinaryOperation { +class HMul FINAL : public HArithmeticBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, @@ -4916,16 +4920,16 @@ class HMul V8_FINAL : public HArithmeticBinaryOperation { return mul; } - virtual HValue* Canonicalize() V8_OVERRIDE; + virtual HValue* Canonicalize() OVERRIDE; // Only commutative if it is certain that not two objects are multiplicated. - virtual bool IsCommutative() const V8_OVERRIDE { + virtual bool IsCommutative() const OVERRIDE { return !representation().IsTagged(); } virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) V8_OVERRIDE { + const char* reason) OVERRIDE { HArithmeticBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); } @@ -4934,9 +4938,9 @@ class HMul V8_FINAL : public HArithmeticBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Mul) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; private: HMul(HValue* context, HValue* left, HValue* right) @@ -4946,18 +4950,18 @@ class HMul V8_FINAL : public HArithmeticBinaryOperation { }; -class HMod V8_FINAL : public HArithmeticBinaryOperation { +class HMod FINAL : public HArithmeticBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, HValue* left, HValue* right); - virtual HValue* Canonicalize() V8_OVERRIDE; + virtual HValue* Canonicalize() OVERRIDE; virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) V8_OVERRIDE { + const char* reason) OVERRIDE { if (new_rep.IsSmi()) new_rep = Representation::Integer32(); HArithmeticBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); } @@ -4965,9 +4969,9 @@ class HMod V8_FINAL : public HArithmeticBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Mod) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; private: HMod(HValue* context, @@ -4980,18 +4984,18 @@ class HMod V8_FINAL : public HArithmeticBinaryOperation { }; -class HDiv V8_FINAL : public HArithmeticBinaryOperation { +class HDiv FINAL : public HArithmeticBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, HValue* left, HValue* right); - virtual HValue* Canonicalize() V8_OVERRIDE; + virtual HValue* Canonicalize() OVERRIDE; virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) V8_OVERRIDE { + const char* reason) OVERRIDE { if (new_rep.IsSmi()) new_rep = Representation::Integer32(); HArithmeticBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); } @@ -4999,9 +5003,9 @@ class HDiv V8_FINAL : public HArithmeticBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Div) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; private: HDiv(HValue* context, HValue* left, HValue* right) @@ -5012,7 +5016,7 @@ class HDiv V8_FINAL : public HArithmeticBinaryOperation { }; -class HMathMinMax V8_FINAL : public HArithmeticBinaryOperation { +class HMathMinMax FINAL : public HArithmeticBinaryOperation { public: enum Operation { kMathMin, kMathMax }; @@ -5022,14 +5026,14 @@ class HMathMinMax V8_FINAL : public HArithmeticBinaryOperation { HValue* right, Operation op); - virtual Representation observed_input_representation(int index) V8_OVERRIDE { + virtual Representation observed_input_representation(int index) OVERRIDE { return RequiredInputRepresentation(index); } virtual void InferRepresentation( - HInferRepresentationPhase* h_infer) V8_OVERRIDE; + HInferRepresentationPhase* h_infer) OVERRIDE; - virtual Representation RepresentationFromInputs() V8_OVERRIDE { + virtual Representation RepresentationFromInputs() OVERRIDE { Representation left_rep = left()->representation(); Representation right_rep = right()->representation(); Representation result = Representation::Smi(); @@ -5039,19 +5043,19 @@ class HMathMinMax V8_FINAL : public HArithmeticBinaryOperation { return result; } - virtual bool IsCommutative() const V8_OVERRIDE { return true; } + virtual bool IsCommutative() const OVERRIDE { return true; } Operation operation() { return operation_; } DECLARE_CONCRETE_INSTRUCTION(MathMinMax) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { return other->IsMathMinMax() && HMathMinMax::cast(other)->operation_ == operation_; } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; private: HMathMinMax(HValue* context, HValue* left, HValue* right, Operation op) @@ -5062,7 +5066,7 @@ class HMathMinMax V8_FINAL : public HArithmeticBinaryOperation { }; -class HBitwise V8_FINAL : public HBitwiseBinaryOperation { +class HBitwise FINAL : public HBitwiseBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, @@ -5072,20 +5076,20 @@ class HBitwise V8_FINAL : public HBitwiseBinaryOperation { Token::Value op() const { return op_; } - virtual bool IsCommutative() const V8_OVERRIDE { return true; } + virtual bool IsCommutative() const OVERRIDE { return true; } - virtual HValue* Canonicalize() V8_OVERRIDE; + virtual HValue* Canonicalize() OVERRIDE; - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(Bitwise) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { return op() == HBitwise::cast(other)->op(); } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; private: HBitwise(HValue* context, @@ -5124,18 +5128,18 @@ class HBitwise V8_FINAL : public HBitwiseBinaryOperation { }; -class HShl V8_FINAL : public HBitwiseBinaryOperation { +class HShl FINAL : public HBitwiseBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, HValue* left, HValue* right); - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) V8_OVERRIDE { + const char* reason) OVERRIDE { if (new_rep.IsSmi() && !(right()->IsInteger32Constant() && right()->GetInteger32Constant() >= 0)) { @@ -5147,7 +5151,7 @@ class HShl V8_FINAL : public HBitwiseBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Shl) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: HShl(HValue* context, HValue* left, HValue* right) @@ -5155,14 +5159,14 @@ class HShl V8_FINAL : public HBitwiseBinaryOperation { }; -class HShr V8_FINAL : public HBitwiseBinaryOperation { +class HShr FINAL : public HBitwiseBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, HValue* left, HValue* right); - virtual bool TryDecompose(DecompositionResult* decomposition) V8_OVERRIDE { + virtual bool TryDecompose(DecompositionResult* decomposition) OVERRIDE { if (right()->IsInteger32Constant()) { if (decomposition->Apply(left(), 0, right()->GetInteger32Constant())) { // This is intended to look for HAdd and HSub, to handle compounds @@ -5174,11 +5178,11 @@ class HShr V8_FINAL : public HBitwiseBinaryOperation { return false; } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) V8_OVERRIDE { + const char* reason) OVERRIDE { if (new_rep.IsSmi()) new_rep = Representation::Integer32(); HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); } @@ -5186,7 +5190,7 @@ class HShr V8_FINAL : public HBitwiseBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Shr) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: HShr(HValue* context, HValue* left, HValue* right) @@ -5194,14 +5198,14 @@ class HShr V8_FINAL : public HBitwiseBinaryOperation { }; -class HSar V8_FINAL : public HBitwiseBinaryOperation { +class HSar FINAL : public HBitwiseBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, HValue* left, HValue* right); - virtual bool TryDecompose(DecompositionResult* decomposition) V8_OVERRIDE { + virtual bool TryDecompose(DecompositionResult* decomposition) OVERRIDE { if (right()->IsInteger32Constant()) { if (decomposition->Apply(left(), 0, right()->GetInteger32Constant())) { // This is intended to look for HAdd and HSub, to handle compounds @@ -5213,11 +5217,11 @@ class HSar V8_FINAL : public HBitwiseBinaryOperation { return false; } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) V8_OVERRIDE { + const char* reason) OVERRIDE { if (new_rep.IsSmi()) new_rep = Representation::Integer32(); HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); } @@ -5225,7 +5229,7 @@ class HSar V8_FINAL : public HBitwiseBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Sar) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: HSar(HValue* context, HValue* left, HValue* right) @@ -5233,7 +5237,7 @@ class HSar V8_FINAL : public HBitwiseBinaryOperation { }; -class HRor V8_FINAL : public HBitwiseBinaryOperation { +class HRor FINAL : public HBitwiseBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, @@ -5244,7 +5248,7 @@ class HRor V8_FINAL : public HBitwiseBinaryOperation { virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) V8_OVERRIDE { + const char* reason) OVERRIDE { if (new_rep.IsSmi()) new_rep = Representation::Integer32(); HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); } @@ -5252,7 +5256,7 @@ class HRor V8_FINAL : public HBitwiseBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Ror) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: HRor(HValue* context, HValue* left, HValue* right) @@ -5262,13 +5266,13 @@ class HRor V8_FINAL : public HBitwiseBinaryOperation { }; -class HOsrEntry V8_FINAL : public HTemplateInstruction<0> { +class HOsrEntry FINAL : public HTemplateInstruction<0> { public: DECLARE_INSTRUCTION_FACTORY_P1(HOsrEntry, BailoutId); BailoutId ast_id() const { return ast_id_; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } @@ -5284,7 +5288,7 @@ class HOsrEntry V8_FINAL : public HTemplateInstruction<0> { }; -class HParameter V8_FINAL : public HTemplateInstruction<0> { +class HParameter FINAL : public HTemplateInstruction<0> { public: enum ParameterKind { STACK_PARAMETER, @@ -5299,9 +5303,9 @@ class HParameter V8_FINAL : public HTemplateInstruction<0> { unsigned index() const { return index_; } ParameterKind kind() const { return kind_; } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } @@ -5328,14 +5332,14 @@ class HParameter V8_FINAL : public HTemplateInstruction<0> { }; -class HCallStub V8_FINAL : public HUnaryCall { +class HCallStub FINAL : public HUnaryCall { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallStub, CodeStub::Major, int); CodeStub::Major major_key() { return major_key_; } HValue* context() { return value(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(CallStub) @@ -5349,13 +5353,44 @@ class HCallStub V8_FINAL : public HUnaryCall { }; -class HUnknownOSRValue V8_FINAL : public HTemplateInstruction<0> { +class HTailCallThroughMegamorphicCache FINAL : public HTemplateInstruction<3> { + public: + DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HTailCallThroughMegamorphicCache, + HValue*, HValue*, Code::Flags); + + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { + return Representation::Tagged(); + } + + HValue* context() const { return OperandAt(0); } + HValue* receiver() const { return OperandAt(1); } + HValue* name() const { return OperandAt(2); } + Code::Flags flags() const { return flags_; } + + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT + + DECLARE_CONCRETE_INSTRUCTION(TailCallThroughMegamorphicCache) + + private: + HTailCallThroughMegamorphicCache(HValue* context, HValue* receiver, + HValue* name, Code::Flags flags) + : flags_(flags) { + SetOperandAt(0, context); + SetOperandAt(1, receiver); + SetOperandAt(2, name); + } + + Code::Flags flags_; +}; + + +class HUnknownOSRValue FINAL : public HTemplateInstruction<0> { public: DECLARE_INSTRUCTION_FACTORY_P2(HUnknownOSRValue, HEnvironment*, int); virtual OStream& PrintDataTo(OStream& os) const; // NOLINT - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } @@ -5364,7 +5399,7 @@ class HUnknownOSRValue V8_FINAL : public HTemplateInstruction<0> { HEnvironment *environment() { return environment_; } int index() { return index_; } - virtual Representation KnownOptimalRepresentation() V8_OVERRIDE { + virtual Representation KnownOptimalRepresentation() OVERRIDE { if (incoming_value_ == NULL) return Representation::None(); return incoming_value_->KnownOptimalRepresentation(); } @@ -5385,7 +5420,7 @@ class HUnknownOSRValue V8_FINAL : public HTemplateInstruction<0> { }; -class HLoadGlobalCell V8_FINAL : public HTemplateInstruction<0> { +class HLoadGlobalCell FINAL : public HTemplateInstruction<0> { public: DECLARE_INSTRUCTION_FACTORY_P2(HLoadGlobalCell, Handle<Cell>, PropertyDetails); @@ -5393,24 +5428,24 @@ class HLoadGlobalCell V8_FINAL : public HTemplateInstruction<0> { Unique<Cell> cell() const { return cell_; } bool RequiresHoleCheck() const; - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual intptr_t Hashcode() V8_OVERRIDE { + virtual intptr_t Hashcode() OVERRIDE { return cell_.Hashcode(); } - virtual void FinalizeUniqueness() V8_OVERRIDE { + virtual void FinalizeUniqueness() OVERRIDE { cell_ = Unique<Cell>(cell_.handle()); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::None(); } DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { return cell_ == HLoadGlobalCell::cast(other)->cell_; } @@ -5422,14 +5457,14 @@ class HLoadGlobalCell V8_FINAL : public HTemplateInstruction<0> { SetDependsOnFlag(kGlobalVars); } - virtual bool IsDeletable() const V8_OVERRIDE { return !RequiresHoleCheck(); } + virtual bool IsDeletable() const OVERRIDE { return !RequiresHoleCheck(); } Unique<Cell> cell_; PropertyDetails details_; }; -class HLoadGlobalGeneric V8_FINAL : public HTemplateInstruction<2> { +class HLoadGlobalGeneric FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadGlobalGeneric, HValue*, Handle<String>, bool); @@ -5450,9 +5485,9 @@ class HLoadGlobalGeneric V8_FINAL : public HTemplateInstruction<2> { slot_ = slot; } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -5476,7 +5511,7 @@ class HLoadGlobalGeneric V8_FINAL : public HTemplateInstruction<2> { }; -class HAllocate V8_FINAL : public HTemplateInstruction<2> { +class HAllocate FINAL : public HTemplateInstruction<2> { public: static bool CompatibleInstanceTypes(InstanceType type1, InstanceType type2) { @@ -5509,7 +5544,7 @@ class HAllocate V8_FINAL : public HTemplateInstruction<2> { size_upper_bound_ = value; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { if (index == 0) { return Representation::Tagged(); } else { @@ -5517,7 +5552,7 @@ class HAllocate V8_FINAL : public HTemplateInstruction<2> { } } - virtual Handle<Map> GetMonomorphicJSObjectMap() { + virtual Handle<Map> GetMonomorphicJSObjectMap() OVERRIDE { return known_initial_map_; } @@ -5558,9 +5593,9 @@ class HAllocate V8_FINAL : public HTemplateInstruction<2> { } virtual bool HandleSideEffectDominator(GVNFlag side_effect, - HValue* dominator) V8_OVERRIDE; + HValue* dominator) OVERRIDE; - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(Allocate) @@ -5664,7 +5699,7 @@ class HAllocate V8_FINAL : public HTemplateInstruction<2> { }; -class HStoreCodeEntry V8_FINAL: public HTemplateInstruction<2> { +class HStoreCodeEntry FINAL: public HTemplateInstruction<2> { public: static HStoreCodeEntry* New(Zone* zone, HValue* context, @@ -5690,7 +5725,7 @@ class HStoreCodeEntry V8_FINAL: public HTemplateInstruction<2> { }; -class HInnerAllocatedObject V8_FINAL : public HTemplateInstruction<2> { +class HInnerAllocatedObject FINAL : public HTemplateInstruction<2> { public: static HInnerAllocatedObject* New(Zone* zone, HValue* context, @@ -5703,11 +5738,11 @@ class HInnerAllocatedObject V8_FINAL : public HTemplateInstruction<2> { HValue* base_object() const { return OperandAt(0); } HValue* offset() const { return OperandAt(1); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return index == 0 ? Representation::Tagged() : Representation::Integer32(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject) @@ -5787,27 +5822,25 @@ inline PointersToHereCheck PointersToHereCheckForObject(HValue* object, } -class HStoreGlobalCell V8_FINAL : public HUnaryOperation { +class HStoreGlobalCell FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P3(HStoreGlobalCell, HValue*, Handle<PropertyCell>, PropertyDetails); Unique<PropertyCell> cell() const { return cell_; } - bool RequiresHoleCheck() { - return !details_.IsDontDelete() || details_.IsReadOnly(); - } + bool RequiresHoleCheck() { return details_.IsConfigurable(); } bool NeedsWriteBarrier() { return StoringValueNeedsWriteBarrier(value()); } - virtual void FinalizeUniqueness() V8_OVERRIDE { + virtual void FinalizeUniqueness() OVERRIDE { cell_ = Unique<PropertyCell>(cell_.handle()); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell) @@ -5826,7 +5859,7 @@ class HStoreGlobalCell V8_FINAL : public HUnaryOperation { }; -class HLoadContextSlot V8_FINAL : public HUnaryOperation { +class HLoadContextSlot FINAL : public HUnaryOperation { public: enum Mode { // Perform a normal load of the context slot without checking its value. @@ -5859,29 +5892,29 @@ class HLoadContextSlot V8_FINAL : public HUnaryOperation { return mode_ != kNoCheck; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { HLoadContextSlot* b = HLoadContextSlot::cast(other); return (slot_index() == b->slot_index()); } private: - virtual bool IsDeletable() const V8_OVERRIDE { return !RequiresHoleCheck(); } + virtual bool IsDeletable() const OVERRIDE { return !RequiresHoleCheck(); } int slot_index_; Mode mode_; }; -class HStoreContextSlot V8_FINAL : public HTemplateInstruction<2> { +class HStoreContextSlot FINAL : public HTemplateInstruction<2> { public: enum Mode { // Perform a normal store to the context slot without checking its previous @@ -5916,11 +5949,11 @@ class HStoreContextSlot V8_FINAL : public HTemplateInstruction<2> { return mode_ != kNoCheck; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot) @@ -5939,7 +5972,7 @@ class HStoreContextSlot V8_FINAL : public HTemplateInstruction<2> { // Represents an access to a portion of an object, such as the map pointer, // array elements pointer, etc, but not accesses to array elements themselves. -class HObjectAccess V8_FINAL { +class HObjectAccess FINAL { public: inline bool IsInobject() const { return portion() != kBackingStore && portion() != kExternalMemory; @@ -6192,8 +6225,9 @@ class HObjectAccess V8_FINAL { Representation representation = Representation::Tagged()); // Create an access to a resolved field (in-object or backing store). - static HObjectAccess ForField(Handle<Map> map, - LookupResult *lookup, Handle<String> name = Handle<String>::null()); + static HObjectAccess ForField(Handle<Map> map, int index, + Representation representation, + Handle<String> name); // Create an access for the payload of a Cell or JSGlobalPropertyCell. static HObjectAccess ForCellPayload(Isolate* isolate); @@ -6313,7 +6347,7 @@ class HObjectAccess V8_FINAL { OStream& operator<<(OStream& os, const HObjectAccess& access); -class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> { +class HLoadNamedField FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_FACTORY_P3(HLoadNamedField, HValue*, HValue*, HObjectAccess); @@ -6333,19 +6367,19 @@ class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> { const UniqueSet<Map>* maps() const { return maps_; } - virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } - virtual bool HasOutOfBoundsAccess(int size) V8_OVERRIDE { + virtual bool HasEscapingOperandAt(int index) OVERRIDE { return false; } + virtual bool HasOutOfBoundsAccess(int size) OVERRIDE { return !access().IsInobject() || access().offset() >= size; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { if (index == 0 && access().IsExternalMemory()) { // object must be external in case of external memory access return Representation::External(); } return Representation::Tagged(); } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual Range* InferRange(Zone* zone) OVERRIDE; + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT bool CanBeReplacedWith(HValue* other) const { if (!CheckFlag(HValue::kCantBeReplaced)) return false; @@ -6361,7 +6395,7 @@ class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> { DECLARE_CONCRETE_INSTRUCTION(LoadNamedField) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { HLoadNamedField* that = HLoadNamedField::cast(other); if (!this->access_.Equals(that->access_)) return false; if (this->maps_ == that->maps_) return true; @@ -6425,14 +6459,14 @@ class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> { access.SetGVNFlags(this, LOAD); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } HObjectAccess access_; const UniqueSet<Map>* maps_; }; -class HLoadNamedGeneric V8_FINAL : public HTemplateInstruction<2> { +class HLoadNamedGeneric FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HLoadNamedGeneric, HValue*, Handle<Object>); @@ -6453,11 +6487,11 @@ class HLoadNamedGeneric V8_FINAL : public HTemplateInstruction<2> { slot_ = slot; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric) @@ -6477,20 +6511,20 @@ class HLoadNamedGeneric V8_FINAL : public HTemplateInstruction<2> { }; -class HLoadFunctionPrototype V8_FINAL : public HUnaryOperation { +class HLoadFunctionPrototype FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HLoadFunctionPrototype, HValue*); HValue* function() { return OperandAt(0); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } private: explicit HLoadFunctionPrototype(HValue* function) @@ -6527,7 +6561,7 @@ enum LoadKeyedHoleMode { }; -class HLoadKeyed V8_FINAL +class HLoadKeyed FINAL : public HTemplateInstruction<3>, public ArrayInstructionInterface { public: DECLARE_INSTRUCTION_FACTORY_P4(HLoadKeyed, HValue*, HValue*, HValue*, @@ -6561,14 +6595,14 @@ class HLoadKeyed V8_FINAL void SetDehoisted(bool is_dehoisted) { bit_field_ = IsDehoistedField::update(bit_field_, is_dehoisted); } - virtual ElementsKind elements_kind() const V8_OVERRIDE { + virtual ElementsKind elements_kind() const OVERRIDE { return ElementsKindField::decode(bit_field_); } LoadKeyedHoleMode hole_mode() const { return HoleModeField::decode(bit_field_); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { // kind_fast: tagged[int32] (none) // kind_double: tagged[int32] (none) // kind_fixed_typed_array: tagged[int32] (none) @@ -6584,22 +6618,22 @@ class HLoadKeyed V8_FINAL return Representation::None(); } - virtual Representation observed_input_representation(int index) V8_OVERRIDE { + virtual Representation observed_input_representation(int index) OVERRIDE { return RequiredInputRepresentation(index); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT bool UsesMustHandleHole() const; bool AllUsesCanTreatHoleAsNaN() const; bool RequiresHoleCheck() const; - virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual Range* InferRange(Zone* zone) OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(LoadKeyed) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { if (!other->IsLoadKeyed()) return false; HLoadKeyed* other_load = HLoadKeyed::cast(other); @@ -6676,7 +6710,7 @@ class HLoadKeyed V8_FINAL SetFlag(kUseGVN); } - virtual bool IsDeletable() const V8_OVERRIDE { + virtual bool IsDeletable() const OVERRIDE { return !RequiresHoleCheck(); } @@ -6712,7 +6746,7 @@ class HLoadKeyed V8_FINAL }; -class HLoadKeyedGeneric V8_FINAL : public HTemplateInstruction<3> { +class HLoadKeyedGeneric FINAL : public HTemplateInstruction<3> { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HLoadKeyedGeneric, HValue*, HValue*); @@ -6731,14 +6765,14 @@ class HLoadKeyedGeneric V8_FINAL : public HTemplateInstruction<3> { slot_ = slot; } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { // tagged[tagged] return Representation::Tagged(); } - virtual HValue* Canonicalize() V8_OVERRIDE; + virtual HValue* Canonicalize() OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric) @@ -6768,7 +6802,7 @@ enum StoreFieldOrKeyedMode { }; -class HStoreNamedField V8_FINAL : public HTemplateInstruction<3> { +class HStoreNamedField FINAL : public HTemplateInstruction<3> { public: DECLARE_INSTRUCTION_FACTORY_P3(HStoreNamedField, HValue*, HObjectAccess, HValue*); @@ -6777,13 +6811,13 @@ class HStoreNamedField V8_FINAL : public HTemplateInstruction<3> { DECLARE_CONCRETE_INSTRUCTION(StoreNamedField) - virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { + virtual bool HasEscapingOperandAt(int index) OVERRIDE { return index == 1; } - virtual bool HasOutOfBoundsAccess(int size) V8_OVERRIDE { + virtual bool HasOutOfBoundsAccess(int size) OVERRIDE { return !access().IsInobject() || access().offset() >= size; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { if (index == 0 && access().IsExternalMemory()) { // object must be external in case of external memory access return Representation::External(); @@ -6808,13 +6842,13 @@ class HStoreNamedField V8_FINAL : public HTemplateInstruction<3> { return Representation::Tagged(); } virtual bool HandleSideEffectDominator(GVNFlag side_effect, - HValue* dominator) V8_OVERRIDE { + HValue* dominator) OVERRIDE { DCHECK(side_effect == kNewSpacePromotion); if (!FLAG_use_write_barrier_elimination) return false; dominator_ = dominator; return false; } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT HValue* object() const { return OperandAt(0); } HValue* value() const { return OperandAt(1); } @@ -6913,7 +6947,7 @@ class HStoreNamedField V8_FINAL : public HTemplateInstruction<3> { }; -class HStoreNamedGeneric V8_FINAL : public HTemplateInstruction<3> { +class HStoreNamedGeneric FINAL : public HTemplateInstruction<3> { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HStoreNamedGeneric, HValue*, Handle<String>, HValue*, @@ -6924,9 +6958,9 @@ class HStoreNamedGeneric V8_FINAL : public HTemplateInstruction<3> { Handle<String> name() const { return name_; } StrictMode strict_mode() const { return strict_mode_; } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -6951,7 +6985,7 @@ class HStoreNamedGeneric V8_FINAL : public HTemplateInstruction<3> { }; -class HStoreKeyed V8_FINAL +class HStoreKeyed FINAL : public HTemplateInstruction<3>, public ArrayInstructionInterface { public: DECLARE_INSTRUCTION_FACTORY_P4(HStoreKeyed, HValue*, HValue*, HValue*, @@ -6961,7 +6995,7 @@ class HStoreKeyed V8_FINAL DECLARE_INSTRUCTION_FACTORY_P6(HStoreKeyed, HValue*, HValue*, HValue*, ElementsKind, StoreFieldOrKeyedMode, int); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { // kind_fast: tagged[int32] = tagged // kind_double: tagged[int32] = double // kind_smi : tagged[int32] = smi @@ -7012,7 +7046,7 @@ class HStoreKeyed V8_FINAL return is_external() || is_fixed_typed_array(); } - virtual Representation observed_input_representation(int index) V8_OVERRIDE { + virtual Representation observed_input_representation(int index) OVERRIDE { if (index < 2) return RequiredInputRepresentation(index); if (IsUninitialized()) { return Representation::None(); @@ -7047,7 +7081,7 @@ class HStoreKeyed V8_FINAL } virtual bool HandleSideEffectDominator(GVNFlag side_effect, - HValue* dominator) V8_OVERRIDE { + HValue* dominator) OVERRIDE { DCHECK(side_effect == kNewSpacePromotion); dominator_ = dominator; return false; @@ -7070,7 +7104,7 @@ class HStoreKeyed V8_FINAL bool NeedsCanonicalization(); - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(StoreKeyed) @@ -7127,7 +7161,7 @@ class HStoreKeyed V8_FINAL }; -class HStoreKeyedGeneric V8_FINAL : public HTemplateInstruction<4> { +class HStoreKeyedGeneric FINAL : public HTemplateInstruction<4> { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HStoreKeyedGeneric, HValue*, HValue*, HValue*, StrictMode); @@ -7138,12 +7172,12 @@ class HStoreKeyedGeneric V8_FINAL : public HTemplateInstruction<4> { HValue* context() const { return OperandAt(3); } StrictMode strict_mode() const { return strict_mode_; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { // tagged[tagged] = tagged return Representation::Tagged(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric) @@ -7165,7 +7199,7 @@ class HStoreKeyedGeneric V8_FINAL : public HTemplateInstruction<4> { }; -class HTransitionElementsKind V8_FINAL : public HTemplateInstruction<2> { +class HTransitionElementsKind FINAL : public HTemplateInstruction<2> { public: inline static HTransitionElementsKind* New(Zone* zone, HValue* context, @@ -7176,7 +7210,7 @@ class HTransitionElementsKind V8_FINAL : public HTemplateInstruction<2> { original_map, transitioned_map); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -7187,12 +7221,12 @@ class HTransitionElementsKind V8_FINAL : public HTemplateInstruction<2> { ElementsKind from_kind() const { return from_kind_; } ElementsKind to_kind() const { return to_kind_; } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { HTransitionElementsKind* instr = HTransitionElementsKind::cast(other); return original_map_ == instr->original_map_ && transitioned_map_ == instr->transitioned_map_; @@ -7227,7 +7261,7 @@ class HTransitionElementsKind V8_FINAL : public HTemplateInstruction<2> { }; -class HStringAdd V8_FINAL : public HBinaryOperation { +class HStringAdd FINAL : public HBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, @@ -7241,16 +7275,16 @@ class HStringAdd V8_FINAL : public HBinaryOperation { StringAddFlags flags() const { return flags_; } PretenureFlag pretenure_flag() const { return pretenure_flag_; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT DECLARE_CONCRETE_INSTRUCTION(StringAdd) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { return flags_ == HStringAdd::cast(other)->flags_ && pretenure_flag_ == HStringAdd::cast(other)->pretenure_flag_; } @@ -7278,14 +7312,14 @@ class HStringAdd V8_FINAL : public HBinaryOperation { } // No side-effects except possible allocation: - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } const StringAddFlags flags_; const PretenureFlag pretenure_flag_; }; -class HStringCharCodeAt V8_FINAL : public HTemplateInstruction<3> { +class HStringCharCodeAt FINAL : public HTemplateInstruction<3> { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HStringCharCodeAt, HValue*, @@ -7305,9 +7339,9 @@ class HStringCharCodeAt V8_FINAL : public HTemplateInstruction<3> { DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE { + virtual Range* InferRange(Zone* zone) OVERRIDE { return new(zone) Range(0, String::kMaxUtf16CodeUnit); } @@ -7324,17 +7358,17 @@ class HStringCharCodeAt V8_FINAL : public HTemplateInstruction<3> { } // No side effects: runtime function assumes string + number inputs. - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } }; -class HStringCharFromCode V8_FINAL : public HTemplateInstruction<2> { +class HStringCharFromCode FINAL : public HTemplateInstruction<2> { public: static HInstruction* New(Zone* zone, HValue* context, HValue* char_code); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return index == 0 ? Representation::Tagged() : Representation::Integer32(); @@ -7343,7 +7377,7 @@ class HStringCharFromCode V8_FINAL : public HTemplateInstruction<2> { HValue* context() const { return OperandAt(0); } HValue* value() const { return OperandAt(1); } - virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode) @@ -7357,7 +7391,7 @@ class HStringCharFromCode V8_FINAL : public HTemplateInstruction<2> { SetChangesFlag(kNewSpacePromotion); } - virtual bool IsDeletable() const V8_OVERRIDE { + virtual bool IsDeletable() const OVERRIDE { return !value()->ToNumberCanBeObserved(); } }; @@ -7384,7 +7418,7 @@ class HMaterializedLiteral : public HTemplateInstruction<V> { } private: - virtual bool IsDeletable() const V8_FINAL V8_OVERRIDE { return true; } + virtual bool IsDeletable() const FINAL OVERRIDE { return true; } int literal_index_; int depth_; @@ -7392,7 +7426,7 @@ class HMaterializedLiteral : public HTemplateInstruction<V> { }; -class HRegExpLiteral V8_FINAL : public HMaterializedLiteral<1> { +class HRegExpLiteral FINAL : public HMaterializedLiteral<1> { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HRegExpLiteral, Handle<FixedArray>, @@ -7405,7 +7439,7 @@ class HRegExpLiteral V8_FINAL : public HMaterializedLiteral<1> { Handle<String> pattern() { return pattern_; } Handle<String> flags() { return flags_; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -7432,14 +7466,14 @@ class HRegExpLiteral V8_FINAL : public HMaterializedLiteral<1> { }; -class HFunctionLiteral V8_FINAL : public HTemplateInstruction<1> { +class HFunctionLiteral FINAL : public HTemplateInstruction<1> { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HFunctionLiteral, Handle<SharedFunctionInfo>, bool); HValue* context() { return OperandAt(0); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -7448,44 +7482,46 @@ class HFunctionLiteral V8_FINAL : public HTemplateInstruction<1> { Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } bool pretenure() const { return pretenure_; } bool has_no_literals() const { return has_no_literals_; } - bool is_generator() const { return is_generator_; } + bool is_arrow() const { return IsArrowFunction(kind_); } + bool is_generator() const { return IsGeneratorFunction(kind_); } + bool is_concise_method() const { return IsConciseMethod(kind_); } + FunctionKind kind() const { return kind_; } StrictMode strict_mode() const { return strict_mode_; } private: - HFunctionLiteral(HValue* context, - Handle<SharedFunctionInfo> shared, + HFunctionLiteral(HValue* context, Handle<SharedFunctionInfo> shared, bool pretenure) : HTemplateInstruction<1>(HType::JSObject()), shared_info_(shared), + kind_(shared->kind()), pretenure_(pretenure), has_no_literals_(shared->num_literals() == 0), - is_generator_(shared->is_generator()), strict_mode_(shared->strict_mode()) { SetOperandAt(0, context); set_representation(Representation::Tagged()); SetChangesFlag(kNewSpacePromotion); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } Handle<SharedFunctionInfo> shared_info_; + FunctionKind kind_; bool pretenure_ : 1; bool has_no_literals_ : 1; - bool is_generator_ : 1; StrictMode strict_mode_; }; -class HTypeof V8_FINAL : public HTemplateInstruction<2> { +class HTypeof FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(HTypeof, HValue*); HValue* context() const { return OperandAt(0); } HValue* value() const { return OperandAt(1); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -7498,15 +7534,15 @@ class HTypeof V8_FINAL : public HTemplateInstruction<2> { set_representation(Representation::Tagged()); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } }; -class HTrapAllocationMemento V8_FINAL : public HTemplateInstruction<1> { +class HTrapAllocationMemento FINAL : public HTemplateInstruction<1> { public: DECLARE_INSTRUCTION_FACTORY_P1(HTrapAllocationMemento, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -7521,11 +7557,11 @@ class HTrapAllocationMemento V8_FINAL : public HTemplateInstruction<1> { }; -class HToFastProperties V8_FINAL : public HUnaryOperation { +class HToFastProperties FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HToFastProperties, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -7546,17 +7582,17 @@ class HToFastProperties V8_FINAL : public HUnaryOperation { #endif } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } }; -class HDateField V8_FINAL : public HUnaryOperation { +class HDateField FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P2(HDateField, HValue*, Smi*); Smi* index() const { return index_; } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -7572,7 +7608,7 @@ class HDateField V8_FINAL : public HUnaryOperation { }; -class HSeqStringGetChar V8_FINAL : public HTemplateInstruction<2> { +class HSeqStringGetChar FINAL : public HTemplateInstruction<2> { public: static HInstruction* New(Zone* zone, HValue* context, @@ -7580,7 +7616,7 @@ class HSeqStringGetChar V8_FINAL : public HTemplateInstruction<2> { HValue* string, HValue* index); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return (index == 0) ? Representation::Tagged() : Representation::Integer32(); } @@ -7592,11 +7628,11 @@ class HSeqStringGetChar V8_FINAL : public HTemplateInstruction<2> { DECLARE_CONCRETE_INSTRUCTION(SeqStringGetChar) protected: - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { return encoding() == HSeqStringGetChar::cast(other)->encoding(); } - virtual Range* InferRange(Zone* zone) V8_OVERRIDE { + virtual Range* InferRange(Zone* zone) OVERRIDE { if (encoding() == String::ONE_BYTE_ENCODING) { return new(zone) Range(0, String::kMaxOneByteCharCode); } else { @@ -7616,13 +7652,13 @@ class HSeqStringGetChar V8_FINAL : public HTemplateInstruction<2> { SetDependsOnFlag(kStringChars); } - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } String::Encoding encoding_; }; -class HSeqStringSetChar V8_FINAL : public HTemplateInstruction<4> { +class HSeqStringSetChar FINAL : public HTemplateInstruction<4> { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4( HSeqStringSetChar, String::Encoding, @@ -7634,7 +7670,7 @@ class HSeqStringSetChar V8_FINAL : public HTemplateInstruction<4> { HValue* index() { return OperandAt(2); } HValue* value() { return OperandAt(3); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return (index <= 1) ? Representation::Tagged() : Representation::Integer32(); } @@ -7659,17 +7695,17 @@ class HSeqStringSetChar V8_FINAL : public HTemplateInstruction<4> { }; -class HCheckMapValue V8_FINAL : public HTemplateInstruction<2> { +class HCheckMapValue FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_FACTORY_P2(HCheckMapValue, HValue*, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual HType CalculateInferredType() V8_OVERRIDE { + virtual HType CalculateInferredType() OVERRIDE { if (value()->type().IsHeapObject()) return value()->type(); return HType::HeapObject(); } @@ -7677,14 +7713,14 @@ class HCheckMapValue V8_FINAL : public HTemplateInstruction<2> { HValue* value() const { return OperandAt(0); } HValue* map() const { return OperandAt(1); } - virtual HValue* Canonicalize() V8_OVERRIDE; + virtual HValue* Canonicalize() OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(CheckMapValue) protected: virtual int RedefinedOperandIndex() { return 0; } - virtual bool DataEquals(HValue* other) V8_OVERRIDE { + virtual bool DataEquals(HValue* other) OVERRIDE { return true; } @@ -7701,20 +7737,20 @@ class HCheckMapValue V8_FINAL : public HTemplateInstruction<2> { }; -class HForInPrepareMap V8_FINAL : public HTemplateInstruction<2> { +class HForInPrepareMap FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(HForInPrepareMap, HValue*); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } HValue* context() const { return OperandAt(0); } HValue* enumerable() const { return OperandAt(1); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual HType CalculateInferredType() V8_OVERRIDE { + virtual HType CalculateInferredType() OVERRIDE { return HType::Tagged(); } @@ -7731,11 +7767,11 @@ class HForInPrepareMap V8_FINAL : public HTemplateInstruction<2> { }; -class HForInCacheArray V8_FINAL : public HTemplateInstruction<2> { +class HForInCacheArray FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_FACTORY_P3(HForInCacheArray, HValue*, HValue*, int); - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { return Representation::Tagged(); } @@ -7751,9 +7787,9 @@ class HForInCacheArray V8_FINAL : public HTemplateInstruction<2> { index_cache_ = index_cache; } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual HType CalculateInferredType() V8_OVERRIDE { + virtual HType CalculateInferredType() OVERRIDE { return HType::Tagged(); } @@ -7773,7 +7809,7 @@ class HForInCacheArray V8_FINAL : public HTemplateInstruction<2> { }; -class HLoadFieldByIndex V8_FINAL : public HTemplateInstruction<2> { +class HLoadFieldByIndex FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_FACTORY_P2(HLoadFieldByIndex, HValue*, HValue*); @@ -7785,7 +7821,7 @@ class HLoadFieldByIndex V8_FINAL : public HTemplateInstruction<2> { set_representation(Representation::Tagged()); } - virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { + virtual Representation RequiredInputRepresentation(int index) OVERRIDE { if (index == 1) { return Representation::Smi(); } else { @@ -7796,16 +7832,16 @@ class HLoadFieldByIndex V8_FINAL : public HTemplateInstruction<2> { HValue* object() const { return OperandAt(0); } HValue* index() const { return OperandAt(1); } - virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT + virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT - virtual HType CalculateInferredType() V8_OVERRIDE { + virtual HType CalculateInferredType() OVERRIDE { return HType::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); private: - virtual bool IsDeletable() const V8_OVERRIDE { return true; } + virtual bool IsDeletable() const OVERRIDE { return true; } }; |