| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index f977a750d946a6b24d657b08229fc4a238c368b2..bef46df4ec53b5f6b78b0bccaf6781a64a05b1fc 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -97,6 +97,7 @@ class LChunkBuilder;
|
| V(ClampToUint8) \
|
| V(ClassOfTestAndBranch) \
|
| V(CompareNumericAndBranch) \
|
| + V(CompareHoleAndBranch) \
|
| V(CompareGeneric) \
|
| V(CompareObjectEqAndBranch) \
|
| V(CompareMap) \
|
| @@ -142,7 +143,6 @@ class LChunkBuilder;
|
| V(LoadKeyed) \
|
| V(LoadKeyedGeneric) \
|
| V(LoadNamedField) \
|
| - V(LoadNamedFieldPolymorphic) \
|
| V(LoadNamedGeneric) \
|
| V(MapEnumLength) \
|
| V(MathFloorOfDiv) \
|
| @@ -210,24 +210,27 @@ class LChunkBuilder;
|
| V(ExternalMemory)
|
|
|
|
|
| -#define DECLARE_ABSTRACT_INSTRUCTION(type) \
|
| - virtual bool Is##type() const { return true; } \
|
| - static H##type* cast(HValue* value) { \
|
| - ASSERT(value->Is##type()); \
|
| - return reinterpret_cast<H##type*>(value); \
|
| +#define DECLARE_ABSTRACT_INSTRUCTION(type) \
|
| + virtual bool Is##type() const V8_FINAL V8_OVERRIDE { return true; } \
|
| + static H##type* cast(HValue* value) { \
|
| + ASSERT(value->Is##type()); \
|
| + return reinterpret_cast<H##type*>(value); \
|
| }
|
|
|
|
|
| -#define DECLARE_CONCRETE_INSTRUCTION(type) \
|
| - virtual LInstruction* CompileToLithium(LChunkBuilder* builder); \
|
| - static H##type* cast(HValue* value) { \
|
| - ASSERT(value->Is##type()); \
|
| - return reinterpret_cast<H##type*>(value); \
|
| - } \
|
| - virtual Opcode opcode() const { return HValue::k##type; }
|
| +#define DECLARE_CONCRETE_INSTRUCTION(type) \
|
| + virtual LInstruction* CompileToLithium( \
|
| + LChunkBuilder* builder) V8_FINAL V8_OVERRIDE; \
|
| + static H##type* cast(HValue* value) { \
|
| + ASSERT(value->Is##type()); \
|
| + return reinterpret_cast<H##type*>(value); \
|
| + } \
|
| + virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \
|
| + return HValue::k##type; \
|
| + }
|
|
|
|
|
| -class Range: public ZoneObject {
|
| +class Range V8_FINAL : public ZoneObject {
|
| public:
|
| Range()
|
| : lower_(kMinInt),
|
| @@ -302,7 +305,7 @@ class Range: public ZoneObject {
|
| };
|
|
|
|
|
| -class UniqueValueId {
|
| +class UniqueValueId V8_FINAL {
|
| public:
|
| UniqueValueId() : raw_address_(NULL) { }
|
|
|
| @@ -344,7 +347,7 @@ class UniqueValueId {
|
| };
|
|
|
|
|
| -class HType {
|
| +class HType V8_FINAL {
|
| public:
|
| static HType None() { return HType(kNone); }
|
| static HType Tagged() { return HType(kTagged); }
|
| @@ -495,7 +498,7 @@ class HUseListNode: public ZoneObject {
|
|
|
| // We reuse use list nodes behind the scenes as uses are added and deleted.
|
| // This class is the safe way to iterate uses while deleting them.
|
| -class HUseIterator BASE_EMBEDDED {
|
| +class HUseIterator V8_FINAL BASE_EMBEDDED {
|
| public:
|
| bool Done() { return current_ == NULL; }
|
| void Advance();
|
| @@ -539,7 +542,7 @@ enum GVNFlag {
|
| };
|
|
|
|
|
| -class DecompositionResult BASE_EMBEDDED {
|
| +class DecompositionResult V8_FINAL BASE_EMBEDDED {
|
| public:
|
| DecompositionResult() : base_(NULL), offset_(0), scale_(0) {}
|
|
|
| @@ -587,7 +590,7 @@ class DecompositionResult BASE_EMBEDDED {
|
| typedef EnumSet<GVNFlag> GVNFlagSet;
|
|
|
|
|
| -class HValue: public ZoneObject {
|
| +class HValue : public ZoneObject {
|
| public:
|
| static const int kNoNumber = -1;
|
|
|
| @@ -802,10 +805,10 @@ class HValue: public ZoneObject {
|
| bool CheckFlag(Flag f) const { return (flags_ & (1 << f)) != 0; }
|
|
|
| // Returns true if the flag specified is set for all uses, false otherwise.
|
| - bool CheckUsesForFlag(Flag f);
|
| + bool CheckUsesForFlag(Flag f) const;
|
| // Returns true if the flag specified is set for all uses, and this set
|
| // of uses is non-empty.
|
| - bool HasAtLeastOneUseWithFlagAndNoneWithout(Flag f);
|
| + bool HasAtLeastOneUseWithFlagAndNoneWithout(Flag f) const;
|
|
|
| GVNFlagSet gvn_flags() const { return gvn_flags_; }
|
| void SetGVNFlag(GVNFlag f) { gvn_flags_.Add(f); }
|
| @@ -1082,12 +1085,12 @@ class HValue: public ZoneObject {
|
| }
|
|
|
|
|
| -class HInstruction: public HValue {
|
| +class HInstruction : public HValue {
|
| public:
|
| HInstruction* next() const { return next_; }
|
| HInstruction* previous() const { return previous_; }
|
|
|
| - virtual void PrintTo(StringStream* stream);
|
| + virtual void PrintTo(StringStream* stream) V8_OVERRIDE;
|
| virtual void PrintDataTo(StringStream* stream);
|
|
|
| bool IsLinked() const { return block() != NULL; }
|
| @@ -1109,7 +1112,7 @@ class HInstruction: public HValue {
|
| virtual LInstruction* CompileToLithium(LChunkBuilder* builder) = 0;
|
|
|
| #ifdef DEBUG
|
| - virtual void Verify();
|
| + virtual void Verify() V8_OVERRIDE;
|
| #endif
|
|
|
| virtual bool IsCall() { return false; }
|
| @@ -1125,7 +1128,7 @@ class HInstruction: public HValue {
|
| SetGVNFlag(kDependsOnOsrEntries);
|
| }
|
|
|
| - virtual void DeleteFromGraph() { Unlink(); }
|
| + virtual void DeleteFromGraph() V8_OVERRIDE { Unlink(); }
|
|
|
| private:
|
| void InitializeAsFirst(HBasicBlock* block) {
|
| @@ -1146,26 +1149,30 @@ class HInstruction: public HValue {
|
| template<int V>
|
| class HTemplateInstruction : public HInstruction {
|
| public:
|
| - int OperandCount() { return V; }
|
| - HValue* OperandAt(int i) const { return inputs_[i]; }
|
| + virtual int OperandCount() V8_FINAL V8_OVERRIDE { return V; }
|
| + virtual HValue* OperandAt(int i) const V8_FINAL V8_OVERRIDE {
|
| + return inputs_[i];
|
| + }
|
|
|
| protected:
|
| HTemplateInstruction(HType type = HType::Tagged()) : HInstruction(type) {}
|
|
|
| - void InternalSetOperandAt(int i, HValue* value) { inputs_[i] = value; }
|
| + virtual void InternalSetOperandAt(int i, HValue* value) V8_FINAL V8_OVERRIDE {
|
| + inputs_[i] = value;
|
| + }
|
|
|
| private:
|
| EmbeddedContainer<HValue*, V> inputs_;
|
| };
|
|
|
|
|
| -class HControlInstruction: public HInstruction {
|
| +class HControlInstruction : public HInstruction {
|
| public:
|
| virtual HBasicBlock* SuccessorAt(int i) = 0;
|
| virtual int SuccessorCount() = 0;
|
| virtual void SetSuccessorAt(int i, HBasicBlock* block) = 0;
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| HBasicBlock* FirstSuccessor() {
|
| return SuccessorCount() > 0 ? SuccessorAt(0) : NULL;
|
| @@ -1178,7 +1185,7 @@ class HControlInstruction: public HInstruction {
|
| };
|
|
|
|
|
| -class HSuccessorIterator BASE_EMBEDDED {
|
| +class HSuccessorIterator V8_FINAL BASE_EMBEDDED {
|
| public:
|
| explicit HSuccessorIterator(HControlInstruction* instr)
|
| : instr_(instr), current_(0) { }
|
| @@ -1194,18 +1201,22 @@ class HSuccessorIterator BASE_EMBEDDED {
|
|
|
|
|
| template<int S, int V>
|
| -class HTemplateControlInstruction: public HControlInstruction {
|
| +class HTemplateControlInstruction : public HControlInstruction {
|
| public:
|
| - int SuccessorCount() { return S; }
|
| - HBasicBlock* SuccessorAt(int i) { return successors_[i]; }
|
| - void SetSuccessorAt(int i, HBasicBlock* block) { successors_[i] = block; }
|
| + int SuccessorCount() V8_OVERRIDE { return S; }
|
| + HBasicBlock* SuccessorAt(int i) V8_OVERRIDE { return successors_[i]; }
|
| + void SetSuccessorAt(int i, HBasicBlock* block) V8_OVERRIDE {
|
| + successors_[i] = block;
|
| + }
|
|
|
| - int OperandCount() { return V; }
|
| - HValue* OperandAt(int i) const { return inputs_[i]; }
|
| + int OperandCount() V8_OVERRIDE { return V; }
|
| + HValue* OperandAt(int i) const V8_OVERRIDE { return inputs_[i]; }
|
|
|
|
|
| protected:
|
| - void InternalSetOperandAt(int i, HValue* value) { inputs_[i] = value; }
|
| + void InternalSetOperandAt(int i, HValue* value) V8_OVERRIDE {
|
| + inputs_[i] = value;
|
| + }
|
|
|
| private:
|
| EmbeddedContainer<HBasicBlock*, S> successors_;
|
| @@ -1213,9 +1224,9 @@ class HTemplateControlInstruction: public HControlInstruction {
|
| };
|
|
|
|
|
| -class HBlockEntry: public HTemplateInstruction<0> {
|
| +class HBlockEntry V8_FINAL : public HTemplateInstruction<0> {
|
| public:
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| @@ -1223,7 +1234,7 @@ class HBlockEntry: public HTemplateInstruction<0> {
|
| };
|
|
|
|
|
| -class HDummyUse: public HTemplateInstruction<1> {
|
| +class HDummyUse V8_FINAL : public HTemplateInstruction<1> {
|
| public:
|
| explicit HDummyUse(HValue* value)
|
| : HTemplateInstruction<1>(HType::Smi()) {
|
| @@ -1235,40 +1246,44 @@ class HDummyUse: public HTemplateInstruction<1> {
|
|
|
| HValue* value() { return OperandAt(0); }
|
|
|
| - virtual bool HasEscapingOperandAt(int index) { return false; }
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; }
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(DummyUse);
|
| };
|
|
|
|
|
| -class HDeoptimize: public HTemplateInstruction<0> {
|
| +class HDeoptimize V8_FINAL : public HTemplateInstruction<0> {
|
| public:
|
| - DECLARE_INSTRUCTION_FACTORY_P1(HDeoptimize, Deoptimizer::BailoutType);
|
| + DECLARE_INSTRUCTION_FACTORY_P2(HDeoptimize, const char*,
|
| + Deoptimizer::BailoutType);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| + const char* reason() const { return reason_; }
|
| Deoptimizer::BailoutType type() { return type_; }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(Deoptimize)
|
|
|
| private:
|
| - explicit HDeoptimize(Deoptimizer::BailoutType type) : type_(type) {}
|
| + explicit HDeoptimize(const char* reason, Deoptimizer::BailoutType type)
|
| + : reason_(reason), type_(type) {}
|
|
|
| + const char* reason_;
|
| Deoptimizer::BailoutType type_;
|
| };
|
|
|
|
|
| // Inserts an int3/stop break instruction for debugging purposes.
|
| -class HDebugBreak: public HTemplateInstruction<0> {
|
| +class HDebugBreak V8_FINAL : public HTemplateInstruction<0> {
|
| public:
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| @@ -1276,23 +1291,23 @@ class HDebugBreak: public HTemplateInstruction<0> {
|
| };
|
|
|
|
|
| -class HGoto: public HTemplateControlInstruction<1, 0> {
|
| +class HGoto V8_FINAL : public HTemplateControlInstruction<1, 0> {
|
| public:
|
| explicit HGoto(HBasicBlock* target) {
|
| SetSuccessorAt(0, target);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(Goto)
|
| };
|
|
|
|
|
| -class HUnaryControlInstruction: public HTemplateControlInstruction<2, 1> {
|
| +class HUnaryControlInstruction : public HTemplateControlInstruction<2, 1> {
|
| public:
|
| HUnaryControlInstruction(HValue* value,
|
| HBasicBlock* true_target,
|
| @@ -1302,13 +1317,13 @@ class HUnaryControlInstruction: public HTemplateControlInstruction<2, 1> {
|
| SetSuccessorAt(1, false_target);
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| HValue* value() { return OperandAt(0); }
|
| };
|
|
|
|
|
| -class HBranch: public HUnaryControlInstruction {
|
| +class HBranch V8_FINAL : public HUnaryControlInstruction {
|
| public:
|
| HBranch(HValue* value,
|
| ToBooleanStub::Types expected_input_types = ToBooleanStub::Types(),
|
| @@ -1319,10 +1334,10 @@ class HBranch: public HUnaryControlInstruction {
|
| SetFlag(kAllowUndefinedAsNaN);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
| - virtual Representation observed_input_representation(int index);
|
| + virtual Representation observed_input_representation(int index) V8_OVERRIDE;
|
|
|
| ToBooleanStub::Types expected_input_types() const {
|
| return expected_input_types_;
|
| @@ -1335,7 +1350,7 @@ class HBranch: public HUnaryControlInstruction {
|
| };
|
|
|
|
|
| -class HCompareMap: public HUnaryControlInstruction {
|
| +class HCompareMap V8_FINAL : public HUnaryControlInstruction {
|
| public:
|
| HCompareMap(HValue* value,
|
| Handle<Map> map,
|
| @@ -1346,11 +1361,11 @@ class HCompareMap: public HUnaryControlInstruction {
|
| ASSERT(!map.is_null());
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| Handle<Map> map() const { return map_; }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -1361,20 +1376,20 @@ class HCompareMap: public HUnaryControlInstruction {
|
| };
|
|
|
|
|
| -class HContext: public HTemplateInstruction<0> {
|
| +class HContext V8_FINAL : public HTemplateInstruction<0> {
|
| public:
|
| static HContext* New(Zone* zone) {
|
| return new(zone) HContext();
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(Context)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| HContext() {
|
| @@ -1382,11 +1397,11 @@ class HContext: public HTemplateInstruction<0> {
|
| SetFlag(kUseGVN);
|
| }
|
|
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HReturn: public HTemplateControlInstruction<0, 3> {
|
| +class HReturn V8_FINAL : public HTemplateControlInstruction<0, 3> {
|
| public:
|
| static HInstruction* New(Zone* zone,
|
| HValue* context,
|
| @@ -1401,11 +1416,11 @@ class HReturn: public HTemplateControlInstruction<0, 3> {
|
| return new(zone) HReturn(value, context, 0);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| HValue* value() { return OperandAt(0); }
|
| HValue* context() { return OperandAt(1); }
|
| @@ -1422,9 +1437,9 @@ class HReturn: public HTemplateControlInstruction<0, 3> {
|
| };
|
|
|
|
|
| -class HAbnormalExit: public HTemplateControlInstruction<0, 0> {
|
| +class HAbnormalExit V8_FINAL : public HTemplateControlInstruction<0, 0> {
|
| public:
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| @@ -1432,7 +1447,7 @@ class HAbnormalExit: public HTemplateControlInstruction<0, 0> {
|
| };
|
|
|
|
|
| -class HUnaryOperation: public HTemplateInstruction<1> {
|
| +class HUnaryOperation : public HTemplateInstruction<1> {
|
| public:
|
| HUnaryOperation(HValue* value, HType type = HType::Tagged())
|
| : HTemplateInstruction<1>(type) {
|
| @@ -1444,11 +1459,11 @@ class HUnaryOperation: public HTemplateInstruction<1> {
|
| }
|
|
|
| HValue* value() const { return OperandAt(0); }
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
| };
|
|
|
|
|
| -class HThrow: public HTemplateInstruction<2> {
|
| +class HThrow V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| static HThrow* New(Zone* zone,
|
| HValue* context,
|
| @@ -1456,7 +1471,7 @@ class HThrow: public HTemplateInstruction<2> {
|
| return new(zone) HThrow(context, value);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -1474,11 +1489,11 @@ class HThrow: public HTemplateInstruction<2> {
|
| };
|
|
|
|
|
| -class HUseConst: public HUnaryOperation {
|
| +class HUseConst V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HUseConst, HValue*);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| @@ -1489,19 +1504,20 @@ class HUseConst: public HUnaryOperation {
|
| };
|
|
|
|
|
| -class HForceRepresentation: public HTemplateInstruction<1> {
|
| +class HForceRepresentation V8_FINAL : public HTemplateInstruction<1> {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P2(HForceRepresentation, HValue*, Representation);
|
|
|
| HValue* value() { return OperandAt(0); }
|
|
|
| - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
| + virtual HValue* EnsureAndPropagateNotMinusZero(
|
| + BitVector* visited) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return representation(); // Same as the output representation.
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(ForceRepresentation)
|
|
|
| @@ -1513,20 +1529,18 @@ class HForceRepresentation: public HTemplateInstruction<1> {
|
| };
|
|
|
|
|
| -class HChange: public HUnaryOperation {
|
| +class HChange V8_FINAL : public HUnaryOperation {
|
| public:
|
| HChange(HValue* value,
|
| Representation to,
|
| bool is_truncating_to_smi,
|
| - bool is_truncating_to_int32,
|
| - bool allow_undefined_as_nan)
|
| + bool is_truncating_to_int32)
|
| : HUnaryOperation(value) {
|
| ASSERT(!value->representation().IsNone());
|
| ASSERT(!to.IsNone());
|
| ASSERT(!value->representation().Equals(to));
|
| set_representation(to);
|
| SetFlag(kUseGVN);
|
| - if (allow_undefined_as_nan) SetFlag(kAllowUndefinedAsNaN);
|
| if (is_truncating_to_smi) SetFlag(kTruncatingToSmi);
|
| if (is_truncating_to_int32) SetFlag(kTruncatingToInt32);
|
| if (value->representation().IsSmi() || value->type().IsSmi()) {
|
| @@ -1537,50 +1551,52 @@ class HChange: public HUnaryOperation {
|
| }
|
| }
|
|
|
| - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
| - virtual HType CalculateInferredType();
|
| - virtual HValue* Canonicalize();
|
| + bool can_convert_undefined_to_nan() {
|
| + return CheckUsesForFlag(kAllowUndefinedAsNaN);
|
| + }
|
| +
|
| + virtual HValue* EnsureAndPropagateNotMinusZero(
|
| + BitVector* visited) V8_OVERRIDE;
|
| + virtual HType CalculateInferredType() V8_OVERRIDE;
|
| + virtual HValue* Canonicalize() V8_OVERRIDE;
|
|
|
| Representation from() const { return value()->representation(); }
|
| Representation to() const { return representation(); }
|
| - bool allow_undefined_as_nan() const {
|
| - return CheckFlag(kAllowUndefinedAsNaN);
|
| - }
|
| bool deoptimize_on_minus_zero() const {
|
| return CheckFlag(kBailoutOnMinusZero);
|
| }
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return from();
|
| }
|
|
|
| - virtual Range* InferRange(Zone* zone);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(Change)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| - virtual bool IsDeletable() const {
|
| + virtual bool IsDeletable() const V8_OVERRIDE {
|
| return !from().IsTagged() || value()->type().IsSmi();
|
| }
|
| };
|
|
|
|
|
| -class HClampToUint8: public HUnaryOperation {
|
| +class HClampToUint8 V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HClampToUint8, HValue*);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(ClampToUint8)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| explicit HClampToUint8(HValue* value)
|
| @@ -1590,7 +1606,7 @@ class HClampToUint8: public HUnaryOperation {
|
| SetFlag(kUseGVN);
|
| }
|
|
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| @@ -1600,7 +1616,7 @@ enum RemovableSimulate {
|
| };
|
|
|
|
|
| -class HSimulate: public HInstruction {
|
| +class HSimulate V8_FINAL : public HInstruction {
|
| public:
|
| HSimulate(BailoutId ast_id,
|
| int pop_count,
|
| @@ -1612,9 +1628,9 @@ class HSimulate: public HInstruction {
|
| assigned_indexes_(2, zone),
|
| zone_(zone),
|
| removable_(removable) {}
|
| - virtual ~HSimulate() {}
|
| + ~HSimulate() {}
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| bool HasAstId() const { return !ast_id_.IsNone(); }
|
| BailoutId ast_id() const { return ast_id_; }
|
| @@ -1644,11 +1660,13 @@ class HSimulate: public HInstruction {
|
| }
|
| return -1;
|
| }
|
| - virtual int OperandCount() { return values_.length(); }
|
| - virtual HValue* OperandAt(int index) const { return values_[index]; }
|
| + virtual int OperandCount() V8_OVERRIDE { return values_.length(); }
|
| + virtual HValue* OperandAt(int index) const V8_OVERRIDE {
|
| + return values_[index];
|
| + }
|
|
|
| - virtual bool HasEscapingOperandAt(int index) { return false; }
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; }
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| @@ -1658,13 +1676,13 @@ class HSimulate: public HInstruction {
|
| DECLARE_CONCRETE_INSTRUCTION(Simulate)
|
|
|
| #ifdef DEBUG
|
| - virtual void Verify();
|
| + virtual void Verify() V8_OVERRIDE;
|
| void set_closure(Handle<JSFunction> closure) { closure_ = closure; }
|
| Handle<JSFunction> closure() const { return closure_; }
|
| #endif
|
|
|
| protected:
|
| - virtual void InternalSetOperandAt(int index, HValue* value) {
|
| + virtual void InternalSetOperandAt(int index, HValue* value) V8_OVERRIDE {
|
| values_[index] = value;
|
| }
|
|
|
| @@ -1697,7 +1715,7 @@ class HSimulate: public HInstruction {
|
| };
|
|
|
|
|
| -class HEnvironmentMarker: public HTemplateInstruction<1> {
|
| +class HEnvironmentMarker V8_FINAL : public HTemplateInstruction<1> {
|
| public:
|
| enum Kind { BIND, LOOKUP };
|
|
|
| @@ -1711,11 +1729,11 @@ class HEnvironmentMarker: public HTemplateInstruction<1> {
|
| next_simulate_ = simulate;
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| #ifdef DEBUG
|
| void set_closure(Handle<JSFunction> closure) {
|
| @@ -1739,7 +1757,7 @@ class HEnvironmentMarker: public HTemplateInstruction<1> {
|
| };
|
|
|
|
|
| -class HStackCheck: public HTemplateInstruction<1> {
|
| +class HStackCheck V8_FINAL : public HTemplateInstruction<1> {
|
| public:
|
| enum Type {
|
| kFunctionEntry,
|
| @@ -1750,7 +1768,7 @@ class HStackCheck: public HTemplateInstruction<1> {
|
|
|
| HValue* context() { return OperandAt(0); }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -1789,7 +1807,7 @@ enum InliningKind {
|
| class HArgumentsObject;
|
|
|
|
|
| -class HEnterInlined: public HTemplateInstruction<0> {
|
| +class HEnterInlined V8_FINAL : public HTemplateInstruction<0> {
|
| public:
|
| static HEnterInlined* New(Zone* zone,
|
| HValue* context,
|
| @@ -1808,7 +1826,7 @@ class HEnterInlined: public HTemplateInstruction<0> {
|
| void RegisterReturnTarget(HBasicBlock* return_target, Zone* zone);
|
| ZoneList<HBasicBlock*>* return_targets() { return &return_targets_; }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| Handle<JSFunction> closure() const { return closure_; }
|
| int arguments_count() const { return arguments_count_; }
|
| @@ -1818,7 +1836,7 @@ class HEnterInlined: public HTemplateInstruction<0> {
|
| InliningKind inlining_kind() const { return inlining_kind_; }
|
| bool undefined_receiver() const { return undefined_receiver_; }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| @@ -1859,11 +1877,11 @@ class HEnterInlined: public HTemplateInstruction<0> {
|
| };
|
|
|
|
|
| -class HLeaveInlined: public HTemplateInstruction<0> {
|
| +class HLeaveInlined V8_FINAL : public HTemplateInstruction<0> {
|
| public:
|
| HLeaveInlined() { }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| @@ -1871,11 +1889,11 @@ class HLeaveInlined: public HTemplateInstruction<0> {
|
| };
|
|
|
|
|
| -class HPushArgument: public HUnaryOperation {
|
| +class HPushArgument V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HPushArgument, HValue*);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -1890,39 +1908,39 @@ class HPushArgument: public HUnaryOperation {
|
| };
|
|
|
|
|
| -class HThisFunction: public HTemplateInstruction<0> {
|
| +class HThisFunction V8_FINAL : public HTemplateInstruction<0> {
|
| public:
|
| HThisFunction() {
|
| set_representation(Representation::Tagged());
|
| SetFlag(kUseGVN);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(ThisFunction)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HOuterContext: public HUnaryOperation {
|
| +class HOuterContext V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HOuterContext, HValue*);
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(OuterContext);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| explicit HOuterContext(HValue* inner) : HUnaryOperation(inner) {
|
| @@ -1930,11 +1948,11 @@ class HOuterContext: public HUnaryOperation {
|
| SetFlag(kUseGVN);
|
| }
|
|
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HDeclareGlobals: public HUnaryOperation {
|
| +class HDeclareGlobals V8_FINAL : public HUnaryOperation {
|
| public:
|
| HDeclareGlobals(HValue* context,
|
| Handle<FixedArray> pairs,
|
| @@ -1959,7 +1977,7 @@ class HDeclareGlobals: public HUnaryOperation {
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals)
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -1969,7 +1987,7 @@ class HDeclareGlobals: public HUnaryOperation {
|
| };
|
|
|
|
|
| -class HGlobalObject: public HUnaryOperation {
|
| +class HGlobalObject V8_FINAL : public HUnaryOperation {
|
| public:
|
| explicit HGlobalObject(HValue* context) : HUnaryOperation(context) {
|
| set_representation(Representation::Tagged());
|
| @@ -1982,30 +2000,30 @@ class HGlobalObject: public HUnaryOperation {
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(GlobalObject)
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HGlobalReceiver: public HUnaryOperation {
|
| +class HGlobalReceiver V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HGlobalReceiver, HValue*);
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver)
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| explicit HGlobalReceiver(HValue* global_object)
|
| @@ -2014,12 +2032,12 @@ class HGlobalReceiver: public HUnaryOperation {
|
| SetFlag(kUseGVN);
|
| }
|
|
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| template <int V>
|
| -class HCall: public HTemplateInstruction<V> {
|
| +class HCall : public HTemplateInstruction<V> {
|
| public:
|
| // The argument count includes the receiver.
|
| explicit HCall<V>(int argument_count) : argument_count_(argument_count) {
|
| @@ -2027,35 +2045,38 @@ class HCall: public HTemplateInstruction<V> {
|
| this->SetAllSideEffects();
|
| }
|
|
|
| - virtual HType CalculateInferredType() { return HType::Tagged(); }
|
| + virtual HType CalculateInferredType() V8_FINAL V8_OVERRIDE {
|
| + return HType::Tagged();
|
| + }
|
|
|
| virtual int argument_count() const { return argument_count_; }
|
|
|
| - virtual bool IsCall() { return true; }
|
| + virtual bool IsCall() V8_FINAL V8_OVERRIDE { return true; }
|
|
|
| private:
|
| int argument_count_;
|
| };
|
|
|
|
|
| -class HUnaryCall: public HCall<1> {
|
| +class HUnaryCall : public HCall<1> {
|
| public:
|
| HUnaryCall(HValue* value, int argument_count)
|
| : HCall<1>(argument_count) {
|
| SetOperandAt(0, value);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(
|
| + int index) V8_FINAL V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| HValue* value() { return OperandAt(0); }
|
| };
|
|
|
|
|
| -class HBinaryCall: public HCall<2> {
|
| +class HBinaryCall : public HCall<2> {
|
| public:
|
| HBinaryCall(HValue* first, HValue* second, int argument_count)
|
| : HCall<2>(argument_count) {
|
| @@ -2063,9 +2084,10 @@ class HBinaryCall: public HCall<2> {
|
| SetOperandAt(1, second);
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(
|
| + int index) V8_FINAL V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -2074,7 +2096,7 @@ class HBinaryCall: public HCall<2> {
|
| };
|
|
|
|
|
| -class HInvokeFunction: public HBinaryCall {
|
| +class HInvokeFunction V8_FINAL : public HBinaryCall {
|
| public:
|
| HInvokeFunction(HValue* context, HValue* function, int argument_count)
|
| : HBinaryCall(context, function, argument_count) {
|
| @@ -2106,10 +2128,6 @@ class HInvokeFunction: public HBinaryCall {
|
| known_function, argument_count);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| - return Representation::Tagged();
|
| - }
|
| -
|
| HValue* context() { return first(); }
|
| HValue* function() { return second(); }
|
| Handle<JSFunction> known_function() { return known_function_; }
|
| @@ -2123,7 +2141,7 @@ class HInvokeFunction: public HBinaryCall {
|
| };
|
|
|
|
|
| -class HCallConstantFunction: public HCall<0> {
|
| +class HCallConstantFunction V8_FINAL : public HCall<0> {
|
| public:
|
| HCallConstantFunction(Handle<JSFunction> function, int argument_count)
|
| : HCall<0>(argument_count),
|
| @@ -2138,9 +2156,9 @@ class HCallConstantFunction: public HCall<0> {
|
| Isolate::Current()->builtins()->builtin(Builtins::kFunctionApply);
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| @@ -2152,16 +2170,12 @@ class HCallConstantFunction: public HCall<0> {
|
| };
|
|
|
|
|
| -class HCallKeyed: public HBinaryCall {
|
| +class HCallKeyed V8_FINAL : public HBinaryCall {
|
| public:
|
| HCallKeyed(HValue* context, HValue* key, int argument_count)
|
| : HBinaryCall(context, key, argument_count) {
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| - return Representation::Tagged();
|
| - }
|
| -
|
| HValue* context() { return first(); }
|
| HValue* key() { return second(); }
|
|
|
| @@ -2169,29 +2183,25 @@ class HCallKeyed: public HBinaryCall {
|
| };
|
|
|
|
|
| -class HCallNamed: public HUnaryCall {
|
| +class HCallNamed V8_FINAL : public HUnaryCall {
|
| public:
|
| HCallNamed(HValue* context, Handle<String> name, int argument_count)
|
| : HUnaryCall(context, argument_count), name_(name) {
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| HValue* context() { return value(); }
|
| Handle<String> name() const { return name_; }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(CallNamed)
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| - return Representation::Tagged();
|
| - }
|
| -
|
| private:
|
| Handle<String> name_;
|
| };
|
|
|
|
|
| -class HCallFunction: public HBinaryCall {
|
| +class HCallFunction V8_FINAL : public HBinaryCall {
|
| public:
|
| HCallFunction(HValue* context, HValue* function, int argument_count)
|
| : HBinaryCall(context, function, argument_count) {
|
| @@ -2207,15 +2217,11 @@ class HCallFunction: public HBinaryCall {
|
| HValue* context() { return first(); }
|
| HValue* function() { return second(); }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| - return Representation::Tagged();
|
| - }
|
| -
|
| DECLARE_CONCRETE_INSTRUCTION(CallFunction)
|
| };
|
|
|
|
|
| -class HCallGlobal: public HUnaryCall {
|
| +class HCallGlobal V8_FINAL : public HUnaryCall {
|
| public:
|
| HCallGlobal(HValue* context, Handle<String> name, int argument_count)
|
| : HUnaryCall(context, argument_count), name_(name) {
|
| @@ -2228,15 +2234,11 @@ class HCallGlobal: public HUnaryCall {
|
| return new(zone) HCallGlobal(context, name, argument_count);
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| HValue* context() { return value(); }
|
| Handle<String> name() const { return name_; }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| - return Representation::Tagged();
|
| - }
|
| -
|
| DECLARE_CONCRETE_INSTRUCTION(CallGlobal)
|
|
|
| private:
|
| @@ -2244,19 +2246,19 @@ class HCallGlobal: public HUnaryCall {
|
| };
|
|
|
|
|
| -class HCallKnownGlobal: public HCall<0> {
|
| +class HCallKnownGlobal V8_FINAL : public HCall<0> {
|
| public:
|
| HCallKnownGlobal(Handle<JSFunction> target, int argument_count)
|
| : HCall<0>(argument_count),
|
| target_(target),
|
| formal_parameter_count_(target->shared()->formal_parameter_count()) { }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| Handle<JSFunction> target() const { return target_; }
|
| int formal_parameter_count() const { return formal_parameter_count_; }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| @@ -2268,15 +2270,10 @@ class HCallKnownGlobal: public HCall<0> {
|
| };
|
|
|
|
|
| -class HCallNew: public HBinaryCall {
|
| +class HCallNew V8_FINAL : public HBinaryCall {
|
| public:
|
| HCallNew(HValue* context, HValue* constructor, int argument_count)
|
| - : HBinaryCall(context, constructor, argument_count) {
|
| - }
|
| -
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| - return Representation::Tagged();
|
| - }
|
| + : HBinaryCall(context, constructor, argument_count) {}
|
|
|
| HValue* context() { return first(); }
|
| HValue* constructor() { return second(); }
|
| @@ -2285,15 +2282,18 @@ class HCallNew: public HBinaryCall {
|
| };
|
|
|
|
|
| -class HCallNewArray: public HCallNew {
|
| +class HCallNewArray V8_FINAL : public HBinaryCall {
|
| public:
|
| HCallNewArray(HValue* context, HValue* constructor, int argument_count,
|
| Handle<Cell> type_cell, ElementsKind elements_kind)
|
| - : HCallNew(context, constructor, argument_count),
|
| + : HBinaryCall(context, constructor, argument_count),
|
| elements_kind_(elements_kind),
|
| type_cell_(type_cell) {}
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + HValue* context() { return first(); }
|
| + HValue* constructor() { return second(); }
|
| +
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| Handle<Cell> property_cell() const {
|
| return type_cell_;
|
| @@ -2309,7 +2309,7 @@ class HCallNewArray: public HCallNew {
|
| };
|
|
|
|
|
| -class HCallRuntime: public HCall<1> {
|
| +class HCallRuntime V8_FINAL : public HCall<1> {
|
| public:
|
| static HCallRuntime* New(Zone* zone,
|
| HValue* context,
|
| @@ -2319,13 +2319,13 @@ class HCallRuntime: public HCall<1> {
|
| return new(zone) HCallRuntime(context, name, c_function, argument_count);
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| HValue* context() { return OperandAt(0); }
|
| const Runtime::Function* function() const { return c_function_; }
|
| Handle<String> name() const { return name_; }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -2345,18 +2345,18 @@ class HCallRuntime: public HCall<1> {
|
| };
|
|
|
|
|
| -class HMapEnumLength: public HUnaryOperation {
|
| +class HMapEnumLength V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HMapEnumLength, HValue*);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(MapEnumLength)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| explicit HMapEnumLength(HValue* value)
|
| @@ -2366,11 +2366,11 @@ class HMapEnumLength: public HUnaryOperation {
|
| SetGVNFlag(kDependsOnMaps);
|
| }
|
|
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HElementsKind: public HUnaryOperation {
|
| +class HElementsKind V8_FINAL : public HUnaryOperation {
|
| public:
|
| explicit HElementsKind(HValue* value) : HUnaryOperation(value) {
|
| set_representation(Representation::Integer32());
|
| @@ -2378,21 +2378,21 @@ class HElementsKind: public HUnaryOperation {
|
| SetGVNFlag(kDependsOnElementsKind);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(ElementsKind)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HUnaryMathOperation: public HTemplateInstruction<2> {
|
| +class HUnaryMathOperation V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| static HInstruction* New(Zone* zone,
|
| HValue* context,
|
| @@ -2402,11 +2402,12 @@ class HUnaryMathOperation: public HTemplateInstruction<2> {
|
| HValue* context() { return OperandAt(0); }
|
| HValue* value() { return OperandAt(1); }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
| + virtual HValue* EnsureAndPropagateNotMinusZero(
|
| + BitVector* visited) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| if (index == 0) {
|
| return Representation::Tagged();
|
| } else {
|
| @@ -2430,10 +2431,10 @@ class HUnaryMathOperation: public HTemplateInstruction<2> {
|
| }
|
| }
|
|
|
| - virtual Range* InferRange(Zone* zone);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
|
|
| - virtual HValue* Canonicalize();
|
| - virtual Representation RepresentationFromInputs();
|
| + virtual HValue* Canonicalize() V8_OVERRIDE;
|
| + virtual Representation RepresentationFromInputs() V8_OVERRIDE;
|
|
|
| BuiltinFunctionId op() const { return op_; }
|
| const char* OpName() const;
|
| @@ -2441,7 +2442,7 @@ class HUnaryMathOperation: public HTemplateInstruction<2> {
|
| DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) {
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| HUnaryMathOperation* b = HUnaryMathOperation::cast(other);
|
| return op_ == b->op();
|
| }
|
| @@ -2454,7 +2455,6 @@ class HUnaryMathOperation: public HTemplateInstruction<2> {
|
| switch (op) {
|
| case kMathFloor:
|
| case kMathRound:
|
| - // TODO(verwaest): Set representation to flexible int starting as smi.
|
| set_representation(Representation::Integer32());
|
| break;
|
| case kMathAbs:
|
| @@ -2484,28 +2484,28 @@ class HUnaryMathOperation: public HTemplateInstruction<2> {
|
| SetFlag(kAllowUndefinedAsNaN);
|
| }
|
|
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
|
|
| BuiltinFunctionId op_;
|
| };
|
|
|
|
|
| -class HLoadExternalArrayPointer: public HUnaryOperation {
|
| +class HLoadExternalArrayPointer V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HLoadExternalArrayPointer, HValue*);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual HType CalculateInferredType() {
|
| + virtual HType CalculateInferredType() V8_OVERRIDE {
|
| return HType::None();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| explicit HLoadExternalArrayPointer(HValue* value)
|
| @@ -2518,11 +2518,11 @@ class HLoadExternalArrayPointer: public HUnaryOperation {
|
| SetFlag(kUseGVN);
|
| }
|
|
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HCheckMaps: public HTemplateInstruction<2> {
|
| +class HCheckMaps V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| static HCheckMaps* New(Zone* zone, HValue* context, HValue* value,
|
| Handle<Map> map, CompilationInfo* info,
|
| @@ -2532,8 +2532,7 @@ class HCheckMaps: public HTemplateInstruction<2> {
|
| HValue *typecheck = NULL) {
|
| HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck);
|
| for (int i = 0; i < maps->length(); i++) {
|
| - check_map->map_set_.Add(maps->at(i), zone);
|
| - check_map->has_migration_target_ |= maps->at(i)->is_migration_target();
|
| + check_map->Add(maps->at(i), zone);
|
| }
|
| check_map->map_set_.Sort();
|
| return check_map;
|
| @@ -2541,13 +2540,13 @@ class HCheckMaps: public HTemplateInstruction<2> {
|
|
|
| bool CanOmitMapChecks() { return omit_; }
|
|
|
| - virtual bool HasEscapingOperandAt(int index) { return false; }
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; }
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
| virtual void HandleSideEffectDominator(GVNFlag side_effect,
|
| - HValue* dominator);
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + HValue* dominator) V8_OVERRIDE;
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| HValue* value() { return OperandAt(0); }
|
| SmallMapList* map_set() { return &map_set_; }
|
| @@ -2556,12 +2555,12 @@ class HCheckMaps: public HTemplateInstruction<2> {
|
| return has_migration_target_;
|
| }
|
|
|
| - virtual void FinalizeUniqueValueId();
|
| + virtual void FinalizeUniqueValueId() V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(CheckMaps)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) {
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| ASSERT_EQ(map_set_.length(), map_unique_ids_.length());
|
| HCheckMaps* b = HCheckMaps::cast(other);
|
| // Relies on the fact that map_set has been sorted before.
|
| @@ -2577,6 +2576,14 @@ class HCheckMaps: public HTemplateInstruction<2> {
|
| }
|
|
|
| private:
|
| + void Add(Handle<Map> map, Zone* zone) {
|
| + map_set_.Add(map, zone);
|
| + if (!has_migration_target_ && map->is_migration_target()) {
|
| + has_migration_target_ = true;
|
| + SetGVNFlag(kChangesNewSpacePromotion);
|
| + }
|
| + }
|
| +
|
| // Clients should use one of the static New* methods above.
|
| HCheckMaps(HValue* value, Zone *zone, HValue* typecheck)
|
| : HTemplateInstruction<2>(value->type()),
|
| @@ -2608,22 +2615,22 @@ class HCheckMaps: public HTemplateInstruction<2> {
|
| };
|
|
|
|
|
| -class HCheckFunction: public HUnaryOperation {
|
| +class HCheckFunction V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P2(HCheckFunction, HValue*, Handle<JSFunction>);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual HValue* Canonicalize();
|
| + virtual HValue* Canonicalize() V8_OVERRIDE;
|
|
|
| #ifdef DEBUG
|
| - virtual void Verify();
|
| + virtual void Verify() V8_OVERRIDE;
|
| #endif
|
|
|
| - virtual void FinalizeUniqueValueId() {
|
| + virtual void FinalizeUniqueValueId() V8_OVERRIDE {
|
| target_unique_id_ = UniqueValueId(target_);
|
| }
|
|
|
| @@ -2633,7 +2640,7 @@ class HCheckFunction: public HUnaryOperation {
|
| DECLARE_CONCRETE_INSTRUCTION(CheckFunction)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) {
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| HCheckFunction* b = HCheckFunction::cast(other);
|
| return target_unique_id_ == b->target_unique_id_;
|
| }
|
| @@ -2653,7 +2660,7 @@ class HCheckFunction: public HUnaryOperation {
|
| };
|
|
|
|
|
| -class HCheckInstanceType: public HUnaryOperation {
|
| +class HCheckInstanceType V8_FINAL : public HUnaryOperation {
|
| public:
|
| static HCheckInstanceType* NewIsSpecObject(HValue* value, Zone* zone) {
|
| return new(zone) HCheckInstanceType(value, IS_SPEC_OBJECT);
|
| @@ -2669,13 +2676,13 @@ class HCheckInstanceType: public HUnaryOperation {
|
| return new(zone) HCheckInstanceType(value, IS_INTERNALIZED_STRING);
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual HValue* Canonicalize();
|
| + virtual HValue* Canonicalize() V8_OVERRIDE;
|
|
|
| bool is_interval_check() const { return check_ <= LAST_INTERVAL_CHECK; }
|
| void GetCheckInterval(InstanceType* first, InstanceType* last);
|
| @@ -2687,7 +2694,7 @@ class HCheckInstanceType: public HUnaryOperation {
|
| // TODO(ager): It could be nice to allow the ommision of instance
|
| // type checks if we have already performed an instance type check
|
| // with a larger range.
|
| - virtual bool DataEquals(HValue* other) {
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| HCheckInstanceType* b = HCheckInstanceType::cast(other);
|
| return check_ == b->check_;
|
| }
|
| @@ -2713,15 +2720,15 @@ class HCheckInstanceType: public HUnaryOperation {
|
| };
|
|
|
|
|
| -class HCheckSmi: public HUnaryOperation {
|
| +class HCheckSmi V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HCheckSmi, HValue*);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual HValue* Canonicalize() {
|
| + virtual HValue* Canonicalize() V8_OVERRIDE {
|
| HType value_type = value()->type();
|
| if (value_type.IsSmi()) {
|
| return NULL;
|
| @@ -2732,7 +2739,7 @@ class HCheckSmi: public HUnaryOperation {
|
| DECLARE_CONCRETE_INSTRUCTION(CheckSmi)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| explicit HCheckSmi(HValue* value) : HUnaryOperation(value, HType::Smi()) {
|
| @@ -2742,14 +2749,14 @@ class HCheckSmi: public HUnaryOperation {
|
| };
|
|
|
|
|
| -class HIsNumberAndBranch: public HUnaryControlInstruction {
|
| +class HIsNumberAndBranch V8_FINAL : public HUnaryControlInstruction {
|
| public:
|
| explicit HIsNumberAndBranch(HValue* value)
|
| : HUnaryControlInstruction(value, NULL, NULL) {
|
| SetFlag(kFlexibleRepresentation);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| @@ -2757,27 +2764,27 @@ class HIsNumberAndBranch: public HUnaryControlInstruction {
|
| };
|
|
|
|
|
| -class HCheckHeapObject: public HUnaryOperation {
|
| +class HCheckHeapObject V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HCheckHeapObject, HValue*);
|
|
|
| - virtual bool HasEscapingOperandAt(int index) { return false; }
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; }
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| #ifdef DEBUG
|
| - virtual void Verify();
|
| + virtual void Verify() V8_OVERRIDE;
|
| #endif
|
|
|
| - virtual HValue* Canonicalize() {
|
| + virtual HValue* Canonicalize() V8_OVERRIDE {
|
| return value()->type().IsHeapObject() ? NULL : this;
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(CheckHeapObject)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| explicit HCheckHeapObject(HValue* value)
|
| @@ -2809,7 +2816,7 @@ class HConstant;
|
| class HBitwise;
|
|
|
|
|
| -class InductionVariableData : public ZoneObject {
|
| +class InductionVariableData V8_FINAL : public ZoneObject {
|
| public:
|
| class InductionVariableCheck : public ZoneObject {
|
| public:
|
| @@ -3009,7 +3016,7 @@ class InductionVariableData : public ZoneObject {
|
| };
|
|
|
|
|
| -class HPhi: public HValue {
|
| +class HPhi V8_FINAL : public HValue {
|
| public:
|
| HPhi(int merged_index, Zone* zone)
|
| : inputs_(2, zone),
|
| @@ -3020,29 +3027,33 @@ class HPhi: public HValue {
|
| non_phi_uses_[i] = 0;
|
| indirect_uses_[i] = 0;
|
| }
|
| - ASSERT(merged_index >= 0);
|
| + ASSERT(merged_index >= 0 || merged_index == kInvalidMergedIndex);
|
| SetFlag(kFlexibleRepresentation);
|
| SetFlag(kAllowUndefinedAsNaN);
|
| }
|
|
|
| - virtual Representation RepresentationFromInputs();
|
| + virtual Representation RepresentationFromInputs() V8_OVERRIDE;
|
|
|
| - virtual Range* InferRange(Zone* zone);
|
| - virtual void InferRepresentation(HInferRepresentationPhase* h_infer);
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
| + virtual void InferRepresentation(
|
| + HInferRepresentationPhase* h_infer) V8_OVERRIDE;
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return representation();
|
| }
|
| - virtual Representation KnownOptimalRepresentation() {
|
| + virtual Representation KnownOptimalRepresentation() V8_OVERRIDE {
|
| return representation();
|
| }
|
| - virtual HType CalculateInferredType();
|
| - virtual int OperandCount() { return inputs_.length(); }
|
| - virtual HValue* OperandAt(int index) const { return inputs_[index]; }
|
| + virtual HType CalculateInferredType() V8_OVERRIDE;
|
| + virtual int OperandCount() V8_OVERRIDE { return inputs_.length(); }
|
| + virtual HValue* OperandAt(int index) const V8_OVERRIDE {
|
| + return inputs_[index];
|
| + }
|
| HValue* GetRedundantReplacement();
|
| void AddInput(HValue* value);
|
| bool HasRealUses();
|
|
|
| bool IsReceiver() const { return merged_index_ == 0; }
|
| + bool HasMergedIndex() const { return merged_index_ != kInvalidMergedIndex; }
|
|
|
| int merged_index() const { return merged_index_; }
|
|
|
| @@ -3061,10 +3072,10 @@ class HPhi: public HValue {
|
| induction_variable_data_ = InductionVariableData::ExaminePhi(this);
|
| }
|
|
|
| - virtual void PrintTo(StringStream* stream);
|
| + virtual void PrintTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| #ifdef DEBUG
|
| - virtual void Verify();
|
| + virtual void Verify() V8_OVERRIDE;
|
| #endif
|
|
|
| void InitRealUses(int id);
|
| @@ -3101,13 +3112,16 @@ class HPhi: public HValue {
|
| ASSERT(value->IsPhi());
|
| return reinterpret_cast<HPhi*>(value);
|
| }
|
| - virtual Opcode opcode() const { return HValue::kPhi; }
|
| + virtual Opcode opcode() const V8_OVERRIDE { return HValue::kPhi; }
|
|
|
| void SimplifyConstantInputs();
|
|
|
| + // Marker value representing an invalid merge index.
|
| + static const int kInvalidMergedIndex = -1;
|
| +
|
| protected:
|
| - virtual void DeleteFromGraph();
|
| - virtual void InternalSetOperandAt(int index, HValue* value) {
|
| + virtual void DeleteFromGraph() V8_OVERRIDE;
|
| + virtual void InternalSetOperandAt(int index, HValue* value) V8_OVERRIDE {
|
| inputs_[index] = value;
|
| }
|
|
|
| @@ -3121,25 +3135,31 @@ class HPhi: public HValue {
|
| InductionVariableData* induction_variable_data_;
|
|
|
| // TODO(titzer): we can't eliminate the receiver for generating backtraces
|
| - virtual bool IsDeletable() const { return !IsReceiver(); }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return !IsReceiver(); }
|
| };
|
|
|
|
|
| // Common base class for HArgumentsObject and HCapturedObject.
|
| -class HDematerializedObject: public HTemplateInstruction<0> {
|
| +class HDematerializedObject : public HInstruction {
|
| public:
|
| HDematerializedObject(int count, Zone* zone) : values_(count, zone) {}
|
|
|
| - virtual int OperandCount() { return values_.length(); }
|
| - virtual HValue* OperandAt(int index) const { return values_[index]; }
|
| + virtual int OperandCount() V8_FINAL V8_OVERRIDE { return values_.length(); }
|
| + virtual HValue* OperandAt(int index) const V8_FINAL V8_OVERRIDE {
|
| + return values_[index];
|
| + }
|
|
|
| - virtual bool HasEscapingOperandAt(int index) { return false; }
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual bool HasEscapingOperandAt(int index) V8_FINAL V8_OVERRIDE {
|
| + return false;
|
| + }
|
| + virtual Representation RequiredInputRepresentation(
|
| + int index) V8_FINAL V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| protected:
|
| - virtual void InternalSetOperandAt(int index, HValue* value) {
|
| + virtual void InternalSetOperandAt(int index,
|
| + HValue* value) V8_FINAL V8_OVERRIDE {
|
| values_[index] = value;
|
| }
|
|
|
| @@ -3147,11 +3167,11 @@ class HDematerializedObject: public HTemplateInstruction<0> {
|
| ZoneList<HValue*> values_;
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_FINAL V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HArgumentsObject: public HDematerializedObject {
|
| +class HArgumentsObject V8_FINAL : public HDematerializedObject {
|
| public:
|
| static HArgumentsObject* New(Zone* zone, HValue* context, int count) {
|
| return new(zone) HArgumentsObject(count, zone);
|
| @@ -3178,7 +3198,7 @@ class HArgumentsObject: public HDematerializedObject {
|
| };
|
|
|
|
|
| -class HCapturedObject: public HDematerializedObject {
|
| +class HCapturedObject V8_FINAL : public HDematerializedObject {
|
| public:
|
| HCapturedObject(int length, Zone* zone)
|
| : HDematerializedObject(length, zone) {
|
| @@ -3196,7 +3216,7 @@ class HCapturedObject: public HDematerializedObject {
|
| };
|
|
|
|
|
| -class HConstant: public HTemplateInstruction<0> {
|
| +class HConstant V8_FINAL : public HTemplateInstruction<0> {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HConstant, int32_t);
|
| DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation);
|
| @@ -3217,8 +3237,9 @@ class HConstant: public HTemplateInstruction<0> {
|
| }
|
|
|
| bool InstanceOf(Handle<Map> map) {
|
| - return handle_->IsJSObject() &&
|
| - Handle<JSObject>::cast(handle_)->map() == *map;
|
| + Handle<Object> constant_object = handle();
|
| + return constant_object->IsJSObject() &&
|
| + Handle<JSObject>::cast(constant_object)->map() == *map;
|
| }
|
|
|
| bool IsSpecialDouble() const {
|
| @@ -3262,11 +3283,11 @@ class HConstant: public HTemplateInstruction<0> {
|
| return is_cell_;
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| - virtual Representation KnownOptimalRepresentation() {
|
| + virtual Representation KnownOptimalRepresentation() V8_OVERRIDE {
|
| if (HasSmiValue() && kSmiValueSize == 31) return Representation::Smi();
|
| if (HasInteger32Value()) return Representation::Integer32();
|
| if (HasNumberValue()) return Representation::Double();
|
| @@ -3274,8 +3295,8 @@ class HConstant: public HTemplateInstruction<0> {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual bool EmitAtUses();
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual bool EmitAtUses() V8_OVERRIDE;
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
| bool IsInteger() { return handle()->IsSmi(); }
|
| HConstant* CopyToRepresentation(Representation r, Zone* zone) const;
|
| Maybe<HConstant*> CopyToTruncatedInt32(Zone* zone);
|
| @@ -3329,9 +3350,10 @@ class HConstant: public HTemplateInstruction<0> {
|
| return external_reference_value_;
|
| }
|
|
|
| + bool HasBooleanValue() const { return type_.IsBoolean(); }
|
| bool BooleanValue() const { return boolean_value_; }
|
|
|
| - virtual intptr_t Hashcode() {
|
| + virtual intptr_t Hashcode() V8_OVERRIDE {
|
| if (has_int32_value_) {
|
| return static_cast<intptr_t>(int32_value_);
|
| } else if (has_double_value_) {
|
| @@ -3344,7 +3366,7 @@ class HConstant: public HTemplateInstruction<0> {
|
| }
|
| }
|
|
|
| - virtual void FinalizeUniqueValueId() {
|
| + virtual void FinalizeUniqueValueId() V8_OVERRIDE {
|
| if (!has_double_value_ && !has_external_reference_value_) {
|
| ASSERT(!handle_.is_null());
|
| unique_id_ = UniqueValueId(handle_);
|
| @@ -3357,15 +3379,15 @@ class HConstant: public HTemplateInstruction<0> {
|
| }
|
|
|
| #ifdef DEBUG
|
| - virtual void Verify() { }
|
| + virtual void Verify() V8_OVERRIDE { }
|
| #endif
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(Constant)
|
|
|
| protected:
|
| - virtual Range* InferRange(Zone* zone);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
|
|
| - virtual bool DataEquals(HValue* other) {
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| HConstant* other_constant = HConstant::cast(other);
|
| if (has_int32_value_) {
|
| return other_constant->has_int32_value_ &&
|
| @@ -3408,7 +3430,7 @@ class HConstant: public HTemplateInstruction<0> {
|
|
|
| void Initialize(Representation r);
|
|
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
|
|
| // If this is a numerical constant, handle_ either points to to the
|
| // HeapObject the constant originated from or is null. If the
|
| @@ -3436,7 +3458,7 @@ class HConstant: public HTemplateInstruction<0> {
|
| };
|
|
|
|
|
| -class HBinaryOperation: public HTemplateInstruction<3> {
|
| +class HBinaryOperation : public HTemplateInstruction<3> {
|
| public:
|
| HBinaryOperation(HValue* context, HValue* left, HValue* right,
|
| HType type = HType::Tagged())
|
| @@ -3486,29 +3508,30 @@ class HBinaryOperation: public HTemplateInstruction<3> {
|
| observed_output_representation_ = observed;
|
| }
|
|
|
| - virtual Representation observed_input_representation(int index) {
|
| + virtual Representation observed_input_representation(int index) V8_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) {
|
| + const char* reason) V8_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);
|
| - virtual Representation RepresentationFromInputs();
|
| + virtual void InferRepresentation(
|
| + HInferRepresentationPhase* h_infer) V8_OVERRIDE;
|
| + virtual Representation RepresentationFromInputs() V8_OVERRIDE;
|
| Representation RepresentationFromOutput();
|
| - virtual void AssumeRepresentation(Representation r);
|
| + virtual void AssumeRepresentation(Representation r) V8_OVERRIDE;
|
|
|
| virtual bool IsCommutative() const { return false; }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| if (index == 0) return Representation::Tagged();
|
| return representation();
|
| }
|
| @@ -3523,20 +3546,20 @@ class HBinaryOperation: public HTemplateInstruction<3> {
|
| };
|
|
|
|
|
| -class HWrapReceiver: public HTemplateInstruction<2> {
|
| +class HWrapReceiver V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P2(HWrapReceiver, HValue*, HValue*);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| HValue* receiver() { return OperandAt(0); }
|
| HValue* function() { return OperandAt(1); }
|
|
|
| - virtual HValue* Canonicalize();
|
| + virtual HValue* Canonicalize() V8_OVERRIDE;
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(WrapReceiver)
|
|
|
| @@ -3549,7 +3572,7 @@ class HWrapReceiver: public HTemplateInstruction<2> {
|
| };
|
|
|
|
|
| -class HApplyArguments: public HTemplateInstruction<4> {
|
| +class HApplyArguments V8_FINAL : public HTemplateInstruction<4> {
|
| public:
|
| HApplyArguments(HValue* function,
|
| HValue* receiver,
|
| @@ -3563,7 +3586,7 @@ class HApplyArguments: public HTemplateInstruction<4> {
|
| SetAllSideEffects();
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| // The length is untagged, all other inputs are tagged.
|
| return (index == 2)
|
| ? Representation::Integer32()
|
| @@ -3579,20 +3602,20 @@ class HApplyArguments: public HTemplateInstruction<4> {
|
| };
|
|
|
|
|
| -class HArgumentsElements: public HTemplateInstruction<0> {
|
| +class HArgumentsElements V8_FINAL : public HTemplateInstruction<0> {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsElements, bool);
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements)
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| bool from_inlined() const { return from_inlined_; }
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| explicit HArgumentsElements(bool from_inlined) : from_inlined_(from_inlined) {
|
| @@ -3602,24 +3625,24 @@ class HArgumentsElements: public HTemplateInstruction<0> {
|
| SetFlag(kUseGVN);
|
| }
|
|
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
|
|
| bool from_inlined_;
|
| };
|
|
|
|
|
| -class HArgumentsLength: public HUnaryOperation {
|
| +class HArgumentsLength V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsLength, HValue*);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| explicit HArgumentsLength(HValue* value) : HUnaryOperation(value) {
|
| @@ -3627,11 +3650,11 @@ class HArgumentsLength: public HUnaryOperation {
|
| SetFlag(kUseGVN);
|
| }
|
|
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HAccessArgumentsAt: public HTemplateInstruction<3> {
|
| +class HAccessArgumentsAt V8_FINAL : public HTemplateInstruction<3> {
|
| public:
|
| HAccessArgumentsAt(HValue* arguments, HValue* length, HValue* index) {
|
| set_representation(Representation::Tagged());
|
| @@ -3641,9 +3664,9 @@ class HAccessArgumentsAt: public HTemplateInstruction<3> {
|
| SetOperandAt(2, index);
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| // The arguments elements is considered tagged.
|
| return index == 0
|
| ? Representation::Tagged()
|
| @@ -3656,14 +3679,14 @@ class HAccessArgumentsAt: public HTemplateInstruction<3> {
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt)
|
|
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| class HBoundsCheckBaseIndexInformation;
|
|
|
|
|
| -class HBoundsCheck: public HTemplateInstruction<2> {
|
| +class HBoundsCheck V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P2(HBoundsCheck, HValue*, HValue*);
|
|
|
| @@ -3692,27 +3715,30 @@ class HBoundsCheck: public HTemplateInstruction<2> {
|
| }
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int arg_index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return representation();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| - virtual void InferRepresentation(HInferRepresentationPhase* h_infer);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
| + virtual void InferRepresentation(
|
| + HInferRepresentationPhase* h_infer) V8_OVERRIDE;
|
|
|
| HValue* index() { return OperandAt(0); }
|
| HValue* length() { return OperandAt(1); }
|
| bool allow_equality() { return allow_equality_; }
|
| void set_allow_equality(bool v) { allow_equality_ = v; }
|
|
|
| - virtual int RedefinedOperandIndex() { return 0; }
|
| - virtual bool IsPurelyInformativeDefinition() { return skip_check(); }
|
| + virtual int RedefinedOperandIndex() V8_OVERRIDE { return 0; }
|
| + virtual bool IsPurelyInformativeDefinition() V8_OVERRIDE {
|
| + return skip_check();
|
| + }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(BoundsCheck)
|
|
|
| protected:
|
| friend class HBoundsCheckBaseIndexInformation;
|
|
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
| bool skip_check_;
|
| HValue* base_;
|
| int offset_;
|
| @@ -3734,13 +3760,14 @@ class HBoundsCheck: public HTemplateInstruction<2> {
|
| SetFlag(kUseGVN);
|
| }
|
|
|
| - virtual bool IsDeletable() const {
|
| + virtual bool IsDeletable() const V8_OVERRIDE {
|
| return skip_check() && !FLAG_debug_code;
|
| }
|
| };
|
|
|
|
|
| -class HBoundsCheckBaseIndexInformation: public HTemplateInstruction<2> {
|
| +class HBoundsCheckBaseIndexInformation V8_FINAL
|
| + : public HTemplateInstruction<2> {
|
| public:
|
| explicit HBoundsCheckBaseIndexInformation(HBoundsCheck* check) {
|
| DecompositionResult decomposition;
|
| @@ -3757,18 +3784,18 @@ class HBoundsCheckBaseIndexInformation: public HTemplateInstruction<2> {
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(BoundsCheckBaseIndexInformation)
|
|
|
| - virtual Representation RequiredInputRepresentation(int arg_index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return representation();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual int RedefinedOperandIndex() { return 0; }
|
| - virtual bool IsPurelyInformativeDefinition() { return true; }
|
| + virtual int RedefinedOperandIndex() V8_OVERRIDE { return 0; }
|
| + virtual bool IsPurelyInformativeDefinition() V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HBitwiseBinaryOperation: public HBinaryOperation {
|
| +class HBitwiseBinaryOperation : public HBinaryOperation {
|
| public:
|
| HBitwiseBinaryOperation(HValue* context, HValue* left, HValue* right,
|
| HType type = HType::Tagged())
|
| @@ -3779,7 +3806,7 @@ class HBitwiseBinaryOperation: public HBinaryOperation {
|
| SetAllSideEffects();
|
| }
|
|
|
| - virtual void RepresentationChanged(Representation to) {
|
| + virtual void RepresentationChanged(Representation to) V8_OVERRIDE {
|
| if (!to.IsTagged()) {
|
| ASSERT(to.IsSmiOrInteger32());
|
| ClearAllSideEffects();
|
| @@ -3792,13 +3819,13 @@ class HBitwiseBinaryOperation: public HBinaryOperation {
|
|
|
| virtual void UpdateRepresentation(Representation new_rep,
|
| HInferRepresentationPhase* h_infer,
|
| - const char* reason) {
|
| + const char* reason) V8_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) {
|
| + virtual Representation observed_input_representation(int index) V8_OVERRIDE {
|
| Representation r = HBinaryOperation::observed_input_representation(index);
|
| if (r.IsDouble()) return Representation::Integer32();
|
| return r;
|
| @@ -3812,11 +3839,11 @@ class HBitwiseBinaryOperation: public HBinaryOperation {
|
| DECLARE_ABSTRACT_INSTRUCTION(BitwiseBinaryOperation)
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HMathFloorOfDiv: public HBinaryOperation {
|
| +class HMathFloorOfDiv V8_FINAL : public HBinaryOperation {
|
| public:
|
| static HMathFloorOfDiv* New(Zone* zone,
|
| HValue* context,
|
| @@ -3825,16 +3852,13 @@ class HMathFloorOfDiv: public HBinaryOperation {
|
| return new(zone) HMathFloorOfDiv(context, left, right);
|
| }
|
|
|
| - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
| -
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| - return Representation::Integer32();
|
| - }
|
| + virtual HValue* EnsureAndPropagateNotMinusZero(
|
| + BitVector* visited) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| HMathFloorOfDiv(HValue* context, HValue* left, HValue* right)
|
| @@ -3848,11 +3872,11 @@ class HMathFloorOfDiv: public HBinaryOperation {
|
| SetFlag(kAllowUndefinedAsNaN);
|
| }
|
|
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HArithmeticBinaryOperation: public HBinaryOperation {
|
| +class HArithmeticBinaryOperation : public HBinaryOperation {
|
| public:
|
| HArithmeticBinaryOperation(HValue* context, HValue* left, HValue* right)
|
| : HBinaryOperation(context, left, right, HType::TaggedNumber()) {
|
| @@ -3861,7 +3885,7 @@ class HArithmeticBinaryOperation: public HBinaryOperation {
|
| SetFlag(kAllowUndefinedAsNaN);
|
| }
|
|
|
| - virtual void RepresentationChanged(Representation to) {
|
| + virtual void RepresentationChanged(Representation to) V8_OVERRIDE {
|
| if (to.IsTagged()) {
|
| SetAllSideEffects();
|
| ClearFlag(kUseGVN);
|
| @@ -3874,11 +3898,11 @@ class HArithmeticBinaryOperation: public HBinaryOperation {
|
| DECLARE_ABSTRACT_INSTRUCTION(ArithmeticBinaryOperation)
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HCompareGeneric: public HBinaryOperation {
|
| +class HCompareGeneric V8_FINAL : public HBinaryOperation {
|
| public:
|
| HCompareGeneric(HValue* context,
|
| HValue* left,
|
| @@ -3891,14 +3915,14 @@ class HCompareGeneric: public HBinaryOperation {
|
| SetAllSideEffects();
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return index == 0
|
| ? Representation::Tagged()
|
| : representation();
|
| }
|
|
|
| Token::Value token() const { return token_; }
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(CompareGeneric)
|
|
|
| @@ -3907,7 +3931,7 @@ class HCompareGeneric: public HBinaryOperation {
|
| };
|
|
|
|
|
| -class HCompareNumericAndBranch: public HTemplateControlInstruction<2, 2> {
|
| +class HCompareNumericAndBranch : public HTemplateControlInstruction<2, 2> {
|
| public:
|
| HCompareNumericAndBranch(HValue* left, HValue* right, Token::Value token)
|
| : token_(token) {
|
| @@ -3927,15 +3951,16 @@ class HCompareNumericAndBranch: public HTemplateControlInstruction<2, 2> {
|
| observed_input_representation_[1] = right;
|
| }
|
|
|
| - virtual void InferRepresentation(HInferRepresentationPhase* h_infer);
|
| + virtual void InferRepresentation(
|
| + HInferRepresentationPhase* h_infer) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return representation();
|
| }
|
| - virtual Representation observed_input_representation(int index) {
|
| + virtual Representation observed_input_representation(int index) V8_OVERRIDE {
|
| return observed_input_representation_[index];
|
| }
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch)
|
|
|
| @@ -3945,7 +3970,35 @@ class HCompareNumericAndBranch: public HTemplateControlInstruction<2, 2> {
|
| };
|
|
|
|
|
| -class HCompareObjectEqAndBranch: public HTemplateControlInstruction<2, 2> {
|
| +class HCompareHoleAndBranch V8_FINAL
|
| + : public HTemplateControlInstruction<2, 1> {
|
| + public:
|
| + // TODO(danno): make this private when the IfBuilder properly constructs
|
| + // control flow instructions.
|
| + explicit HCompareHoleAndBranch(HValue* object) {
|
| + SetFlag(kFlexibleRepresentation);
|
| + SetFlag(kAllowUndefinedAsNaN);
|
| + SetOperandAt(0, object);
|
| + }
|
| +
|
| + DECLARE_INSTRUCTION_FACTORY_P1(HCompareHoleAndBranch, HValue*);
|
| +
|
| + HValue* object() { return OperandAt(0); }
|
| +
|
| + virtual void InferRepresentation(
|
| + HInferRepresentationPhase* h_infer) V8_OVERRIDE;
|
| +
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| + return representation();
|
| + }
|
| +
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(CompareHoleAndBranch)
|
| +};
|
| +
|
| +
|
| +class HCompareObjectEqAndBranch : public HTemplateControlInstruction<2, 2> {
|
| public:
|
| // TODO(danno): make this private when the IfBuilder properly constructs
|
| // control flow instructions.
|
| @@ -3960,13 +4013,13 @@ class HCompareObjectEqAndBranch: public HTemplateControlInstruction<2, 2> {
|
| HValue* left() { return OperandAt(0); }
|
| HValue* right() { return OperandAt(1); }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual Representation observed_input_representation(int index) {
|
| + virtual Representation observed_input_representation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -3974,24 +4027,24 @@ class HCompareObjectEqAndBranch: public HTemplateControlInstruction<2, 2> {
|
| };
|
|
|
|
|
| -class HIsObjectAndBranch: public HUnaryControlInstruction {
|
| +class HIsObjectAndBranch V8_FINAL : public HUnaryControlInstruction {
|
| public:
|
| explicit HIsObjectAndBranch(HValue* value)
|
| : HUnaryControlInstruction(value, NULL, NULL) { }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch)
|
| };
|
|
|
| -class HIsStringAndBranch: public HUnaryControlInstruction {
|
| +class HIsStringAndBranch V8_FINAL : public HUnaryControlInstruction {
|
| public:
|
| explicit HIsStringAndBranch(HValue* value)
|
| : HUnaryControlInstruction(value, NULL, NULL) { }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -3999,28 +4052,28 @@ class HIsStringAndBranch: public HUnaryControlInstruction {
|
| };
|
|
|
|
|
| -class HIsSmiAndBranch: public HUnaryControlInstruction {
|
| +class HIsSmiAndBranch V8_FINAL : public HUnaryControlInstruction {
|
| public:
|
| explicit HIsSmiAndBranch(HValue* value)
|
| : HUnaryControlInstruction(value, NULL, NULL) { }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch)
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HIsUndetectableAndBranch: public HUnaryControlInstruction {
|
| +class HIsUndetectableAndBranch V8_FINAL : public HUnaryControlInstruction {
|
| public:
|
| explicit HIsUndetectableAndBranch(HValue* value)
|
| : HUnaryControlInstruction(value, NULL, NULL) { }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -4028,7 +4081,7 @@ class HIsUndetectableAndBranch: public HUnaryControlInstruction {
|
| };
|
|
|
|
|
| -class HStringCompareAndBranch: public HTemplateControlInstruction<2, 3> {
|
| +class HStringCompareAndBranch : public HTemplateControlInstruction<2, 3> {
|
| public:
|
| HStringCompareAndBranch(HValue* context,
|
| HValue* left,
|
| @@ -4040,6 +4093,7 @@ class HStringCompareAndBranch: public HTemplateControlInstruction<2, 3> {
|
| SetOperandAt(1, left);
|
| SetOperandAt(2, right);
|
| set_representation(Representation::Tagged());
|
| + SetGVNFlag(kChangesNewSpacePromotion);
|
| }
|
|
|
| HValue* context() { return OperandAt(0); }
|
| @@ -4047,9 +4101,9 @@ class HStringCompareAndBranch: public HTemplateControlInstruction<2, 3> {
|
| HValue* right() { return OperandAt(2); }
|
| Token::Value token() const { return token_; }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -4064,9 +4118,9 @@ class HStringCompareAndBranch: public HTemplateControlInstruction<2, 3> {
|
| };
|
|
|
|
|
| -class HIsConstructCallAndBranch: public HTemplateControlInstruction<2, 0> {
|
| +class HIsConstructCallAndBranch : public HTemplateControlInstruction<2, 0> {
|
| public:
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| @@ -4074,7 +4128,7 @@ class HIsConstructCallAndBranch: public HTemplateControlInstruction<2, 0> {
|
| };
|
|
|
|
|
| -class HHasInstanceTypeAndBranch: public HUnaryControlInstruction {
|
| +class HHasInstanceTypeAndBranch V8_FINAL : public HUnaryControlInstruction {
|
| public:
|
| HHasInstanceTypeAndBranch(HValue* value, InstanceType type)
|
| : HUnaryControlInstruction(value, NULL, NULL), from_(type), to_(type) { }
|
| @@ -4086,9 +4140,9 @@ class HHasInstanceTypeAndBranch: public HUnaryControlInstruction {
|
| InstanceType from() { return from_; }
|
| InstanceType to() { return to_; }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -4100,12 +4154,12 @@ class HHasInstanceTypeAndBranch: public HUnaryControlInstruction {
|
| };
|
|
|
|
|
| -class HHasCachedArrayIndexAndBranch: public HUnaryControlInstruction {
|
| +class HHasCachedArrayIndexAndBranch V8_FINAL : public HUnaryControlInstruction {
|
| public:
|
| explicit HHasCachedArrayIndexAndBranch(HValue* value)
|
| : HUnaryControlInstruction(value, NULL, NULL) { }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -4113,28 +4167,28 @@ class HHasCachedArrayIndexAndBranch: public HUnaryControlInstruction {
|
| };
|
|
|
|
|
| -class HGetCachedArrayIndex: public HUnaryOperation {
|
| +class HGetCachedArrayIndex V8_FINAL : public HUnaryOperation {
|
| public:
|
| explicit HGetCachedArrayIndex(HValue* value) : HUnaryOperation(value) {
|
| set_representation(Representation::Tagged());
|
| SetFlag(kUseGVN);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HClassOfTestAndBranch: public HUnaryControlInstruction {
|
| +class HClassOfTestAndBranch V8_FINAL : public HUnaryControlInstruction {
|
| public:
|
| HClassOfTestAndBranch(HValue* value, Handle<String> class_name)
|
| : HUnaryControlInstruction(value, NULL, NULL),
|
| @@ -4142,11 +4196,11 @@ class HClassOfTestAndBranch: public HUnaryControlInstruction {
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch)
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| Handle<String> class_name() const { return class_name_; }
|
|
|
| @@ -4155,18 +4209,18 @@ class HClassOfTestAndBranch: public HUnaryControlInstruction {
|
| };
|
|
|
|
|
| -class HTypeofIsAndBranch: public HUnaryControlInstruction {
|
| +class HTypeofIsAndBranch V8_FINAL : public HUnaryControlInstruction {
|
| public:
|
| HTypeofIsAndBranch(HValue* value, Handle<String> type_literal)
|
| : HUnaryControlInstruction(value, NULL, NULL),
|
| type_literal_(type_literal) { }
|
|
|
| Handle<String> type_literal() { return type_literal_; }
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch)
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -4175,7 +4229,7 @@ class HTypeofIsAndBranch: public HUnaryControlInstruction {
|
| };
|
|
|
|
|
| -class HInstanceOf: public HBinaryOperation {
|
| +class HInstanceOf V8_FINAL : public HBinaryOperation {
|
| public:
|
| HInstanceOf(HValue* context, HValue* left, HValue* right)
|
| : HBinaryOperation(context, left, right, HType::Boolean()) {
|
| @@ -4183,17 +4237,17 @@ class HInstanceOf: public HBinaryOperation {
|
| SetAllSideEffects();
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(InstanceOf)
|
| };
|
|
|
|
|
| -class HInstanceOfKnownGlobal: public HTemplateInstruction<2> {
|
| +class HInstanceOfKnownGlobal V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| HInstanceOfKnownGlobal(HValue* context,
|
| HValue* left,
|
| @@ -4209,7 +4263,7 @@ class HInstanceOfKnownGlobal: public HTemplateInstruction<2> {
|
| HValue* left() { return OperandAt(1); }
|
| Handle<JSFunction> function() { return function_; }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -4223,7 +4277,7 @@ class HInstanceOfKnownGlobal: public HTemplateInstruction<2> {
|
| // TODO(mstarzinger): This instruction should be modeled as a load of the map
|
| // field followed by a load of the instance size field once HLoadNamedField is
|
| // flexible enough to accommodate byte-field loads.
|
| -class HInstanceSize: public HTemplateInstruction<1> {
|
| +class HInstanceSize V8_FINAL : public HTemplateInstruction<1> {
|
| public:
|
| explicit HInstanceSize(HValue* object) {
|
| SetOperandAt(0, object);
|
| @@ -4232,7 +4286,7 @@ class HInstanceSize: public HTemplateInstruction<1> {
|
|
|
| HValue* object() { return OperandAt(0); }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -4240,7 +4294,7 @@ class HInstanceSize: public HTemplateInstruction<1> {
|
| };
|
|
|
|
|
| -class HPower: public HTemplateInstruction<2> {
|
| +class HPower V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| static HInstruction* New(Zone* zone,
|
| HValue* context,
|
| @@ -4250,19 +4304,19 @@ class HPower: public HTemplateInstruction<2> {
|
| HValue* left() { return OperandAt(0); }
|
| HValue* right() const { return OperandAt(1); }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return index == 0
|
| ? Representation::Double()
|
| : Representation::None();
|
| }
|
| - virtual Representation observed_input_representation(int index) {
|
| + virtual Representation observed_input_representation(int index) V8_OVERRIDE {
|
| return RequiredInputRepresentation(index);
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(Power)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| HPower(HValue* left, HValue* right) {
|
| @@ -4273,13 +4327,13 @@ class HPower: public HTemplateInstruction<2> {
|
| SetGVNFlag(kChangesNewSpacePromotion);
|
| }
|
|
|
| - virtual bool IsDeletable() const {
|
| + virtual bool IsDeletable() const V8_OVERRIDE {
|
| return !right()->representation().IsTagged();
|
| }
|
| };
|
|
|
|
|
| -class HRandom: public HTemplateInstruction<1> {
|
| +class HRandom V8_FINAL : public HTemplateInstruction<1> {
|
| public:
|
| explicit HRandom(HValue* global_object) {
|
| SetOperandAt(0, global_object);
|
| @@ -4288,18 +4342,18 @@ class HRandom: public HTemplateInstruction<1> {
|
|
|
| HValue* global_object() { return OperandAt(0); }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(Random)
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HAdd: public HArithmeticBinaryOperation {
|
| +class HAdd V8_FINAL : public HArithmeticBinaryOperation {
|
| public:
|
| static HInstruction* New(Zone* zone,
|
| HValue* context,
|
| @@ -4308,15 +4362,16 @@ class HAdd: public HArithmeticBinaryOperation {
|
|
|
| // Add is only commutative if two integer values are added and not if two
|
| // tagged values are added (because it might be a String concatenation).
|
| - virtual bool IsCommutative() const {
|
| + virtual bool IsCommutative() const V8_OVERRIDE {
|
| return !representation().IsTagged();
|
| }
|
|
|
| - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
| + virtual HValue* EnsureAndPropagateNotMinusZero(
|
| + BitVector* visited) V8_OVERRIDE;
|
|
|
| - virtual HValue* Canonicalize();
|
| + virtual HValue* Canonicalize() V8_OVERRIDE;
|
|
|
| - virtual bool TryDecompose(DecompositionResult* decomposition) {
|
| + virtual bool TryDecompose(DecompositionResult* decomposition) V8_OVERRIDE {
|
| if (left()->IsInteger32Constant()) {
|
| decomposition->Apply(right(), left()->GetInteger32Constant());
|
| return true;
|
| @@ -4328,12 +4383,17 @@ class HAdd: public HArithmeticBinaryOperation {
|
| }
|
| }
|
|
|
| + virtual void RepresentationChanged(Representation to) V8_OVERRIDE {
|
| + if (to.IsTagged()) ClearFlag(kAllowUndefinedAsNaN);
|
| + HArithmeticBinaryOperation::RepresentationChanged(to);
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(Add)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| - virtual Range* InferRange(Zone* zone);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
|
|
| private:
|
| HAdd(HValue* context, HValue* left, HValue* right)
|
| @@ -4343,18 +4403,19 @@ class HAdd: public HArithmeticBinaryOperation {
|
| };
|
|
|
|
|
| -class HSub: public HArithmeticBinaryOperation {
|
| +class HSub V8_FINAL : public HArithmeticBinaryOperation {
|
| public:
|
| static HInstruction* New(Zone* zone,
|
| HValue* context,
|
| HValue* left,
|
| HValue* right);
|
|
|
| - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
| + virtual HValue* EnsureAndPropagateNotMinusZero(
|
| + BitVector* visited) V8_OVERRIDE;
|
|
|
| - virtual HValue* Canonicalize();
|
| + virtual HValue* Canonicalize() V8_OVERRIDE;
|
|
|
| - virtual bool TryDecompose(DecompositionResult* decomposition) {
|
| + virtual bool TryDecompose(DecompositionResult* decomposition) V8_OVERRIDE {
|
| if (right()->IsInteger32Constant()) {
|
| decomposition->Apply(left(), -right()->GetInteger32Constant());
|
| return true;
|
| @@ -4366,9 +4427,9 @@ class HSub: public HArithmeticBinaryOperation {
|
| DECLARE_CONCRETE_INSTRUCTION(Sub)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| - virtual Range* InferRange(Zone* zone);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
|
|
| private:
|
| HSub(HValue* context, HValue* left, HValue* right)
|
| @@ -4378,7 +4439,7 @@ class HSub: public HArithmeticBinaryOperation {
|
| };
|
|
|
|
|
| -class HMul: public HArithmeticBinaryOperation {
|
| +class HMul V8_FINAL : public HArithmeticBinaryOperation {
|
| public:
|
| static HInstruction* New(Zone* zone,
|
| HValue* context,
|
| @@ -4396,18 +4457,19 @@ class HMul: public HArithmeticBinaryOperation {
|
| return mul;
|
| }
|
|
|
| - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
| + virtual HValue* EnsureAndPropagateNotMinusZero(
|
| + BitVector* visited) V8_OVERRIDE;
|
|
|
| - virtual HValue* Canonicalize();
|
| + virtual HValue* Canonicalize() V8_OVERRIDE;
|
|
|
| // Only commutative if it is certain that not two objects are multiplicated.
|
| - virtual bool IsCommutative() const {
|
| + virtual bool IsCommutative() const V8_OVERRIDE {
|
| return !representation().IsTagged();
|
| }
|
|
|
| virtual void UpdateRepresentation(Representation new_rep,
|
| HInferRepresentationPhase* h_infer,
|
| - const char* reason) {
|
| + const char* reason) V8_OVERRIDE {
|
| if (new_rep.IsSmi()) new_rep = Representation::Integer32();
|
| HArithmeticBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason);
|
| }
|
| @@ -4415,9 +4477,9 @@ class HMul: public HArithmeticBinaryOperation {
|
| DECLARE_CONCRETE_INSTRUCTION(Mul)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| - virtual Range* InferRange(Zone* zone);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
|
|
| private:
|
| HMul(HValue* context, HValue* left, HValue* right)
|
| @@ -4427,7 +4489,7 @@ class HMul: public HArithmeticBinaryOperation {
|
| };
|
|
|
|
|
| -class HMod: public HArithmeticBinaryOperation {
|
| +class HMod V8_FINAL : public HArithmeticBinaryOperation {
|
| public:
|
| static HInstruction* New(Zone* zone,
|
| HValue* context,
|
| @@ -4447,13 +4509,14 @@ class HMod: public HArithmeticBinaryOperation {
|
| return false;
|
| }
|
|
|
| - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
| + virtual HValue* EnsureAndPropagateNotMinusZero(
|
| + BitVector* visited) V8_OVERRIDE;
|
|
|
| - virtual HValue* Canonicalize();
|
| + virtual HValue* Canonicalize() V8_OVERRIDE;
|
|
|
| virtual void UpdateRepresentation(Representation new_rep,
|
| HInferRepresentationPhase* h_infer,
|
| - const char* reason) {
|
| + const char* reason) V8_OVERRIDE {
|
| if (new_rep.IsSmi()) new_rep = Representation::Integer32();
|
| HArithmeticBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason);
|
| }
|
| @@ -4461,9 +4524,9 @@ class HMod: public HArithmeticBinaryOperation {
|
| DECLARE_CONCRETE_INSTRUCTION(Mod)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| - virtual Range* InferRange(Zone* zone);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
|
|
| private:
|
| HMod(HValue* context,
|
| @@ -4480,7 +4543,7 @@ class HMod: public HArithmeticBinaryOperation {
|
| };
|
|
|
|
|
| -class HDiv: public HArithmeticBinaryOperation {
|
| +class HDiv V8_FINAL : public HArithmeticBinaryOperation {
|
| public:
|
| static HInstruction* New(Zone* zone,
|
| HValue* context,
|
| @@ -4496,13 +4559,14 @@ class HDiv: public HArithmeticBinaryOperation {
|
| return false;
|
| }
|
|
|
| - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
| + virtual HValue* EnsureAndPropagateNotMinusZero(
|
| + BitVector* visited) V8_OVERRIDE;
|
|
|
| - virtual HValue* Canonicalize();
|
| + virtual HValue* Canonicalize() V8_OVERRIDE;
|
|
|
| virtual void UpdateRepresentation(Representation new_rep,
|
| HInferRepresentationPhase* h_infer,
|
| - const char* reason) {
|
| + const char* reason) V8_OVERRIDE {
|
| if (new_rep.IsSmi()) new_rep = Representation::Integer32();
|
| HArithmeticBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason);
|
| }
|
| @@ -4510,9 +4574,9 @@ class HDiv: public HArithmeticBinaryOperation {
|
| DECLARE_CONCRETE_INSTRUCTION(Div)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| - virtual Range* InferRange(Zone* zone);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
|
|
| private:
|
| HDiv(HValue* context, HValue* left, HValue* right)
|
| @@ -4523,7 +4587,7 @@ class HDiv: public HArithmeticBinaryOperation {
|
| };
|
|
|
|
|
| -class HMathMinMax: public HArithmeticBinaryOperation {
|
| +class HMathMinMax V8_FINAL : public HArithmeticBinaryOperation {
|
| public:
|
| enum Operation { kMathMin, kMathMax };
|
|
|
| @@ -4533,18 +4597,14 @@ class HMathMinMax: public HArithmeticBinaryOperation {
|
| HValue* right,
|
| Operation op);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| - return index == 0 ? Representation::Tagged()
|
| - : representation();
|
| - }
|
| -
|
| - virtual Representation observed_input_representation(int index) {
|
| + virtual Representation observed_input_representation(int index) V8_OVERRIDE {
|
| return RequiredInputRepresentation(index);
|
| }
|
|
|
| - virtual void InferRepresentation(HInferRepresentationPhase* h_infer);
|
| + virtual void InferRepresentation(
|
| + HInferRepresentationPhase* h_infer) V8_OVERRIDE;
|
|
|
| - virtual Representation RepresentationFromInputs() {
|
| + virtual Representation RepresentationFromInputs() V8_OVERRIDE {
|
| Representation left_rep = left()->representation();
|
| Representation right_rep = right()->representation();
|
| Representation result = Representation::Smi();
|
| @@ -4554,19 +4614,19 @@ class HMathMinMax: public HArithmeticBinaryOperation {
|
| return result;
|
| }
|
|
|
| - virtual bool IsCommutative() const { return true; }
|
| + virtual bool IsCommutative() const V8_OVERRIDE { return true; }
|
|
|
| Operation operation() { return operation_; }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(MathMinMax)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) {
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| return other->IsMathMinMax() &&
|
| HMathMinMax::cast(other)->operation_ == operation_;
|
| }
|
|
|
| - virtual Range* InferRange(Zone* zone);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
|
|
| private:
|
| HMathMinMax(HValue* context, HValue* left, HValue* right, Operation op)
|
| @@ -4577,7 +4637,7 @@ class HMathMinMax: public HArithmeticBinaryOperation {
|
| };
|
|
|
|
|
| -class HBitwise: public HBitwiseBinaryOperation {
|
| +class HBitwise V8_FINAL : public HBitwiseBinaryOperation {
|
| public:
|
| static HInstruction* New(Zone* zone,
|
| HValue* context,
|
| @@ -4587,20 +4647,20 @@ class HBitwise: public HBitwiseBinaryOperation {
|
|
|
| Token::Value op() const { return op_; }
|
|
|
| - virtual bool IsCommutative() const { return true; }
|
| + virtual bool IsCommutative() const V8_OVERRIDE { return true; }
|
|
|
| - virtual HValue* Canonicalize();
|
| + virtual HValue* Canonicalize() V8_OVERRIDE;
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(Bitwise)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) {
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| return op() == HBitwise::cast(other)->op();
|
| }
|
|
|
| - virtual Range* InferRange(Zone* zone);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
|
|
| private:
|
| HBitwise(HValue* context,
|
| @@ -4637,18 +4697,18 @@ class HBitwise: public HBitwiseBinaryOperation {
|
| };
|
|
|
|
|
| -class HShl: public HBitwiseBinaryOperation {
|
| +class HShl V8_FINAL : public HBitwiseBinaryOperation {
|
| public:
|
| static HInstruction* New(Zone* zone,
|
| HValue* context,
|
| HValue* left,
|
| HValue* right);
|
|
|
| - virtual Range* InferRange(Zone* zone);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
|
|
| virtual void UpdateRepresentation(Representation new_rep,
|
| HInferRepresentationPhase* h_infer,
|
| - const char* reason) {
|
| + const char* reason) V8_OVERRIDE {
|
| if (new_rep.IsSmi() &&
|
| !(right()->IsInteger32Constant() &&
|
| right()->GetInteger32Constant() >= 0)) {
|
| @@ -4660,7 +4720,7 @@ class HShl: public HBitwiseBinaryOperation {
|
| DECLARE_CONCRETE_INSTRUCTION(Shl)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| HShl(HValue* context, HValue* left, HValue* right)
|
| @@ -4668,14 +4728,14 @@ class HShl: public HBitwiseBinaryOperation {
|
| };
|
|
|
|
|
| -class HShr: public HBitwiseBinaryOperation {
|
| +class HShr V8_FINAL : public HBitwiseBinaryOperation {
|
| public:
|
| static HInstruction* New(Zone* zone,
|
| HValue* context,
|
| HValue* left,
|
| HValue* right);
|
|
|
| - virtual bool TryDecompose(DecompositionResult* decomposition) {
|
| + virtual bool TryDecompose(DecompositionResult* decomposition) V8_OVERRIDE {
|
| if (right()->IsInteger32Constant()) {
|
| if (decomposition->Apply(left(), 0, right()->GetInteger32Constant())) {
|
| // This is intended to look for HAdd and HSub, to handle compounds
|
| @@ -4687,11 +4747,11 @@ class HShr: public HBitwiseBinaryOperation {
|
| return false;
|
| }
|
|
|
| - virtual Range* InferRange(Zone* zone);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
|
|
| virtual void UpdateRepresentation(Representation new_rep,
|
| HInferRepresentationPhase* h_infer,
|
| - const char* reason) {
|
| + const char* reason) V8_OVERRIDE {
|
| if (new_rep.IsSmi()) new_rep = Representation::Integer32();
|
| HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason);
|
| }
|
| @@ -4699,7 +4759,7 @@ class HShr: public HBitwiseBinaryOperation {
|
| DECLARE_CONCRETE_INSTRUCTION(Shr)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| HShr(HValue* context, HValue* left, HValue* right)
|
| @@ -4707,14 +4767,14 @@ class HShr: public HBitwiseBinaryOperation {
|
| };
|
|
|
|
|
| -class HSar: public HBitwiseBinaryOperation {
|
| +class HSar V8_FINAL : public HBitwiseBinaryOperation {
|
| public:
|
| static HInstruction* New(Zone* zone,
|
| HValue* context,
|
| HValue* left,
|
| HValue* right);
|
|
|
| - virtual bool TryDecompose(DecompositionResult* decomposition) {
|
| + virtual bool TryDecompose(DecompositionResult* decomposition) V8_OVERRIDE {
|
| if (right()->IsInteger32Constant()) {
|
| if (decomposition->Apply(left(), 0, right()->GetInteger32Constant())) {
|
| // This is intended to look for HAdd and HSub, to handle compounds
|
| @@ -4726,11 +4786,11 @@ class HSar: public HBitwiseBinaryOperation {
|
| return false;
|
| }
|
|
|
| - virtual Range* InferRange(Zone* zone);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
|
|
| virtual void UpdateRepresentation(Representation new_rep,
|
| HInferRepresentationPhase* h_infer,
|
| - const char* reason) {
|
| + const char* reason) V8_OVERRIDE {
|
| if (new_rep.IsSmi()) new_rep = Representation::Integer32();
|
| HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason);
|
| }
|
| @@ -4738,7 +4798,7 @@ class HSar: public HBitwiseBinaryOperation {
|
| DECLARE_CONCRETE_INSTRUCTION(Sar)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| HSar(HValue* context, HValue* left, HValue* right)
|
| @@ -4746,7 +4806,7 @@ class HSar: public HBitwiseBinaryOperation {
|
| };
|
|
|
|
|
| -class HRor: public HBitwiseBinaryOperation {
|
| +class HRor V8_FINAL : public HBitwiseBinaryOperation {
|
| public:
|
| HRor(HValue* context, HValue* left, HValue* right)
|
| : HBitwiseBinaryOperation(context, left, right) {
|
| @@ -4755,7 +4815,7 @@ class HRor: public HBitwiseBinaryOperation {
|
|
|
| virtual void UpdateRepresentation(Representation new_rep,
|
| HInferRepresentationPhase* h_infer,
|
| - const char* reason) {
|
| + const char* reason) V8_OVERRIDE {
|
| if (new_rep.IsSmi()) new_rep = Representation::Integer32();
|
| HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason);
|
| }
|
| @@ -4763,17 +4823,17 @@ class HRor: public HBitwiseBinaryOperation {
|
| DECLARE_CONCRETE_INSTRUCTION(Ror)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HOsrEntry: public HTemplateInstruction<0> {
|
| +class HOsrEntry V8_FINAL : public HTemplateInstruction<0> {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HOsrEntry, BailoutId);
|
|
|
| BailoutId ast_id() const { return ast_id_; }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| @@ -4789,7 +4849,7 @@ class HOsrEntry: public HTemplateInstruction<0> {
|
| };
|
|
|
|
|
| -class HParameter: public HTemplateInstruction<0> {
|
| +class HParameter V8_FINAL : public HTemplateInstruction<0> {
|
| public:
|
| enum ParameterKind {
|
| STACK_PARAMETER,
|
| @@ -4804,9 +4864,9 @@ class HParameter: public HTemplateInstruction<0> {
|
| unsigned index() const { return index_; }
|
| ParameterKind kind() const { return kind_; }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| @@ -4833,7 +4893,7 @@ class HParameter: public HTemplateInstruction<0> {
|
| };
|
|
|
|
|
| -class HCallStub: public HUnaryCall {
|
| +class HCallStub V8_FINAL : public HUnaryCall {
|
| public:
|
| HCallStub(HValue* context, CodeStub::Major major_key, int argument_count)
|
| : HUnaryCall(context, argument_count),
|
| @@ -4852,11 +4912,7 @@ class HCallStub: public HUnaryCall {
|
| return transcendental_type_;
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| -
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| - return Representation::Tagged();
|
| - }
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(CallStub)
|
|
|
| @@ -4866,11 +4922,11 @@ class HCallStub: public HUnaryCall {
|
| };
|
|
|
|
|
| -class HUnknownOSRValue: public HTemplateInstruction<0> {
|
| +class HUnknownOSRValue V8_FINAL : public HTemplateInstruction<0> {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P0(HUnknownOSRValue)
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| @@ -4882,7 +4938,7 @@ class HUnknownOSRValue: public HTemplateInstruction<0> {
|
| return incoming_value_;
|
| }
|
|
|
| - virtual Representation KnownOptimalRepresentation() {
|
| + virtual Representation KnownOptimalRepresentation() V8_OVERRIDE {
|
| if (incoming_value_ == NULL) return Representation::None();
|
| return incoming_value_->KnownOptimalRepresentation();
|
| }
|
| @@ -4899,7 +4955,7 @@ class HUnknownOSRValue: public HTemplateInstruction<0> {
|
| };
|
|
|
|
|
| -class HLoadGlobalCell: public HTemplateInstruction<0> {
|
| +class HLoadGlobalCell V8_FINAL : public HTemplateInstruction<0> {
|
| public:
|
| HLoadGlobalCell(Handle<Cell> cell, PropertyDetails details)
|
| : cell_(cell), details_(details), unique_id_() {
|
| @@ -4911,30 +4967,30 @@ class HLoadGlobalCell: public HTemplateInstruction<0> {
|
| Handle<Cell> cell() const { return cell_; }
|
| bool RequiresHoleCheck() const;
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual intptr_t Hashcode() {
|
| + virtual intptr_t Hashcode() V8_OVERRIDE {
|
| return unique_id_.Hashcode();
|
| }
|
|
|
| - virtual void FinalizeUniqueValueId() {
|
| + virtual void FinalizeUniqueValueId() V8_OVERRIDE {
|
| unique_id_ = UniqueValueId(cell_);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::None();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) {
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| HLoadGlobalCell* b = HLoadGlobalCell::cast(other);
|
| return unique_id_ == b->unique_id_;
|
| }
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return !RequiresHoleCheck(); }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return !RequiresHoleCheck(); }
|
|
|
| Handle<Cell> cell_;
|
| PropertyDetails details_;
|
| @@ -4942,7 +4998,7 @@ class HLoadGlobalCell: public HTemplateInstruction<0> {
|
| };
|
|
|
|
|
| -class HLoadGlobalGeneric: public HTemplateInstruction<2> {
|
| +class HLoadGlobalGeneric V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| HLoadGlobalGeneric(HValue* context,
|
| HValue* global_object,
|
| @@ -4961,9 +5017,9 @@ class HLoadGlobalGeneric: public HTemplateInstruction<2> {
|
| Handle<Object> name() const { return name_; }
|
| bool for_typeof() const { return for_typeof_; }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -4975,7 +5031,7 @@ class HLoadGlobalGeneric: public HTemplateInstruction<2> {
|
| };
|
|
|
|
|
| -class HAllocate: public HTemplateInstruction<2> {
|
| +class HAllocate V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| static HAllocate* New(Zone* zone,
|
| HValue* context,
|
| @@ -4993,7 +5049,7 @@ class HAllocate: public HTemplateInstruction<2> {
|
| HValue* context() { return OperandAt(0); }
|
| HValue* size() { return OperandAt(1); }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| if (index == 0) {
|
| return Representation::Tagged();
|
| } else {
|
| @@ -5042,9 +5098,9 @@ class HAllocate: public HTemplateInstruction<2> {
|
| }
|
|
|
| virtual void HandleSideEffectDominator(GVNFlag side_effect,
|
| - HValue* dominator);
|
| + HValue* dominator) V8_OVERRIDE;
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(Allocate)
|
|
|
| @@ -5084,7 +5140,7 @@ class HAllocate: public HTemplateInstruction<2> {
|
| };
|
|
|
|
|
| -class HInnerAllocatedObject: public HTemplateInstruction<1> {
|
| +class HInnerAllocatedObject V8_FINAL : public HTemplateInstruction<1> {
|
| public:
|
| static HInnerAllocatedObject* New(Zone* zone,
|
| HValue* context,
|
| @@ -5097,11 +5153,11 @@ class HInnerAllocatedObject: public HTemplateInstruction<1> {
|
| HValue* base_object() { return OperandAt(0); }
|
| int offset() { return offset_; }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject)
|
|
|
| @@ -5148,7 +5204,7 @@ inline bool ReceiverObjectNeedsWriteBarrier(HValue* object,
|
| }
|
|
|
|
|
| -class HStoreGlobalCell: public HUnaryOperation {
|
| +class HStoreGlobalCell V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P3(HStoreGlobalCell, HValue*,
|
| Handle<PropertyCell>, PropertyDetails);
|
| @@ -5161,10 +5217,10 @@ class HStoreGlobalCell: public HUnaryOperation {
|
| return StoringValueNeedsWriteBarrier(value());
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell)
|
|
|
| @@ -5183,7 +5239,7 @@ class HStoreGlobalCell: public HUnaryOperation {
|
| };
|
|
|
|
|
| -class HStoreGlobalGeneric: public HTemplateInstruction<3> {
|
| +class HStoreGlobalGeneric : public HTemplateInstruction<3> {
|
| public:
|
| inline static HStoreGlobalGeneric* New(Zone* zone,
|
| HValue* context,
|
| @@ -5201,9 +5257,9 @@ class HStoreGlobalGeneric: public HTemplateInstruction<3> {
|
| HValue* value() { return OperandAt(2); }
|
| StrictModeFlag strict_mode_flag() { return strict_mode_flag_; }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -5229,7 +5285,7 @@ class HStoreGlobalGeneric: public HTemplateInstruction<3> {
|
| };
|
|
|
|
|
| -class HLoadContextSlot: public HUnaryOperation {
|
| +class HLoadContextSlot V8_FINAL : public HUnaryOperation {
|
| public:
|
| enum Mode {
|
| // Perform a normal load of the context slot without checking its value.
|
| @@ -5274,29 +5330,29 @@ class HLoadContextSlot: public HUnaryOperation {
|
| return mode_ != kNoCheck;
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) {
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| HLoadContextSlot* b = HLoadContextSlot::cast(other);
|
| return (slot_index() == b->slot_index());
|
| }
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return !RequiresHoleCheck(); }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return !RequiresHoleCheck(); }
|
|
|
| int slot_index_;
|
| Mode mode_;
|
| };
|
|
|
|
|
| -class HStoreContextSlot: public HTemplateInstruction<2> {
|
| +class HStoreContextSlot V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| enum Mode {
|
| // Perform a normal store to the context slot without checking its previous
|
| @@ -5331,11 +5387,11 @@ class HStoreContextSlot: public HTemplateInstruction<2> {
|
| return mode_ != kNoCheck;
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot)
|
|
|
| @@ -5354,7 +5410,7 @@ class HStoreContextSlot: public HTemplateInstruction<2> {
|
|
|
| // Represents an access to a portion of an object, such as the map pointer,
|
| // array elements pointer, etc, but not accesses to array elements themselves.
|
| -class HObjectAccess {
|
| +class HObjectAccess V8_FINAL {
|
| public:
|
| inline bool IsInobject() const {
|
| return portion() != kBackingStore && portion() != kExternalMemory;
|
| @@ -5529,7 +5585,7 @@ class HObjectAccess {
|
| };
|
|
|
|
|
| -class HLoadNamedField: public HTemplateInstruction<2> {
|
| +class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P2(HLoadNamedField, HValue*, HObjectAccess);
|
| DECLARE_INSTRUCTION_FACTORY_P3(HLoadNamedField, HValue*, HObjectAccess,
|
| @@ -5542,26 +5598,27 @@ class HLoadNamedField: public HTemplateInstruction<2> {
|
| }
|
|
|
| bool HasTypeCheck() const { return OperandAt(0) != OperandAt(1); }
|
| + void ClearTypeCheck() { SetOperandAt(1, object()); }
|
| HObjectAccess access() const { return access_; }
|
| Representation field_representation() const {
|
| return access_.representation();
|
| }
|
|
|
| - virtual bool HasEscapingOperandAt(int index) { return false; }
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; }
|
| + virtual Representation RequiredInputRepresentation(int index) V8_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);
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(LoadNamedField)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) {
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| HLoadNamedField* b = HLoadNamedField::cast(other);
|
| return access_.Equals(b->access_);
|
| }
|
| @@ -5593,52 +5650,13 @@ class HLoadNamedField: public HTemplateInstruction<2> {
|
| access.SetGVNFlags(this, false);
|
| }
|
|
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
|
|
| HObjectAccess access_;
|
| };
|
|
|
|
|
| -class HLoadNamedFieldPolymorphic: public HTemplateInstruction<2> {
|
| - public:
|
| - HLoadNamedFieldPolymorphic(HValue* context,
|
| - HValue* object,
|
| - SmallMapList* types,
|
| - Handle<String> name,
|
| - Zone* zone);
|
| -
|
| - HValue* context() { return OperandAt(0); }
|
| - HValue* object() { return OperandAt(1); }
|
| - SmallMapList* types() { return &types_; }
|
| - Handle<String> name() { return name_; }
|
| - bool need_generic() { return need_generic_; }
|
| -
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| - return Representation::Tagged();
|
| - }
|
| -
|
| - virtual void PrintDataTo(StringStream* stream);
|
| -
|
| - DECLARE_CONCRETE_INSTRUCTION(LoadNamedFieldPolymorphic)
|
| -
|
| - static const int kMaxLoadPolymorphism = 4;
|
| -
|
| - virtual void FinalizeUniqueValueId();
|
| -
|
| - protected:
|
| - virtual bool DataEquals(HValue* value);
|
| -
|
| - private:
|
| - SmallMapList types_;
|
| - Handle<String> name_;
|
| - ZoneList<UniqueValueId> types_unique_ids_;
|
| - UniqueValueId name_unique_id_;
|
| - bool need_generic_;
|
| -};
|
| -
|
| -
|
| -
|
| -class HLoadNamedGeneric: public HTemplateInstruction<2> {
|
| +class HLoadNamedGeneric V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| HLoadNamedGeneric(HValue* context, HValue* object, Handle<Object> name)
|
| : name_(name) {
|
| @@ -5652,11 +5670,11 @@ class HLoadNamedGeneric: public HTemplateInstruction<2> {
|
| HValue* object() { return OperandAt(1); }
|
| Handle<Object> name() const { return name_; }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric)
|
|
|
| @@ -5665,7 +5683,7 @@ class HLoadNamedGeneric: public HTemplateInstruction<2> {
|
| };
|
|
|
|
|
| -class HLoadFunctionPrototype: public HUnaryOperation {
|
| +class HLoadFunctionPrototype V8_FINAL : public HUnaryOperation {
|
| public:
|
| explicit HLoadFunctionPrototype(HValue* function)
|
| : HUnaryOperation(function) {
|
| @@ -5676,14 +5694,14 @@ class HLoadFunctionPrototype: public HUnaryOperation {
|
|
|
| HValue* function() { return OperandAt(0); }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
| };
|
|
|
| class ArrayInstructionInterface {
|
| @@ -5708,7 +5726,7 @@ enum LoadKeyedHoleMode {
|
| };
|
|
|
|
|
| -class HLoadKeyed
|
| +class HLoadKeyed V8_FINAL
|
| : public HTemplateInstruction<3>, public ArrayInstructionInterface {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P4(HLoadKeyed, HValue*, HValue*, HValue*,
|
| @@ -5743,7 +5761,7 @@ class HLoadKeyed
|
| return HoleModeField::decode(bit_field_);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| // kind_fast: tagged[int32] (none)
|
| // kind_double: tagged[int32] (none)
|
| // kind_external: external[int32] (none)
|
| @@ -5758,22 +5776,22 @@ class HLoadKeyed
|
| return Representation::None();
|
| }
|
|
|
| - virtual Representation observed_input_representation(int index) {
|
| + virtual Representation observed_input_representation(int index) V8_OVERRIDE {
|
| return RequiredInputRepresentation(index);
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| bool UsesMustHandleHole() const;
|
| bool AllUsesCanTreatHoleAsNaN() const;
|
| bool RequiresHoleCheck() const;
|
|
|
| - virtual Range* InferRange(Zone* zone);
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(LoadKeyed)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) {
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| if (!other->IsLoadKeyed()) return false;
|
| HLoadKeyed* other_load = HLoadKeyed::cast(other);
|
|
|
| @@ -5833,7 +5851,7 @@ class HLoadKeyed
|
| SetFlag(kUseGVN);
|
| }
|
|
|
| - virtual bool IsDeletable() const {
|
| + virtual bool IsDeletable() const V8_OVERRIDE {
|
| return !RequiresHoleCheck();
|
| }
|
|
|
| @@ -5869,7 +5887,7 @@ class HLoadKeyed
|
| };
|
|
|
|
|
| -class HLoadKeyedGeneric: public HTemplateInstruction<3> {
|
| +class HLoadKeyedGeneric V8_FINAL : public HTemplateInstruction<3> {
|
| public:
|
| HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key) {
|
| set_representation(Representation::Tagged());
|
| @@ -5883,28 +5901,30 @@ class HLoadKeyedGeneric: public HTemplateInstruction<3> {
|
| HValue* key() { return OperandAt(1); }
|
| HValue* context() { return OperandAt(2); }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| // tagged[tagged]
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual HValue* Canonicalize();
|
| + virtual HValue* Canonicalize() V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric)
|
| };
|
|
|
|
|
| -class HStoreNamedField: public HTemplateInstruction<3> {
|
| +class HStoreNamedField V8_FINAL : public HTemplateInstruction<3> {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P3(HStoreNamedField, HValue*,
|
| HObjectAccess, HValue*);
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(StoreNamedField)
|
|
|
| - virtual bool HasEscapingOperandAt(int index) { return index == 1; }
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE {
|
| + return index == 1;
|
| + }
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| if (index == 0 && access().IsExternalMemory()) {
|
| // object must be external in case of external memory access
|
| return Representation::External();
|
| @@ -5917,11 +5937,11 @@ class HStoreNamedField: public HTemplateInstruction<3> {
|
| return Representation::Tagged();
|
| }
|
| virtual void HandleSideEffectDominator(GVNFlag side_effect,
|
| - HValue* dominator) {
|
| + HValue* dominator) V8_OVERRIDE {
|
| ASSERT(side_effect == kChangesNewSpacePromotion);
|
| new_space_dominator_ = dominator;
|
| }
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| void SkipWriteBarrier() { write_barrier_mode_ = SKIP_WRITE_BARRIER; }
|
| bool IsSkipWriteBarrier() const {
|
| @@ -5996,7 +6016,7 @@ class HStoreNamedField: public HTemplateInstruction<3> {
|
| };
|
|
|
|
|
| -class HStoreNamedGeneric: public HTemplateInstruction<3> {
|
| +class HStoreNamedGeneric V8_FINAL : public HTemplateInstruction<3> {
|
| public:
|
| HStoreNamedGeneric(HValue* context,
|
| HValue* object,
|
| @@ -6017,9 +6037,9 @@ class HStoreNamedGeneric: public HTemplateInstruction<3> {
|
| Handle<String> name() { return name_; }
|
| StrictModeFlag strict_mode_flag() { return strict_mode_flag_; }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -6031,13 +6051,13 @@ class HStoreNamedGeneric: public HTemplateInstruction<3> {
|
| };
|
|
|
|
|
| -class HStoreKeyed
|
| +class HStoreKeyed V8_FINAL
|
| : public HTemplateInstruction<3>, public ArrayInstructionInterface {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P4(HStoreKeyed, HValue*, HValue*, HValue*,
|
| ElementsKind);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| // kind_fast: tagged[int32] = tagged
|
| // kind_double: tagged[int32] = double
|
| // kind_smi : tagged[int32] = smi
|
| @@ -6067,7 +6087,7 @@ class HStoreKeyed
|
| return IsExternalArrayElementsKind(elements_kind());
|
| }
|
|
|
| - virtual Representation observed_input_representation(int index) {
|
| + virtual Representation observed_input_representation(int index) V8_OVERRIDE {
|
| if (index < 2) return RequiredInputRepresentation(index);
|
| if (IsUninitialized()) {
|
| return Representation::None();
|
| @@ -6108,7 +6128,7 @@ class HStoreKeyed
|
| }
|
|
|
| virtual void HandleSideEffectDominator(GVNFlag side_effect,
|
| - HValue* dominator) {
|
| + HValue* dominator) V8_OVERRIDE {
|
| ASSERT(side_effect == kChangesNewSpacePromotion);
|
| new_space_dominator_ = dominator;
|
| }
|
| @@ -6126,7 +6146,7 @@ class HStoreKeyed
|
|
|
| bool NeedsCanonicalization();
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(StoreKeyed)
|
|
|
| @@ -6172,7 +6192,7 @@ class HStoreKeyed
|
| };
|
|
|
|
|
| -class HStoreKeyedGeneric: public HTemplateInstruction<4> {
|
| +class HStoreKeyedGeneric V8_FINAL : public HTemplateInstruction<4> {
|
| public:
|
| HStoreKeyedGeneric(HValue* context,
|
| HValue* object,
|
| @@ -6193,12 +6213,12 @@ class HStoreKeyedGeneric: public HTemplateInstruction<4> {
|
| HValue* context() { return OperandAt(3); }
|
| StrictModeFlag strict_mode_flag() { return strict_mode_flag_; }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| // tagged[tagged] = tagged
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric)
|
|
|
| @@ -6207,7 +6227,7 @@ class HStoreKeyedGeneric: public HTemplateInstruction<4> {
|
| };
|
|
|
|
|
| -class HTransitionElementsKind: public HTemplateInstruction<2> {
|
| +class HTransitionElementsKind V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| inline static HTransitionElementsKind* New(Zone* zone,
|
| HValue* context,
|
| @@ -6218,7 +6238,7 @@ class HTransitionElementsKind: public HTemplateInstruction<2> {
|
| original_map, transitioned_map);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -6229,9 +6249,9 @@ class HTransitionElementsKind: public HTemplateInstruction<2> {
|
| ElementsKind from_kind() { return from_kind_; }
|
| ElementsKind to_kind() { return to_kind_; }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual void FinalizeUniqueValueId() {
|
| + virtual void FinalizeUniqueValueId() V8_OVERRIDE {
|
| original_map_unique_id_ = UniqueValueId(original_map_);
|
| transitioned_map_unique_id_ = UniqueValueId(transitioned_map_);
|
| }
|
| @@ -6239,7 +6259,7 @@ class HTransitionElementsKind: public HTemplateInstruction<2> {
|
| DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) {
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| HTransitionElementsKind* instr = HTransitionElementsKind::cast(other);
|
| return original_map_unique_id_ == instr->original_map_unique_id_ &&
|
| transitioned_map_unique_id_ == instr->transitioned_map_unique_id_;
|
| @@ -6260,11 +6280,7 @@ class HTransitionElementsKind: public HTemplateInstruction<2> {
|
| SetOperandAt(1, context);
|
| SetFlag(kUseGVN);
|
| SetGVNFlag(kChangesElementsKind);
|
| - if (original_map->has_fast_double_elements()) {
|
| - SetGVNFlag(kChangesElementsPointer);
|
| - SetGVNFlag(kChangesNewSpacePromotion);
|
| - }
|
| - if (transitioned_map->has_fast_double_elements()) {
|
| + if (!IsSimpleMapChangeTransition(from_kind_, to_kind_)) {
|
| SetGVNFlag(kChangesElementsPointer);
|
| SetGVNFlag(kChangesNewSpacePromotion);
|
| }
|
| @@ -6280,7 +6296,7 @@ class HTransitionElementsKind: public HTemplateInstruction<2> {
|
| };
|
|
|
|
|
| -class HStringAdd: public HBinaryOperation {
|
| +class HStringAdd V8_FINAL : public HBinaryOperation {
|
| public:
|
| static HInstruction* New(Zone* zone,
|
| HValue* context,
|
| @@ -6290,14 +6306,14 @@ class HStringAdd: public HBinaryOperation {
|
|
|
| StringAddFlags flags() const { return flags_; }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(StringAdd)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| private:
|
| HStringAdd(HValue* context, HValue* left, HValue* right, StringAddFlags flags)
|
| @@ -6310,13 +6326,13 @@ class HStringAdd: public HBinaryOperation {
|
|
|
| // No side-effects except possible allocation.
|
| // NOTE: this instruction _does not_ call ToString() on its inputs.
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
|
|
| const StringAddFlags flags_;
|
| };
|
|
|
|
|
| -class HStringCharCodeAt: public HTemplateInstruction<3> {
|
| +class HStringCharCodeAt V8_FINAL : public HTemplateInstruction<3> {
|
| public:
|
| static HStringCharCodeAt* New(Zone* zone,
|
| HValue* context,
|
| @@ -6339,9 +6355,9 @@ class HStringCharCodeAt: public HTemplateInstruction<3> {
|
| DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| - virtual Range* InferRange(Zone* zone) {
|
| + virtual Range* InferRange(Zone* zone) V8_OVERRIDE {
|
| return new(zone) Range(0, String::kMaxUtf16CodeUnit);
|
| }
|
|
|
| @@ -6357,17 +6373,17 @@ class HStringCharCodeAt: public HTemplateInstruction<3> {
|
| }
|
|
|
| // No side effects: runtime function assumes string + number inputs.
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HStringCharFromCode: public HTemplateInstruction<2> {
|
| +class HStringCharFromCode V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| static HInstruction* New(Zone* zone,
|
| HValue* context,
|
| HValue* char_code);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return index == 0
|
| ? Representation::Tagged()
|
| : Representation::Integer32();
|
| @@ -6376,7 +6392,7 @@ class HStringCharFromCode: public HTemplateInstruction<2> {
|
| HValue* context() const { return OperandAt(0); }
|
| HValue* value() const { return OperandAt(1); }
|
|
|
| - virtual bool DataEquals(HValue* other) { return true; }
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode)
|
|
|
| @@ -6390,14 +6406,14 @@ class HStringCharFromCode: public HTemplateInstruction<2> {
|
| SetGVNFlag(kChangesNewSpacePromotion);
|
| }
|
|
|
| - virtual bool IsDeletable() const {
|
| + virtual bool IsDeletable() const V8_OVERRIDE {
|
| return !value()->ToNumberCanBeObserved();
|
| }
|
| };
|
|
|
|
|
| template <int V>
|
| -class HMaterializedLiteral: public HTemplateInstruction<V> {
|
| +class HMaterializedLiteral : public HTemplateInstruction<V> {
|
| public:
|
| HMaterializedLiteral<V>(int index, int depth, AllocationSiteMode mode)
|
| : literal_index_(index), depth_(depth), allocation_site_mode_(mode) {
|
| @@ -6417,7 +6433,7 @@ class HMaterializedLiteral: public HTemplateInstruction<V> {
|
| }
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_FINAL V8_OVERRIDE { return true; }
|
|
|
| int literal_index_;
|
| int depth_;
|
| @@ -6425,7 +6441,7 @@ class HMaterializedLiteral: public HTemplateInstruction<V> {
|
| };
|
|
|
|
|
| -class HRegExpLiteral: public HMaterializedLiteral<1> {
|
| +class HRegExpLiteral V8_FINAL : public HMaterializedLiteral<1> {
|
| public:
|
| HRegExpLiteral(HValue* context,
|
| Handle<FixedArray> literals,
|
| @@ -6446,7 +6462,7 @@ class HRegExpLiteral: public HMaterializedLiteral<1> {
|
| Handle<String> pattern() { return pattern_; }
|
| Handle<String> flags() { return flags_; }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -6459,7 +6475,7 @@ class HRegExpLiteral: public HMaterializedLiteral<1> {
|
| };
|
|
|
|
|
| -class HFunctionLiteral: public HTemplateInstruction<1> {
|
| +class HFunctionLiteral V8_FINAL : public HTemplateInstruction<1> {
|
| public:
|
| HFunctionLiteral(HValue* context,
|
| Handle<SharedFunctionInfo> shared,
|
| @@ -6477,7 +6493,7 @@ class HFunctionLiteral: public HTemplateInstruction<1> {
|
|
|
| HValue* context() { return OperandAt(0); }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -6490,7 +6506,7 @@ class HFunctionLiteral: public HTemplateInstruction<1> {
|
| LanguageMode language_mode() const { return language_mode_; }
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
|
|
| Handle<SharedFunctionInfo> shared_info_;
|
| bool pretenure_ : 1;
|
| @@ -6500,7 +6516,7 @@ class HFunctionLiteral: public HTemplateInstruction<1> {
|
| };
|
|
|
|
|
| -class HTypeof: public HTemplateInstruction<2> {
|
| +class HTypeof V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| explicit HTypeof(HValue* context, HValue* value) {
|
| SetOperandAt(0, context);
|
| @@ -6511,24 +6527,24 @@ class HTypeof: public HTemplateInstruction<2> {
|
| HValue* context() { return OperandAt(0); }
|
| HValue* value() { return OperandAt(1); }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(Typeof)
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HTrapAllocationMemento : public HTemplateInstruction<1> {
|
| +class HTrapAllocationMemento V8_FINAL : public HTemplateInstruction<1> {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HTrapAllocationMemento, HValue*);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -6543,11 +6559,11 @@ class HTrapAllocationMemento : public HTemplateInstruction<1> {
|
| };
|
|
|
|
|
| -class HToFastProperties: public HUnaryOperation {
|
| +class HToFastProperties V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HToFastProperties, HValue*);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -6555,8 +6571,11 @@ class HToFastProperties: public HUnaryOperation {
|
|
|
| private:
|
| explicit HToFastProperties(HValue* value) : HUnaryOperation(value) {
|
| - // This instruction is not marked as having side effects, but
|
| - // changes the map of the input operand. Use it only when creating
|
| + set_representation(Representation::Tagged());
|
| + SetGVNFlag(kChangesNewSpacePromotion);
|
| +
|
| + // This instruction is not marked as kChangesMaps, but does
|
| + // change the map of the input operand. Use it only when creating
|
| // object literals via a runtime call.
|
| ASSERT(value->IsCallRuntime());
|
| #ifdef DEBUG
|
| @@ -6564,31 +6583,30 @@ class HToFastProperties: public HUnaryOperation {
|
| ASSERT(function->function_id == Runtime::kCreateObjectLiteral ||
|
| function->function_id == Runtime::kCreateObjectLiteralShallow);
|
| #endif
|
| - set_representation(Representation::Tagged());
|
| }
|
|
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HValueOf: public HUnaryOperation {
|
| +class HValueOf V8_FINAL : public HUnaryOperation {
|
| public:
|
| explicit HValueOf(HValue* value) : HUnaryOperation(value) {
|
| set_representation(Representation::Tagged());
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(ValueOf)
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
| -class HDateField: public HUnaryOperation {
|
| +class HDateField V8_FINAL : public HUnaryOperation {
|
| public:
|
| HDateField(HValue* date, Smi* index)
|
| : HUnaryOperation(date), index_(index) {
|
| @@ -6597,7 +6615,7 @@ class HDateField: public HUnaryOperation {
|
|
|
| Smi* index() const { return index_; }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -6608,7 +6626,7 @@ class HDateField: public HUnaryOperation {
|
| };
|
|
|
|
|
| -class HSeqStringSetChar: public HTemplateInstruction<3> {
|
| +class HSeqStringSetChar V8_FINAL : public HTemplateInstruction<3> {
|
| public:
|
| HSeqStringSetChar(String::Encoding encoding,
|
| HValue* string,
|
| @@ -6625,7 +6643,7 @@ class HSeqStringSetChar: public HTemplateInstruction<3> {
|
| HValue* index() { return OperandAt(1); }
|
| HValue* value() { return OperandAt(2); }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return (index == 0) ? Representation::Tagged()
|
| : Representation::Integer32();
|
| }
|
| @@ -6637,17 +6655,17 @@ class HSeqStringSetChar: public HTemplateInstruction<3> {
|
| };
|
|
|
|
|
| -class HCheckMapValue: public HTemplateInstruction<2> {
|
| +class HCheckMapValue V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P2(HCheckMapValue, HValue*, HValue*);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual HType CalculateInferredType() {
|
| + virtual HType CalculateInferredType() V8_OVERRIDE {
|
| return HType::Tagged();
|
| }
|
|
|
| @@ -6657,7 +6675,7 @@ class HCheckMapValue: public HTemplateInstruction<2> {
|
| DECLARE_CONCRETE_INSTRUCTION(CheckMapValue)
|
|
|
| protected:
|
| - virtual bool DataEquals(HValue* other) {
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| return true;
|
| }
|
|
|
| @@ -6674,7 +6692,7 @@ class HCheckMapValue: public HTemplateInstruction<2> {
|
| };
|
|
|
|
|
| -class HForInPrepareMap : public HTemplateInstruction<2> {
|
| +class HForInPrepareMap V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| static HForInPrepareMap* New(Zone* zone,
|
| HValue* context,
|
| @@ -6682,16 +6700,16 @@ class HForInPrepareMap : public HTemplateInstruction<2> {
|
| return new(zone) HForInPrepareMap(context, object);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| HValue* context() { return OperandAt(0); }
|
| HValue* enumerable() { return OperandAt(1); }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual HType CalculateInferredType() {
|
| + virtual HType CalculateInferredType() V8_OVERRIDE {
|
| return HType::Tagged();
|
| }
|
|
|
| @@ -6708,11 +6726,11 @@ class HForInPrepareMap : public HTemplateInstruction<2> {
|
| };
|
|
|
|
|
| -class HForInCacheArray : public HTemplateInstruction<2> {
|
| +class HForInCacheArray V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P3(HForInCacheArray, HValue*, HValue*, int);
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| @@ -6728,9 +6746,9 @@ class HForInCacheArray : public HTemplateInstruction<2> {
|
| index_cache_ = index_cache;
|
| }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual HType CalculateInferredType() {
|
| + virtual HType CalculateInferredType() V8_OVERRIDE {
|
| return HType::Tagged();
|
| }
|
|
|
| @@ -6750,7 +6768,7 @@ class HForInCacheArray : public HTemplateInstruction<2> {
|
| };
|
|
|
|
|
| -class HLoadFieldByIndex : public HTemplateInstruction<2> {
|
| +class HLoadFieldByIndex V8_FINAL : public HTemplateInstruction<2> {
|
| public:
|
| HLoadFieldByIndex(HValue* object,
|
| HValue* index) {
|
| @@ -6759,23 +6777,23 @@ class HLoadFieldByIndex : public HTemplateInstruction<2> {
|
| set_representation(Representation::Tagged());
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) {
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| }
|
|
|
| HValue* object() { return OperandAt(0); }
|
| HValue* index() { return OperandAt(1); }
|
|
|
| - virtual void PrintDataTo(StringStream* stream);
|
| + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|
| - virtual HType CalculateInferredType() {
|
| + virtual HType CalculateInferredType() V8_OVERRIDE {
|
| return HType::Tagged();
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex);
|
|
|
| private:
|
| - virtual bool IsDeletable() const { return true; }
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| };
|
|
|
|
|
|
|