Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 V(CheckFunction) \ | 84 V(CheckFunction) \ |
| 85 V(CheckInstanceType) \ | 85 V(CheckInstanceType) \ |
| 86 V(CheckMap) \ | 86 V(CheckMap) \ |
| 87 V(CheckNonSmi) \ | 87 V(CheckNonSmi) \ |
| 88 V(CheckPrototypeMaps) \ | 88 V(CheckPrototypeMaps) \ |
| 89 V(CheckSmi) \ | 89 V(CheckSmi) \ |
| 90 V(ClassOfTest) \ | 90 V(ClassOfTest) \ |
| 91 V(Compare) \ | 91 V(Compare) \ |
| 92 V(CompareJSObjectEq) \ | 92 V(CompareJSObjectEq) \ |
| 93 V(CompareMap) \ | 93 V(CompareMap) \ |
| 94 V(CompareSymbolEq) \ | |
| 94 V(Constant) \ | 95 V(Constant) \ |
| 95 V(Context) \ | 96 V(Context) \ |
| 96 V(DeleteProperty) \ | 97 V(DeleteProperty) \ |
| 97 V(Deoptimize) \ | 98 V(Deoptimize) \ |
| 98 V(Div) \ | 99 V(Div) \ |
| 99 V(EnterInlined) \ | 100 V(EnterInlined) \ |
| 100 V(ExternalArrayLength) \ | 101 V(ExternalArrayLength) \ |
| 101 V(FixedArrayLength) \ | 102 V(FixedArrayLength) \ |
| 102 V(FunctionLiteral) \ | 103 V(FunctionLiteral) \ |
| 103 V(GetCachedArrayIndex) \ | 104 V(GetCachedArrayIndex) \ |
| (...skipping 2298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2402 } | 2403 } |
| 2403 virtual HType CalculateInferredType(); | 2404 virtual HType CalculateInferredType(); |
| 2404 | 2405 |
| 2405 DECLARE_CONCRETE_INSTRUCTION(CompareJSObjectEq) | 2406 DECLARE_CONCRETE_INSTRUCTION(CompareJSObjectEq) |
| 2406 | 2407 |
| 2407 protected: | 2408 protected: |
| 2408 virtual bool DataEquals(HValue* other) { return true; } | 2409 virtual bool DataEquals(HValue* other) { return true; } |
| 2409 }; | 2410 }; |
| 2410 | 2411 |
| 2411 | 2412 |
| 2413 class HCompareSymbolEq: public HBinaryOperation { | |
| 2414 public: | |
| 2415 HCompareSymbolEq(HValue* left, HValue* right, Token::Value op) | |
| 2416 : HBinaryOperation(left, right), op_(op) { | |
| 2417 ASSERT(op == Token::EQ || op == Token::EQ_STRICT); | |
| 2418 set_representation(Representation::Tagged()); | |
| 2419 SetFlag(kUseGVN); | |
| 2420 SetFlag(kDependsOnMaps); | |
| 2421 } | |
| 2422 | |
| 2423 Token::Value op() const { return op_; } | |
| 2424 | |
| 2425 virtual bool EmitAtUses() { | |
| 2426 return !HasSideEffects() && !HasMultipleUses(); | |
| 2427 } | |
| 2428 | |
| 2429 virtual Representation RequiredInputRepresentation(int index) const { | |
| 2430 return Representation::Tagged(); | |
| 2431 } | |
| 2432 | |
| 2433 virtual HType CalculateInferredType() { return HType::Boolean(); } | |
| 2434 | |
| 2435 DECLARE_CONCRETE_INSTRUCTION(CompareSymbolEq); | |
| 2436 | |
| 2437 protected: | |
| 2438 virtual bool DataEquals(HValue* other) { return true; } | |
|
Mads Ager (chromium)
2011/05/11 12:37:31
Don't you have to check that the ops are the same
Vitaly Repeshko
2011/05/11 12:44:46
Good catch! Fixed.
| |
| 2439 | |
| 2440 private: | |
| 2441 const Token::Value op_; | |
| 2442 }; | |
| 2443 | |
| 2444 | |
| 2412 class HUnaryPredicate: public HUnaryOperation { | 2445 class HUnaryPredicate: public HUnaryOperation { |
| 2413 public: | 2446 public: |
| 2414 explicit HUnaryPredicate(HValue* value) : HUnaryOperation(value) { | 2447 explicit HUnaryPredicate(HValue* value) : HUnaryOperation(value) { |
| 2415 set_representation(Representation::Tagged()); | 2448 set_representation(Representation::Tagged()); |
| 2416 SetFlag(kUseGVN); | 2449 SetFlag(kUseGVN); |
| 2417 } | 2450 } |
| 2418 | 2451 |
| 2419 virtual bool EmitAtUses() { | 2452 virtual bool EmitAtUses() { |
| 2420 return !HasSideEffects() && !HasMultipleUses(); | 2453 return !HasSideEffects() && !HasMultipleUses(); |
| 2421 } | 2454 } |
| (...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3843 | 3876 |
| 3844 DECLARE_CONCRETE_INSTRUCTION(In) | 3877 DECLARE_CONCRETE_INSTRUCTION(In) |
| 3845 }; | 3878 }; |
| 3846 | 3879 |
| 3847 #undef DECLARE_INSTRUCTION | 3880 #undef DECLARE_INSTRUCTION |
| 3848 #undef DECLARE_CONCRETE_INSTRUCTION | 3881 #undef DECLARE_CONCRETE_INSTRUCTION |
| 3849 | 3882 |
| 3850 } } // namespace v8::internal | 3883 } } // namespace v8::internal |
| 3851 | 3884 |
| 3852 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3885 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |