| Index: src/hydrogen-instructions.h
|
| ===================================================================
|
| --- src/hydrogen-instructions.h (revision 6887)
|
| +++ src/hydrogen-instructions.h (working copy)
|
| @@ -578,9 +578,8 @@
|
| void ComputeInitialRange();
|
|
|
| // Representation helpers.
|
| - virtual Representation RequiredInputRepresentation(int index) const {
|
| - return Representation::None();
|
| - }
|
| + virtual Representation RequiredInputRepresentation(int index) const = 0;
|
| +
|
| virtual Representation InferredRepresentation() {
|
| return representation();
|
| }
|
| @@ -719,6 +718,11 @@
|
|
|
| class HBlockEntry: public HInstruction {
|
| public:
|
| +
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(BlockEntry, "block_entry")
|
| };
|
|
|
| @@ -746,6 +750,10 @@
|
| public:
|
| HDeoptimize() : HControlInstruction(NULL, NULL) { }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
|
| };
|
|
|
| @@ -761,6 +769,10 @@
|
| }
|
| bool include_stack_check() const { return include_stack_check_; }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
|
|
|
| private:
|
| @@ -777,10 +789,6 @@
|
| SetOperandAt(0, value);
|
| }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) const {
|
| - return Representation::Tagged();
|
| - }
|
| -
|
| virtual void PrintDataTo(StringStream* stream);
|
|
|
| HValue* value() { return OperandAt(0); }
|
| @@ -831,6 +839,10 @@
|
|
|
| Handle<Map> map() const { return map_; }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(CompareMap, "compare_map")
|
|
|
| private:
|
| @@ -844,6 +856,10 @@
|
| : HUnaryControlInstruction(value, NULL, NULL) {
|
| }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(Return, "return")
|
| };
|
|
|
| @@ -852,6 +868,10 @@
|
| public:
|
| HAbnormalExit() : HControlInstruction(NULL, NULL) { }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(AbnormalExit, "abnormal_exit")
|
| };
|
|
|
| @@ -983,6 +1003,10 @@
|
| virtual int OperandCount() { return values_.length(); }
|
| virtual HValue* OperandAt(int index) { return values_[index]; }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(Simulate, "simulate")
|
|
|
| #ifdef DEBUG
|
| @@ -1016,6 +1040,10 @@
|
| public:
|
| HStackCheck() { }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack_check")
|
| };
|
|
|
| @@ -1031,6 +1059,10 @@
|
| Handle<JSFunction> closure() const { return closure_; }
|
| FunctionLiteral* function() const { return function_; }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(EnterInlined, "enter_inlined")
|
|
|
| private:
|
| @@ -1043,6 +1075,10 @@
|
| public:
|
| HLeaveInlined() {}
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(LeaveInlined, "leave_inlined")
|
| };
|
|
|
| @@ -1070,6 +1106,10 @@
|
| SetFlag(kUseGVN);
|
| }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(Context, "context");
|
|
|
| protected:
|
| @@ -1086,6 +1126,10 @@
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer_context");
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| protected:
|
| virtual bool DataEquals(HValue* other) { return true; }
|
| };
|
| @@ -1100,6 +1144,10 @@
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global_object")
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| protected:
|
| virtual bool DataEquals(HValue* other) { return true; }
|
| };
|
| @@ -1115,6 +1163,10 @@
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global_receiver")
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| protected:
|
| virtual bool DataEquals(HValue* other) { return true; }
|
| };
|
| @@ -1212,6 +1264,10 @@
|
|
|
| virtual void PrintDataTo(StringStream* stream);
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call_constant_function")
|
|
|
| private:
|
| @@ -1249,6 +1305,10 @@
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call_named")
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| private:
|
| Handle<String> name_;
|
| };
|
| @@ -1262,6 +1322,10 @@
|
|
|
| HValue* context() { return value(); }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call_function")
|
| };
|
|
|
| @@ -1277,6 +1341,10 @@
|
| HValue* context() { return value(); }
|
| Handle<String> name() const { return name_; }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call_global")
|
|
|
| private:
|
| @@ -1293,6 +1361,10 @@
|
|
|
| Handle<JSFunction> target() const { return target_; }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call_known_global")
|
|
|
| private:
|
| @@ -1328,6 +1400,10 @@
|
| Runtime::Function* function() const { return c_function_; }
|
| Handle<String> name() const { return name_; }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call_runtime")
|
|
|
| private:
|
| @@ -1462,11 +1538,10 @@
|
| case kMathSin:
|
| case kMathCos:
|
| return Representation::Double();
|
| - break;
|
| case kMathAbs:
|
| return representation();
|
| - break;
|
| default:
|
| + UNREACHABLE();
|
| return Representation::None();
|
| }
|
| }
|
| @@ -1705,6 +1780,10 @@
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check_prototype_maps")
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| virtual intptr_t Hashcode() {
|
| ASSERT(!Heap::IsAllocationAllowed());
|
| intptr_t hash = reinterpret_cast<intptr_t>(*prototype());
|
| @@ -1851,6 +1930,10 @@
|
| SetFlag(kIsArguments);
|
| }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(ArgumentsObject, "arguments-object")
|
| };
|
|
|
| @@ -1863,6 +1946,10 @@
|
|
|
| bool InOldSpace() const { return !Heap::InNewSpace(*handle_); }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| virtual bool EmitAtUses() const { return !representation().IsDouble(); }
|
| virtual void PrintDataTo(StringStream* stream);
|
| virtual HType CalculateInferredType();
|
| @@ -2005,6 +2092,10 @@
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments_elements")
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| protected:
|
| virtual bool DataEquals(HValue* other) { return true; }
|
| };
|
| @@ -2019,6 +2110,10 @@
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments_length")
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| protected:
|
| virtual bool DataEquals(HValue* other) { return true; }
|
| };
|
| @@ -2289,6 +2384,10 @@
|
| return !HasSideEffects() && (uses()->length() <= 1);
|
| }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(IsConstructCall, "is_construct_call")
|
|
|
| protected:
|
| @@ -2669,6 +2768,10 @@
|
|
|
| int ast_id() const { return ast_id_; }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr_entry")
|
|
|
| private:
|
| @@ -2686,6 +2789,10 @@
|
|
|
| virtual void PrintDataTo(StringStream* stream);
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
|
|
|
| private:
|
| @@ -2714,6 +2821,10 @@
|
|
|
| virtual void PrintDataTo(StringStream* stream);
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(CallStub, "call_stub")
|
|
|
| private:
|
| @@ -2726,6 +2837,10 @@
|
| public:
|
| HUnknownOSRValue() { set_representation(Representation::Tagged()); }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown_osr_value")
|
| };
|
|
|
| @@ -2742,9 +2857,6 @@
|
| Handle<JSGlobalPropertyCell> cell() const { return cell_; }
|
| bool check_hole_value() const { return check_hole_value_; }
|
|
|
| - virtual Representation RequiredInputRepresentation(int index) const {
|
| - return Representation::Tagged();
|
| - }
|
| virtual void PrintDataTo(StringStream* stream);
|
|
|
| virtual intptr_t Hashcode() {
|
| @@ -2752,6 +2864,10 @@
|
| return reinterpret_cast<intptr_t>(*cell_);
|
| }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(LoadGlobal, "load_global")
|
|
|
| protected:
|
| @@ -3342,6 +3458,10 @@
|
|
|
| bool IsCopyOnWrite() const;
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array_literal")
|
|
|
| private:
|
| @@ -3373,6 +3493,10 @@
|
| virtual int OperandCount() { return 1; }
|
| virtual HValue* OperandAt(int index) { return context_; }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object_literal")
|
|
|
| protected:
|
| @@ -3399,6 +3523,10 @@
|
| Handle<String> pattern() { return pattern_; }
|
| Handle<String> flags() { return flags_; }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp_literal")
|
|
|
| private:
|
| @@ -3414,6 +3542,10 @@
|
| set_representation(Representation::Tagged());
|
| }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function_literal")
|
|
|
| Handle<SharedFunctionInfo> shared_info() const { return shared_info_; }
|
| @@ -3445,6 +3577,10 @@
|
| set_representation(Representation::Tagged());
|
| }
|
|
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value_of")
|
| };
|
|
|
|
|