Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: src/hydrogen-instructions.h

Issue 25604008: Fix test262 failures and x64 compile failure. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Nits Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 bool IsInformativeDefinition() { 716 bool IsInformativeDefinition() {
717 return RedefinedOperandIndex() != kNoRedefinedOperand; 717 return RedefinedOperandIndex() != kNoRedefinedOperand;
718 } 718 }
719 HValue* RedefinedOperand() { 719 HValue* RedefinedOperand() {
720 int index = RedefinedOperandIndex(); 720 int index = RedefinedOperandIndex();
721 return index == kNoRedefinedOperand ? NULL : OperandAt(index); 721 return index == kNoRedefinedOperand ? NULL : OperandAt(index);
722 } 722 }
723 723
724 bool CanReplaceWithDummyUses(); 724 bool CanReplaceWithDummyUses();
725 725
726 virtual int argument_delta() const { return 0; }
727
726 // A purely informative definition is an idef that will not emit code and 728 // A purely informative definition is an idef that will not emit code and
727 // should therefore be removed from the graph in the RestoreActualValues 729 // should therefore be removed from the graph in the RestoreActualValues
728 // phase (so that live ranges will be shorter). 730 // phase (so that live ranges will be shorter).
729 virtual bool IsPurelyInformativeDefinition() { return false; } 731 virtual bool IsPurelyInformativeDefinition() { return false; }
730 732
731 // This method must always return the original HValue SSA definition, 733 // This method must always return the original HValue SSA definition,
732 // regardless of any chain of iDefs of this value. 734 // regardless of any chain of iDefs of this value.
733 HValue* ActualValue() { 735 HValue* ActualValue() {
734 HValue* value = this; 736 HValue* value = this;
735 int index; 737 int index;
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1923 InliningKind inlining_kind_; 1925 InliningKind inlining_kind_;
1924 Variable* arguments_var_; 1926 Variable* arguments_var_;
1925 HArgumentsObject* arguments_object_; 1927 HArgumentsObject* arguments_object_;
1926 bool undefined_receiver_; 1928 bool undefined_receiver_;
1927 ZoneList<HBasicBlock*> return_targets_; 1929 ZoneList<HBasicBlock*> return_targets_;
1928 }; 1930 };
1929 1931
1930 1932
1931 class HLeaveInlined V8_FINAL : public HTemplateInstruction<0> { 1933 class HLeaveInlined V8_FINAL : public HTemplateInstruction<0> {
1932 public: 1934 public:
1933 HLeaveInlined() { } 1935 explicit HLeaveInlined(int drop_count) : drop_count_(drop_count) { }
1934 1936
1935 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { 1937 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
1936 return Representation::None(); 1938 return Representation::None();
1937 } 1939 }
1938 1940
1941 virtual int argument_delta() const V8_OVERRIDE { return -drop_count_; }
1942
1939 DECLARE_CONCRETE_INSTRUCTION(LeaveInlined) 1943 DECLARE_CONCRETE_INSTRUCTION(LeaveInlined)
1944
1945 private:
1946 int drop_count_;
1940 }; 1947 };
1941 1948
1942 1949
1943 class HPushArgument V8_FINAL : public HUnaryOperation { 1950 class HPushArgument V8_FINAL : public HUnaryOperation {
1944 public: 1951 public:
1945 DECLARE_INSTRUCTION_FACTORY_P1(HPushArgument, HValue*); 1952 DECLARE_INSTRUCTION_FACTORY_P1(HPushArgument, HValue*);
1946 1953
1947 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { 1954 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
1948 return Representation::Tagged(); 1955 return Representation::Tagged();
1949 } 1956 }
1950 1957
1958 virtual int argument_delta() const V8_OVERRIDE { return 1; }
1951 HValue* argument() { return OperandAt(0); } 1959 HValue* argument() { return OperandAt(0); }
1952 1960
1953 DECLARE_CONCRETE_INSTRUCTION(PushArgument) 1961 DECLARE_CONCRETE_INSTRUCTION(PushArgument)
1954 1962
1955 private: 1963 private:
1956 explicit HPushArgument(HValue* value) : HUnaryOperation(value) { 1964 explicit HPushArgument(HValue* value) : HUnaryOperation(value) {
1957 set_representation(Representation::Tagged()); 1965 set_representation(Representation::Tagged());
1958 } 1966 }
1959 }; 1967 };
1960 1968
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 // The argument count includes the receiver. 2098 // The argument count includes the receiver.
2091 explicit HCall<V>(int argument_count) : argument_count_(argument_count) { 2099 explicit HCall<V>(int argument_count) : argument_count_(argument_count) {
2092 this->set_representation(Representation::Tagged()); 2100 this->set_representation(Representation::Tagged());
2093 this->SetAllSideEffects(); 2101 this->SetAllSideEffects();
2094 } 2102 }
2095 2103
2096 virtual HType CalculateInferredType() V8_FINAL V8_OVERRIDE { 2104 virtual HType CalculateInferredType() V8_FINAL V8_OVERRIDE {
2097 return HType::Tagged(); 2105 return HType::Tagged();
2098 } 2106 }
2099 2107
2100 virtual int argument_count() const { return argument_count_; } 2108 virtual int argument_count() const {
2109 return argument_count_;
2110 }
2111
2112 virtual int argument_delta() const V8_OVERRIDE {
2113 return -argument_count();
2114 }
2101 2115
2102 virtual bool IsCall() V8_FINAL V8_OVERRIDE { return true; } 2116 virtual bool IsCall() V8_FINAL V8_OVERRIDE { return true; }
2103 2117
2104 private: 2118 private:
2105 int argument_count_; 2119 int argument_count_;
2106 }; 2120 };
2107 2121
2108 2122
2109 class HUnaryCall : public HCall<1> { 2123 class HUnaryCall : public HCall<1> {
2110 public: 2124 public:
(...skipping 5000 matching lines...) Expand 10 before | Expand all | Expand 10 after
7111 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7125 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7112 }; 7126 };
7113 7127
7114 7128
7115 #undef DECLARE_INSTRUCTION 7129 #undef DECLARE_INSTRUCTION
7116 #undef DECLARE_CONCRETE_INSTRUCTION 7130 #undef DECLARE_CONCRETE_INSTRUCTION
7117 7131
7118 } } // namespace v8::internal 7132 } } // namespace v8::internal
7119 7133
7120 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7134 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698