#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"
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(NullarySIMDOperation) \
- V(UnarySIMDOperation) \
- V(BinarySIMDOperation) \
- V(TernarySIMDOperation) \
- V(QuarternarySIMDOperation) \
- 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) \
#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); \
#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; \
}
enum PropertyAccessType { LOAD, STORE };
-class Range V8_FINAL : public ZoneObject {
+class Range FINAL : public ZoneObject {
public:
Range()
: lower_(kMinInt),
// 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();
}
-class DecompositionResult V8_FINAL BASE_EMBEDDED {
+class DecompositionResult FINAL BASE_EMBEDDED {
public:
DecompositionResult() : base_(NULL), offset_(0), scale_(0) {}
// 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.
HType t = type();
if (t.IsSmi()) return Representation::Smi();
if (t.IsHeapNumber()) return Representation::Double();
- if (t.IsFloat32x4()) return Representation::Float32x4();
- if (t.IsFloat64x2()) return Representation::Float64x2();
- if (t.IsInt32x4()) return Representation::Int32x4();
if (t.IsHeapObject()) return r;
return Representation::None();
}
HType type() const { return type_; }
void set_type(HType new_type) {
- // TODO(ningxin): for SIMD ops, the initial type is None which
- // hit the following ASSERT.
- // DCHECK(new_type.IsSubtypeOf(type_));
+ DCHECK(new_type.IsSubtypeOf(type_));
type_ = new_type;
}
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; }
}
// 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 {
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;
}
virtual LInstruction* CompileToLithium(LChunkBuilder* builder) = 0;
#ifdef DEBUG
- virtual void Verify() V8_OVERRIDE;
+ virtual void Verify() OVERRIDE;
#endif
bool CanDeoptimize();
SetDependsOnFlag(kOsrEntries);
}
- virtual void DeleteFromGraph() V8_OVERRIDE { Unlink(); }
+ virtual void DeleteFromGraph() OVERRIDE { Unlink(); }
private:
void InitializeAsFirst(HBasicBlock* block) {
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];
}
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;
}
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;
};
-class HSuccessorIterator V8_FINAL BASE_EMBEDDED {
+class HSuccessorIterator FINAL BASE_EMBEDDED {
public:
explicit HSuccessorIterator(const HControlInstruction* instr)
: instr_(instr), current_(0) {}
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;
}
};
-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();
}
};
-class HDummyUse V8_FINAL : public HTemplateInstruction<1> {
+class HDummyUse FINAL : public HTemplateInstruction<1> {
public:
explicit HDummyUse(HValue* value)
: HTemplateInstruction<1>(HType::Smi()) {
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();
}
};
-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,
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();
}
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*,
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_;
};
-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;
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_; }
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();
}
};
-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() {
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); }
};
-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();
}
}
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();
}
};
-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)
};
-class HChange V8_FINAL : public HUnaryOperation {
+class HChange FINAL : public HUnaryOperation {
public:
HChange(HValue* value,
Representation to,
if (value->representation().IsSmi() || value->type().IsSmi()) {
set_type(HType::Smi());
} else {
- if (to.IsFloat32x4()) {
- set_type(HType::Float32x4());
- } else if (to.IsFloat64x2()) {
- set_type(HType::Float64x2());
- } else if (to.IsInt32x4()) {
- set_type(HType::Int32x4());
- } else {
- set_type(HType::TaggedNumber());
- }
+ set_type(HType::TaggedNumber());
if (to.IsTagged()) SetChangesFlag(kNewSpacePromotion);
}
}
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)
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();
}
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();
}
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();
}
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) {
SetOperandAt(1, lo);
}
- virtual bool IsDeletable() const V8_OVERRIDE { return true; }
+ virtual bool IsDeletable() const OVERRIDE { return true; }
};
};
-class HSimulate V8_FINAL : public HInstruction {
+class HSimulate FINAL : public HInstruction {
public:
HSimulate(BailoutId ast_id,
int pop_count,
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_; }
}
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();
}
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;
}
};
-class HEnvironmentMarker V8_FINAL : public HTemplateInstruction<1> {
+class HEnvironmentMarker FINAL : public HTemplateInstruction<1> {
public:
enum Kind { BIND, LOOKUP };
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) {
};
-class HStackCheck V8_FINAL : public HTemplateInstruction<1> {
+class HStackCheck FINAL : public HTemplateInstruction<1> {
public:
enum Type {
kFunctionEntry,
HValue* context() { return OperandAt(0); }
- virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
+ virtual Representation RequiredInputRepresentation(int index) OVERRIDE {
return Representation::Tagged();
}
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; }
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();
}
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_;
};
-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;
}
};
-class HPushArguments V8_FINAL : public HInstruction {
+class HPushArguments FINAL : public HInstruction {
public:
static HPushArguments* New(Zone* zone, HValue* context) {
return new(zone) HPushArguments(zone);
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];
}
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;
}
};
-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() {
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>,
DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals)
- virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
+ virtual Representation RequiredInputRepresentation(int index) OVERRIDE {
return Representation::Tagged();
}
this->SetAllSideEffects();
}
- virtual HType CalculateInferredType() V8_FINAL V8_OVERRIDE {
+ virtual HType CalculateInferredType() FINAL OVERRIDE {
return HType::Tagged();
}
return argument_count_;
}
- virtual int argument_delta() const V8_OVERRIDE {
+ virtual int argument_delta() const OVERRIDE {
return -argument_count();
}
}
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); }
};
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();
}
};
-class HCallJSFunction V8_FINAL : public HCall<1> {
+class HCallJSFunction FINAL : public HCall<1> {
public:
static HCallJSFunction* New(Zone* zone,
HValue* context,
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_;
}
};
-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();
}
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++) {
}
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);
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_;
}
};
-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(
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,
};
-class HCallNew V8_FINAL : public HBinaryCall {
+class HCallNew FINAL : public HBinaryCall {
public:
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallNew, HValue*, int);
};
-class HCallNewArray V8_FINAL : public HBinaryCall {
+class HCallNewArray FINAL : public HBinaryCall {
public:
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HCallNewArray,
HValue*,
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_; }
};
-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_; }
save_doubles_ = save_doubles;
}
- virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
+ virtual Representation RequiredInputRepresentation(int index) OVERRIDE {
return Representation::Tagged();
}
};
-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)
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,
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 {
}
}
- 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;
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();
}
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);
};
-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();
}
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_;
}
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) {
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); }
bool HasMigrationTarget() const { return has_migration_target_; }
- virtual HValue* Canonicalize() V8_OVERRIDE;
+ virtual HValue* Canonicalize() OVERRIDE;
static HCheckMaps* CreateAndInsertAfter(Zone* zone,
HValue* value,
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());
}
};
-class HCheckValue V8_FINAL : public HUnaryOperation {
+class HCheckValue FINAL : public HUnaryOperation {
public:
static HCheckValue* New(Zone* zone, HValue* context,
HValue* value, Handle<JSFunction> func) {
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_; }
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_;
}
};
-class HCheckInstanceType V8_FINAL : public HUnaryOperation {
+class HCheckInstanceType FINAL : public HUnaryOperation {
public:
enum Check {
IS_SPEC_OBJECT,
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();
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);
// 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_;
}
};
-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;
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()) {
};
-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) {
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:
};
-class HPhi V8_FINAL : public HValue {
+class HPhi FINAL : public HValue {
public:
HPhi(int merged_index, Zone* zone)
: inputs_(2, zone),
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();
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_; }
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);
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();
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;
}
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(); }
};
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;
}
};
-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);
};
-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) {
// 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)
// 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);
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,
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 {
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();
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);
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 {
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 {
}
}
- 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());
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_ ==
}
#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;
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
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();
}
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)
};
-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)
};
-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()
};
-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) {
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) {
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()
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*);
}
}
- 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();
}
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_;
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) {
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; }
};
SetAllSideEffects();
}
- virtual void RepresentationChanged(Representation to) V8_OVERRIDE {
+ virtual void RepresentationChanged(Representation to) OVERRIDE {
if (to.IsTagged() &&
(left()->ToNumberCanBeObserved() || right()->ToNumberCanBeObserved())) {
SetAllSideEffects();
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;
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*,
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)
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; }
};
SetFlag(kAllowUndefinedAsNaN);
}
- virtual void RepresentationChanged(Representation to) V8_OVERRIDE {
+ virtual void RepresentationChanged(Representation to) OVERRIDE {
if (to.IsTagged() &&
(left()->ToNumberCanBeObserved() || right()->ToNumberCanBeObserved())) {
SetAllSideEffects();
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)
}
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,
};
-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();
}
};
-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)
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_; }
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();
}
};
-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)
};
-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_; }
};
-class HIsSmiAndBranch V8_FINAL : public HUnaryControlInstruction {
+class HIsSmiAndBranch FINAL : public HUnaryControlInstruction {
public:
DECLARE_INSTRUCTION_FACTORY_P1(HIsSmiAndBranch, HValue*);
DECLARE_INSTRUCTION_FACTORY_P3(HIsSmiAndBranch, HValue*,
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:
};
-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)
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();
}
public:
DECLARE_INSTRUCTION_FACTORY_P0(HIsConstructCallAndBranch);
- virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
+ virtual Representation RequiredInputRepresentation(int index) OVERRIDE {
return Representation::None();
}
};
-class HHasInstanceTypeAndBranch V8_FINAL : public HUnaryControlInstruction {
+class HHasInstanceTypeAndBranch FINAL : public HUnaryControlInstruction {
public:
DECLARE_INSTRUCTION_FACTORY_P2(
HHasInstanceTypeAndBranch, HValue*, InstanceType);
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)
};
-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();
}
};
-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) {
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_; }
};
-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());
}
};
-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)
};
-class HInstanceOfKnownGlobal V8_FINAL : public HTemplateInstruction<2> {
+class HInstanceOfKnownGlobal FINAL : public HTemplateInstruction<2> {
public:
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HInstanceOfKnownGlobal,
HValue*,
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();
}
};
-class HPower V8_FINAL : public HTemplateInstruction<2> {
+class HPower FINAL : public HTemplateInstruction<2> {
public:
static HInstruction* New(Zone* zone,
HValue* context,
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) {
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,
// 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;
}
}
- virtual void RepresentationChanged(Representation to) V8_OVERRIDE {
+ virtual void RepresentationChanged(Representation to) OVERRIDE {
if (to.IsTagged() &&
(left()->ToNumberCanBeObserved() || right()->ToNumberCanBeObserved() ||
left()->ToStringCanBeObserved() || right()->ToStringCanBeObserved())) {
}
}
- 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)
};
-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;
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)
};
-class HMul V8_FINAL : public HArithmeticBinaryOperation {
+class HMul FINAL : public HArithmeticBinaryOperation {
public:
static HInstruction* New(Zone* zone,
HValue* context,
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);
}
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)
};
-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);
}
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,
};
-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);
}
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)
};
-class HMathMinMax V8_FINAL : public HArithmeticBinaryOperation {
+class HMathMinMax FINAL : public HArithmeticBinaryOperation {
public:
enum Operation { kMathMin, kMathMax };
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();
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)
};
-class HBitwise V8_FINAL : public HBitwiseBinaryOperation {
+class HBitwise FINAL : public HBitwiseBinaryOperation {
public:
static HInstruction* New(Zone* zone,
HValue* context,
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,
};
-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)) {
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)
};
-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
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);
}
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)
};
-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
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);
}
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)
};
-class HRor V8_FINAL : public HBitwiseBinaryOperation {
+class HRor FINAL : public HBitwiseBinaryOperation {
public:
static HInstruction* New(Zone* zone,
HValue* context,
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);
}
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)
};
-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();
}
};
-class HParameter V8_FINAL : public HTemplateInstruction<0> {
+class HParameter FINAL : public HTemplateInstruction<0> {
public:
enum ParameterKind {
STACK_PARAMETER,
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();
}
};
-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)
};
-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();
}
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();
}
};
-class HLoadGlobalCell V8_FINAL : public HTemplateInstruction<0> {
+class HLoadGlobalCell FINAL : public HTemplateInstruction<0> {
public:
DECLARE_INSTRUCTION_FACTORY_P2(HLoadGlobalCell, Handle<Cell>,
PropertyDetails);
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_;
}
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);
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();
}
};
-class HAllocate V8_FINAL : public HTemplateInstruction<2> {
+class HAllocate FINAL : public HTemplateInstruction<2> {
public:
static bool CompatibleInstanceTypes(InstanceType type1,
InstanceType type2) {
size_upper_bound_ = value;
}
- virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
+ virtual Representation RequiredInputRepresentation(int index) OVERRIDE {
if (index == 0) {
return Representation::Tagged();
} else {
}
}
- virtual Handle<Map> GetMonomorphicJSObjectMap() {
+ virtual Handle<Map> GetMonomorphicJSObjectMap() OVERRIDE {
return known_initial_map_;
}
}
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)
};
-class HStoreCodeEntry V8_FINAL: public HTemplateInstruction<2> {
+class HStoreCodeEntry FINAL: public HTemplateInstruction<2> {
public:
static HStoreCodeEntry* New(Zone* zone,
HValue* context,
};
-class HInnerAllocatedObject V8_FINAL : public HTemplateInstruction<2> {
+class HInnerAllocatedObject FINAL : public HTemplateInstruction<2> {
public:
static HInnerAllocatedObject* New(Zone* zone,
HValue* context,
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)
}
-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)
};
-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.
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
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)
// 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;
Representation::Integer32());
}
- static HObjectAccess ForSIMD128Double0() {
- return HObjectAccess(
- kDouble, Float32x4::kValueOffset, Representation::Double());
- }
-
- static HObjectAccess ForSIMD128Double1() {
- return HObjectAccess(kDouble,
- Float32x4::kValueOffset + kDoubleSize,
- Representation::Double());
- }
-
static HObjectAccess ForElementsPointer() {
return HObjectAccess(kElementsPointer, JSObject::kElementsOffset);
}
Representation::UInteger16());
}
- static HObjectAccess ForMapPrototype() {
- return HObjectAccess(kInobject, Map::kPrototypeOffset);
- }
-
static HObjectAccess ForPropertyCellValue() {
return HObjectAccess(kInobject, PropertyCell::kValueOffset);
}
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);
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);
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;
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;
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>);
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)
};
-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)
};
-class HLoadKeyed V8_FINAL
+class HLoadKeyed FINAL
: public HTemplateInstruction<3>, public ArrayInstructionInterface {
public:
DECLARE_INSTRUCTION_FACTORY_P4(HLoadKeyed, HValue*, HValue*, HValue*,
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)
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);
elements_kind == FLOAT32_ELEMENTS ||
elements_kind == FLOAT64_ELEMENTS) {
set_representation(Representation::Double());
- } else if (IsFloat32x4ElementsKind(elements_kind)) {
- set_representation(CpuFeatures::SupportsSIMD128InCrankshaft() ?
- Representation::Float32x4() : Representation::Tagged());
- } else if (IsFloat64x2ElementsKind(elements_kind)) {
- set_representation(CpuFeatures::SupportsSIMD128InCrankshaft() ?
- Representation::Float64x2() : Representation::Tagged());
- } else if (IsInt32x4ElementsKind(elements_kind)) {
- set_representation(CpuFeatures::SupportsSIMD128InCrankshaft() ?
- Representation::Int32x4() : Representation::Tagged());
} else {
set_representation(Representation::Integer32());
}
SetFlag(kUseGVN);
}
- virtual bool IsDeletable() const V8_OVERRIDE {
+ virtual bool IsDeletable() const OVERRIDE {
return !RequiresHoleCheck();
}
};
-class HLoadKeyedGeneric V8_FINAL : public HTemplateInstruction<3> {
+class HLoadKeyedGeneric FINAL : public HTemplateInstruction<3> {
public:
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HLoadKeyedGeneric, HValue*,
HValue*);
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)
};
-class HStoreNamedField V8_FINAL : public HTemplateInstruction<3> {
+class HStoreNamedField FINAL : public HTemplateInstruction<3> {
public:
DECLARE_INSTRUCTION_FACTORY_P3(HStoreNamedField, HValue*,
HObjectAccess, HValue*);
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();
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); }
};
-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*,
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();
}
};
-class HStoreKeyed V8_FINAL
+class HStoreKeyed FINAL
: public HTemplateInstruction<3>, public ArrayInstructionInterface {
public:
DECLARE_INSTRUCTION_FACTORY_P4(HStoreKeyed, HValue*, HValue*, HValue*,
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
return Representation::Integer32();
}
- if (IsFloat32x4ElementsKind(kind)) {
- return CpuFeatures::SupportsSIMD128InCrankshaft() ?
- Representation::Float32x4() : Representation::Tagged();
- }
- if (IsFloat64x2ElementsKind(kind)) {
- return CpuFeatures::SupportsSIMD128InCrankshaft() ?
- Representation::Float64x2() : Representation::Tagged();
- }
- if (IsInt32x4ElementsKind(kind)) {
- return CpuFeatures::SupportsSIMD128InCrankshaft() ?
- Representation::Int32x4() : Representation::Tagged();
- }
-
if (IsFastSmiElementsKind(kind)) {
return Representation::Smi();
}
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();
}
virtual bool HandleSideEffectDominator(GVNFlag side_effect,
- HValue* dominator) V8_OVERRIDE {
+ HValue* dominator) OVERRIDE {
DCHECK(side_effect == kNewSpacePromotion);
dominator_ = dominator;
return false;
bool NeedsCanonicalization();
- virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE; // NOLINT
+ virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT
DECLARE_CONCRETE_INSTRUCTION(StoreKeyed)
};
-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);
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)
};
-class HTransitionElementsKind V8_FINAL : public HTemplateInstruction<2> {
+class HTransitionElementsKind FINAL : public HTemplateInstruction<2> {
public:
inline static HTransitionElementsKind* New(Zone* zone,
HValue* context,
original_map, transitioned_map);
}
- virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
+ virtual Representation RequiredInputRepresentation(int index) OVERRIDE {
return Representation::Tagged();
}
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_;
};
-class HStringAdd V8_FINAL : public HBinaryOperation {
+class HStringAdd FINAL : public HBinaryOperation {
public:
static HInstruction* New(Zone* zone,
HValue* context,
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_;
}
}
// 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*,
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);
}
}
// 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();
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)
SetChangesFlag(kNewSpacePromotion);
}
- virtual bool IsDeletable() const V8_OVERRIDE {
+ virtual bool IsDeletable() const OVERRIDE {
return !value()->ToNumberCanBeObserved();
}
};
}
private:
- virtual bool IsDeletable() const V8_FINAL V8_OVERRIDE { return true; }
+ virtual bool IsDeletable() const FINAL OVERRIDE { return true; }
int literal_index_;
int depth_;
};
-class HRegExpLiteral V8_FINAL : public HMaterializedLiteral<1> {
+class HRegExpLiteral FINAL : public HMaterializedLiteral<1> {
public:
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HRegExpLiteral,
Handle<FixedArray>,
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();
}
};
-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();
}
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();
}
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();
}
};
-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();
}
#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();
}
};
-class HSeqStringGetChar V8_FINAL : public HTemplateInstruction<2> {
+class HSeqStringGetChar FINAL : public HTemplateInstruction<2> {
public:
static HInstruction* New(Zone* zone,
HValue* context,
HValue* string,
HValue* index);
- virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
+ virtual Representation RequiredInputRepresentation(int index) OVERRIDE {
return (index == 0) ? Representation::Tagged()
: Representation::Integer32();
}
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 {
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,
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();
}
};
-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();
}
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;
}
};
-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();
}
};
-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();
}
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();
}
};
-class HLoadFieldByIndex V8_FINAL : public HTemplateInstruction<2> {
+class HLoadFieldByIndex FINAL : public HTemplateInstruction<2> {
public:
DECLARE_INSTRUCTION_FACTORY_P2(HLoadFieldByIndex, HValue*, HValue*);
set_representation(Representation::Tagged());
}
- virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
+ virtual Representation RequiredInputRepresentation(int index) OVERRIDE {
if (index == 1) {
return Representation::Smi();
} else {
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; }
};
};
-class HNullarySIMDOperation V8_FINAL : public HTemplateInstruction<1> {
- public:
- static HInstruction* New(Zone* zone,
- HValue* context,
- BuiltinFunctionId op);
-
- HValue* context() { return OperandAt(0); }
-
- virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE;
-
- virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
- return Representation::Tagged();
- }
-
- BuiltinFunctionId op() const { return op_; }
- const char* OpName() const;
-
- DECLARE_CONCRETE_INSTRUCTION(NullarySIMDOperation)
-
- protected:
- virtual bool DataEquals(HValue* other) V8_OVERRIDE {
- HNullarySIMDOperation* b = HNullarySIMDOperation::cast(other);
- return op_ == b->op();
- }
-
- private:
- HNullarySIMDOperation(HValue* context, BuiltinFunctionId op)
- : HTemplateInstruction<1>(HType::None()), op_(op) {
- SetOperandAt(0, context);
- switch (op) {
-#define SIMD_NULLARY_OPERATION_CASE_ITEM(p1, p2, name, representation) \
- case k##name: \
- set_representation(Representation::representation()); \
- set_type(HType::FromRepresentation(representation_)); \
- break;
-SIMD_NULLARY_OPERATIONS(SIMD_NULLARY_OPERATION_CASE_ITEM)
-#undef SIMD_NULLARY_OPERATION_CASE_ITEM
- default:
- UNREACHABLE();
- }
- SetFlag(kUseGVN);
- }
-
- virtual bool IsDeletable() const V8_OVERRIDE { return true; }
-
- BuiltinFunctionId op_;
-};
-
-
-class HUnarySIMDOperation V8_FINAL : public HTemplateInstruction<2> {
- public:
- static HInstruction* New(Zone* zone,
- HValue* context,
- HValue* value,
- BuiltinFunctionId op,
- Representation to = Representation::Float32x4());
-
- HValue* context() { return OperandAt(0); }
- HValue* value() const { return OperandAt(1); }
-
- virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE;
-
- virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
- if (index == 0) {
- return Representation::Tagged();
- } else if (op_ == kSIMD128Change) {
- return value()->representation();
- } else {
- switch (op_) {
-#define SIMD_UNARY_OPERATION_CASE_ITEM(p1, p2, name, p4, representation) \
- case k##name: \
- return Representation::representation();
-SIMD_UNARY_OPERATIONS(SIMD_UNARY_OPERATION_CASE_ITEM)
-SIMD_UNARY_OPERATIONS_FOR_PROPERTY_ACCESS(SIMD_UNARY_OPERATION_CASE_ITEM)
-#undef SIMD_UNARY_OPERATION_CASE_ITEM
- default:
- UNREACHABLE();
- return Representation::None();
- }
- }
- }
-
- BuiltinFunctionId op() const { return op_; }
- const char* OpName() const;
-
- DECLARE_CONCRETE_INSTRUCTION(UnarySIMDOperation)
-
- protected:
- virtual bool DataEquals(HValue* other) V8_OVERRIDE {
- HUnarySIMDOperation* b = HUnarySIMDOperation::cast(other);
- return op_ == b->op();
- }
-
- private:
- HUnarySIMDOperation(HValue* context, HValue* value, BuiltinFunctionId op,
- Representation to = Representation::Float32x4())
- : HTemplateInstruction<2>(HType::None()), op_(op) {
- SetOperandAt(0, context);
- SetOperandAt(1, value);
- switch (op) {
- case kSIMD128Change:
- set_representation(to);
- set_type(HType::FromRepresentation(to));
- break;
-#define SIMD_UNARY_OPERATION_CASE_ITEM(p1, p2, name, representation, p5) \
- case k##name: \
- set_representation(Representation::representation()); \
- set_type(HType::FromRepresentation(representation_)); \
- if (Representation::p5().IsInteger32()) { \
- SetFlag(kTruncatingToInt32); \
- } \
- break;
-SIMD_UNARY_OPERATIONS(SIMD_UNARY_OPERATION_CASE_ITEM)
-SIMD_UNARY_OPERATIONS_FOR_PROPERTY_ACCESS(SIMD_UNARY_OPERATION_CASE_ITEM)
-#undef SIMD_UNARY_OPERATION_CASE_ITEM
- default:
- UNREACHABLE();
- }
- SetFlag(kUseGVN);
- }
-
- virtual bool IsDeletable() const V8_OVERRIDE { return true; }
-
- BuiltinFunctionId op_;
-};
-
-
-class HBinarySIMDOperation V8_FINAL : public HTemplateInstruction<3> {
- public:
- static HInstruction* New(Zone* zone,
- HValue* context,
- HValue* left,
- HValue* right,
- BuiltinFunctionId op);
-
- HValue* context() { return OperandAt(0); }
- HValue* left() const { return OperandAt(1); }
- HValue* right() const { return OperandAt(2); }
-
- virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE;
-
- virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
- if (index == 0) {
- return Representation::Tagged();
- } else {
- switch (op_) {
-#define SIMD_BINARY_OPERATION_CASE_ITEM(p1, p2, name, p4, left_representation, \
- right_representation) \
- case k##name: \
- return index == 1 ? Representation::left_representation() \
- : Representation::right_representation(); \
- break;
-SIMD_BINARY_OPERATIONS(SIMD_BINARY_OPERATION_CASE_ITEM)
-#undef SIMD_BINARY_OPERATION_CASE_ITEM
- default:
- UNREACHABLE();
- return Representation::None();
- }
- }
- }
-
- BuiltinFunctionId op() const { return op_; }
- const char* OpName() const;
-
- DECLARE_CONCRETE_INSTRUCTION(BinarySIMDOperation)
-
- protected:
- virtual bool DataEquals(HValue* other) V8_OVERRIDE {
- HBinarySIMDOperation* b = HBinarySIMDOperation::cast(other);
- return op_ == b->op();
- }
-
- private:
- HBinarySIMDOperation(HValue* context, HValue* left, HValue* right,
- BuiltinFunctionId op)
- : HTemplateInstruction<3>(HType::None()), op_(op) {
- SetOperandAt(0, context);
- SetOperandAt(1, left);
- SetOperandAt(2, right);
- switch (op) {
-#define SIMD_BINARY_OPERATION_CASE_ITEM(p1, p2, name, representation, p5, p6) \
- case k##name: \
- set_representation(Representation::representation()); \
- set_type(HType::FromRepresentation(representation_)); \
- if (Representation::p5().IsInteger32() || \
- Representation::p6().IsInteger32()) { \
- SetFlag(kTruncatingToInt32); \
- } \
- break;
-SIMD_BINARY_OPERATIONS(SIMD_BINARY_OPERATION_CASE_ITEM)
-#undef SIMD_BINARY_OPERATION_CASE_ITEM
- default:
- UNREACHABLE();
- }
- SetFlag(kUseGVN);
- }
-
- virtual bool IsDeletable() const V8_OVERRIDE { return true; }
-
- BuiltinFunctionId op_;
-};
-
-
-class HTernarySIMDOperation V8_FINAL : public HTemplateInstruction<4> {
- public:
- static HInstruction* New(Zone* zone,
- HValue* context,
- HValue* first,
- HValue* second,
- HValue* third,
- BuiltinFunctionId op);
-
- HValue* context() { return OperandAt(0); }
- HValue* first() const { return OperandAt(1); }
- HValue* second() const { return OperandAt(2); }
- HValue* third() const { return OperandAt(3); }
-
- virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE;
-
- virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
- if (index == 0) {
- return Representation::Tagged();
- } else {
- switch (op_) {
-#define SIMD_TERNARY_OPERATION_CASE_ITEM(p1, p2, name, p4, \
- first_representation, second_representation, third_representation) \
- case k##name: \
- switch (index) { \
- case 1: return Representation::first_representation(); \
- case 2: return Representation::second_representation(); \
- case 3: return Representation::third_representation(); \
- default: \
- UNREACHABLE(); \
- return Representation::None(); \
- }
-SIMD_TERNARY_OPERATIONS(SIMD_TERNARY_OPERATION_CASE_ITEM)
-#undef SIMD_TERNARY_OPERATION_CASE_ITEM
- default:
- UNREACHABLE();
- return Representation::None();
- }
- }
- }
-
- BuiltinFunctionId op() const { return op_; }
- const char* OpName() const;
-
- DECLARE_CONCRETE_INSTRUCTION(TernarySIMDOperation)
-
- protected:
- virtual bool DataEquals(HValue* other) V8_OVERRIDE {
- HTernarySIMDOperation* b = HTernarySIMDOperation::cast(other);
- return op_ == b->op();
- }
-
- private:
- HTernarySIMDOperation(HValue* context, HValue* first, HValue* second,
- HValue* third, BuiltinFunctionId op)
- : HTemplateInstruction<4>(HType::None()), op_(op) {
- SetOperandAt(0, context);
- SetOperandAt(1, first);
- SetOperandAt(2, second);
- SetOperandAt(3, third);
- switch (op) {
-#define SIMD_TERNARY_OPERATION_CASE_ITEM(p1, p2, name, representation, p5, \
- p6, p7) \
- case k##name: \
- set_representation(Representation::representation()); \
- set_type(HType::FromRepresentation(representation_)); \
- if (Representation::p5().IsInteger32() || \
- Representation::p6().IsInteger32() || \
- Representation::p7().IsInteger32()) { \
- SetFlag(kTruncatingToInt32); \
- } \
- break;
-SIMD_TERNARY_OPERATIONS(SIMD_TERNARY_OPERATION_CASE_ITEM)
-#undef SIMD_TERNARY_OPERATION_CASE_ITEM
- default:
- UNREACHABLE();
- }
- SetFlag(kUseGVN);
- }
-
- virtual bool IsDeletable() const V8_OVERRIDE { return true; }
-
- BuiltinFunctionId op_;
-};
-
-
-class HQuarternarySIMDOperation V8_FINAL : public HTemplateInstruction<5> {
- public:
- static HInstruction* New(Zone* zone,
- HValue* context,
- HValue* x,
- HValue* y,
- HValue* z,
- HValue* w,
- BuiltinFunctionId op);
-
- HValue* context() { return OperandAt(0); }
- HValue* x() const { return OperandAt(1); }
- HValue* y() const { return OperandAt(2); }
- HValue* z() const { return OperandAt(3); }
- HValue* w() const { return OperandAt(4); }
-
- virtual OStream& PrintDataTo(OStream& os) const V8_OVERRIDE;
-
- virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
- if (index == 0) {
- return Representation::Tagged();
- } else {
- switch (op_) {
-#define SIMD_QUARTERNARY_OPERATION_CASE_ITEM(p1, p2, name, p4, \
- first_representation, second_representation, third_representation, \
- fourth_representation) \
- case k##name: \
- switch (index) { \
- case 1: return Representation::first_representation(); \
- case 2: return Representation::second_representation(); \
- case 3: return Representation::third_representation(); \
- case 4: return Representation::fourth_representation(); \
- default: \
- UNREACHABLE(); \
- return Representation::None(); \
- }
-SIMD_QUARTERNARY_OPERATIONS(SIMD_QUARTERNARY_OPERATION_CASE_ITEM)
-#undef SIMD_QUARTERNARY_OPERATION_CASE_ITEM
- default:
- UNREACHABLE();
- return Representation::None();
- }
- }
- }
-
- BuiltinFunctionId op() const { return op_; }
- const char* OpName() const;
-
- DECLARE_CONCRETE_INSTRUCTION(QuarternarySIMDOperation)
-
- protected:
- virtual bool DataEquals(HValue* other) V8_OVERRIDE {
- HQuarternarySIMDOperation* b = HQuarternarySIMDOperation::cast(other);
- return op_ == b->op();
- }
-
- private:
- HQuarternarySIMDOperation(HValue* context, HValue* x, HValue* y, HValue* z,
- HValue* w, BuiltinFunctionId op)
- : HTemplateInstruction<5>(HType::None()), op_(op) {
- SetOperandAt(0, context);
- SetOperandAt(1, x);
- SetOperandAt(2, y);
- SetOperandAt(3, z);
- SetOperandAt(4, w);
- switch (op) {
-#define SIMD_QUARTERNARY_OPERATION_CASE_ITEM(p1, p2, name, representation, p5, \
- p6, p7, p8) \
- case k##name: \
- set_representation(Representation::representation()); \
- set_type(HType::FromRepresentation(representation_)); \
- if (Representation::p5().IsInteger32() || \
- Representation::p6().IsInteger32() || \
- Representation::p7().IsInteger32() || \
- Representation::p8().IsInteger32()) { \
- SetFlag(kTruncatingToInt32); \
- } \
- break;
-SIMD_QUARTERNARY_OPERATIONS(SIMD_QUARTERNARY_OPERATION_CASE_ITEM)
-#undef SIMD_QUARTERNARY_OPERATION_CASE_ITEM
- default:
- UNREACHABLE();
- }
- SetFlag(kUseGVN);
- }
-
- virtual bool IsDeletable() const V8_OVERRIDE { return true; }
-
- BuiltinFunctionId op_;
-};
-
#undef DECLARE_INSTRUCTION
#undef DECLARE_CONCRETE_INSTRUCTION