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

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

Issue 6489029: Merge revisions 6742 and 6745 to the 3.0 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.0/build/ia32
Patch Set: Created 9 years, 10 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/full-codegen-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 class HCompare: public HBinaryOperation { 2034 class HCompare: public HBinaryOperation {
2035 public: 2035 public:
2036 HCompare(HValue* left, HValue* right, Token::Value token) 2036 HCompare(HValue* left, HValue* right, Token::Value token)
2037 : HBinaryOperation(left, right), token_(token) { 2037 : HBinaryOperation(left, right), token_(token) {
2038 ASSERT(Token::IsCompareOp(token)); 2038 ASSERT(Token::IsCompareOp(token));
2039 set_representation(Representation::Tagged()); 2039 set_representation(Representation::Tagged());
2040 SetAllSideEffects(); 2040 SetAllSideEffects();
2041 } 2041 }
2042 2042
2043 void SetInputRepresentation(Representation r); 2043 void SetInputRepresentation(Representation r);
2044 virtual bool EmitAtUses() const { return uses()->length() <= 1; } 2044
2045 virtual bool EmitAtUses() const {
2046 return !HasSideEffects() && (uses()->length() <= 1);
2047 }
2048
2045 virtual Representation RequiredInputRepresentation(int index) const { 2049 virtual Representation RequiredInputRepresentation(int index) const {
2046 return input_representation_; 2050 return input_representation_;
2047 } 2051 }
2048 Representation GetInputRepresentation() const { 2052 Representation GetInputRepresentation() const {
2049 return input_representation_; 2053 return input_representation_;
2050 } 2054 }
2051 Token::Value token() const { return token_; } 2055 Token::Value token() const { return token_; }
2052 virtual void PrintDataTo(StringStream* stream) const; 2056 virtual void PrintDataTo(StringStream* stream) const;
2053 2057
2054 virtual HType CalculateInferredType() const; 2058 virtual HType CalculateInferredType() const;
(...skipping 17 matching lines...) Expand all
2072 2076
2073 2077
2074 class HCompareJSObjectEq: public HBinaryOperation { 2078 class HCompareJSObjectEq: public HBinaryOperation {
2075 public: 2079 public:
2076 HCompareJSObjectEq(HValue* left, HValue* right) 2080 HCompareJSObjectEq(HValue* left, HValue* right)
2077 : HBinaryOperation(left, right) { 2081 : HBinaryOperation(left, right) {
2078 set_representation(Representation::Tagged()); 2082 set_representation(Representation::Tagged());
2079 SetFlag(kUseGVN); 2083 SetFlag(kUseGVN);
2080 } 2084 }
2081 2085
2082 virtual bool EmitAtUses() const { return uses()->length() <= 1; } 2086 virtual bool EmitAtUses() const {
2087 return !HasSideEffects() && (uses()->length() <= 1);
2088 }
2089
2083 virtual Representation RequiredInputRepresentation(int index) const { 2090 virtual Representation RequiredInputRepresentation(int index) const {
2084 return Representation::Tagged(); 2091 return Representation::Tagged();
2085 } 2092 }
2086 virtual HType CalculateInferredType() const; 2093 virtual HType CalculateInferredType() const;
2087 2094
2088 DECLARE_CONCRETE_INSTRUCTION(CompareJSObjectEq, "compare-js-object-eq") 2095 DECLARE_CONCRETE_INSTRUCTION(CompareJSObjectEq, "compare-js-object-eq")
2089 2096
2090 protected: 2097 protected:
2091 virtual bool DataEquals(HValue* other) const { return true; } 2098 virtual bool DataEquals(HValue* other) const { return true; }
2092 }; 2099 };
2093 2100
2094 2101
2095 class HUnaryPredicate: public HUnaryOperation { 2102 class HUnaryPredicate: public HUnaryOperation {
2096 public: 2103 public:
2097 explicit HUnaryPredicate(HValue* value) : HUnaryOperation(value) { 2104 explicit HUnaryPredicate(HValue* value) : HUnaryOperation(value) {
2098 set_representation(Representation::Tagged()); 2105 set_representation(Representation::Tagged());
2099 SetFlag(kUseGVN); 2106 SetFlag(kUseGVN);
2100 } 2107 }
2101 virtual bool EmitAtUses() const { return uses()->length() <= 1; } 2108
2109 virtual bool EmitAtUses() const {
2110 return !HasSideEffects() && (uses()->length() <= 1);
2111 }
2112
2102 virtual Representation RequiredInputRepresentation(int index) const { 2113 virtual Representation RequiredInputRepresentation(int index) const {
2103 return Representation::Tagged(); 2114 return Representation::Tagged();
2104 } 2115 }
2105 virtual HType CalculateInferredType() const; 2116 virtual HType CalculateInferredType() const;
2106 }; 2117 };
2107 2118
2108 2119
2109 class HIsNull: public HUnaryPredicate { 2120 class HIsNull: public HUnaryPredicate {
2110 public: 2121 public:
2111 HIsNull(HValue* value, bool is_strict) 2122 HIsNull(HValue* value, bool is_strict)
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
2230 }; 2241 };
2231 2242
2232 2243
2233 class HInstanceOf: public HBinaryOperation { 2244 class HInstanceOf: public HBinaryOperation {
2234 public: 2245 public:
2235 HInstanceOf(HValue* left, HValue* right) : HBinaryOperation(left, right) { 2246 HInstanceOf(HValue* left, HValue* right) : HBinaryOperation(left, right) {
2236 set_representation(Representation::Tagged()); 2247 set_representation(Representation::Tagged());
2237 SetAllSideEffects(); 2248 SetAllSideEffects();
2238 } 2249 }
2239 2250
2240 virtual bool EmitAtUses() const { return uses()->length() <= 1; } 2251 virtual bool EmitAtUses() const {
2252 return !HasSideEffects() && (uses()->length() <= 1);
2253 }
2241 2254
2242 virtual Representation RequiredInputRepresentation(int index) const { 2255 virtual Representation RequiredInputRepresentation(int index) const {
2243 return Representation::Tagged(); 2256 return Representation::Tagged();
2244 } 2257 }
2245 2258
2246 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance_of") 2259 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance_of")
2247 }; 2260 };
2248 2261
2249 2262
2250 class HInstanceOfKnownGlobal: public HUnaryOperation { 2263 class HInstanceOfKnownGlobal: public HUnaryOperation {
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
3121 HValue* object() const { return left(); } 3134 HValue* object() const { return left(); }
3122 HValue* key() const { return right(); } 3135 HValue* key() const { return right(); }
3123 }; 3136 };
3124 3137
3125 #undef DECLARE_INSTRUCTION 3138 #undef DECLARE_INSTRUCTION
3126 #undef DECLARE_CONCRETE_INSTRUCTION 3139 #undef DECLARE_CONCRETE_INSTRUCTION
3127 3140
3128 } } // namespace v8::internal 3141 } } // namespace v8::internal
3129 3142
3130 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 3143 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698