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

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

Issue 7618040: Version 3.5.5. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 4 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/hydrogen-instructions.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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 V(CompareObjectEqAndBranch) \ 97 V(CompareObjectEqAndBranch) \
98 V(CompareMap) \ 98 V(CompareMap) \
99 V(CompareConstantEqAndBranch) \ 99 V(CompareConstantEqAndBranch) \
100 V(Constant) \ 100 V(Constant) \
101 V(Context) \ 101 V(Context) \
102 V(DeleteProperty) \ 102 V(DeleteProperty) \
103 V(Deoptimize) \ 103 V(Deoptimize) \
104 V(Div) \ 104 V(Div) \
105 V(ElementsKind) \ 105 V(ElementsKind) \
106 V(EnterInlined) \ 106 V(EnterInlined) \
107 V(ExternalArrayLength) \ 107 V(FixedArrayBaseLength) \
108 V(FixedArrayLength) \
109 V(ForceRepresentation) \ 108 V(ForceRepresentation) \
110 V(FunctionLiteral) \ 109 V(FunctionLiteral) \
111 V(GetCachedArrayIndex) \ 110 V(GetCachedArrayIndex) \
112 V(GlobalObject) \ 111 V(GlobalObject) \
113 V(GlobalReceiver) \ 112 V(GlobalReceiver) \
114 V(Goto) \ 113 V(Goto) \
115 V(HasCachedArrayIndexAndBranch) \ 114 V(HasCachedArrayIndexAndBranch) \
116 V(HasInstanceTypeAndBranch) \ 115 V(HasInstanceTypeAndBranch) \
117 V(In) \ 116 V(In) \
118 V(InstanceOf) \ 117 V(InstanceOf) \
(...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 1694
1696 HValue* value() { return OperandAt(0); } 1695 HValue* value() { return OperandAt(0); }
1697 1696
1698 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength) 1697 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength)
1699 1698
1700 protected: 1699 protected:
1701 virtual bool DataEquals(HValue* other) { return true; } 1700 virtual bool DataEquals(HValue* other) { return true; }
1702 }; 1701 };
1703 1702
1704 1703
1705 class HFixedArrayLength: public HUnaryOperation { 1704 class HFixedArrayBaseLength: public HUnaryOperation {
1706 public: 1705 public:
1707 explicit HFixedArrayLength(HValue* value) : HUnaryOperation(value) { 1706 explicit HFixedArrayBaseLength(HValue* value) : HUnaryOperation(value) {
1708 set_representation(Representation::Tagged()); 1707 set_representation(Representation::Tagged());
1709 SetFlag(kUseGVN); 1708 SetFlag(kUseGVN);
1710 SetFlag(kDependsOnArrayLengths); 1709 SetFlag(kDependsOnArrayLengths);
1711 } 1710 }
1712 1711
1713 virtual Representation RequiredInputRepresentation(int index) const { 1712 virtual Representation RequiredInputRepresentation(int index) const {
1714 return Representation::Tagged(); 1713 return Representation::Tagged();
1715 } 1714 }
1716 1715
1717 DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength) 1716 DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength)
1718
1719 protected:
1720 virtual bool DataEquals(HValue* other) { return true; }
1721 };
1722
1723
1724 class HExternalArrayLength: public HUnaryOperation {
1725 public:
1726 explicit HExternalArrayLength(HValue* value) : HUnaryOperation(value) {
1727 set_representation(Representation::Integer32());
1728 // The result of this instruction is idempotent as long as its inputs don't
1729 // change. The length of a pixel array cannot change once set, so it's not
1730 // necessary to introduce a kDependsOnArrayLengths or any other dependency.
1731 SetFlag(kUseGVN);
1732 }
1733
1734 virtual Representation RequiredInputRepresentation(int index) const {
1735 return Representation::Tagged();
1736 }
1737
1738 DECLARE_CONCRETE_INSTRUCTION(ExternalArrayLength)
1739 1717
1740 protected: 1718 protected:
1741 virtual bool DataEquals(HValue* other) { return true; } 1719 virtual bool DataEquals(HValue* other) { return true; }
1742 }; 1720 };
1743 1721
1744 1722
1745 class HElementsKind: public HUnaryOperation { 1723 class HElementsKind: public HUnaryOperation {
1746 public: 1724 public:
1747 explicit HElementsKind(HValue* value) : HUnaryOperation(value) { 1725 explicit HElementsKind(HValue* value) : HUnaryOperation(value) {
1748 set_representation(Representation::Integer32()); 1726 set_representation(Representation::Integer32());
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
2464 SetOperandAt(0, index); 2442 SetOperandAt(0, index);
2465 SetOperandAt(1, length); 2443 SetOperandAt(1, length);
2466 set_representation(Representation::Integer32()); 2444 set_representation(Representation::Integer32());
2467 SetFlag(kUseGVN); 2445 SetFlag(kUseGVN);
2468 } 2446 }
2469 2447
2470 virtual Representation RequiredInputRepresentation(int index) const { 2448 virtual Representation RequiredInputRepresentation(int index) const {
2471 return Representation::Integer32(); 2449 return Representation::Integer32();
2472 } 2450 }
2473 2451
2452 virtual void PrintDataTo(StringStream* stream);
2453
2474 HValue* index() { return OperandAt(0); } 2454 HValue* index() { return OperandAt(0); }
2475 HValue* length() { return OperandAt(1); } 2455 HValue* length() { return OperandAt(1); }
2476 2456
2477 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck) 2457 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck)
2478 2458
2479 protected: 2459 protected:
2480 virtual bool DataEquals(HValue* other) { return true; } 2460 virtual bool DataEquals(HValue* other) { return true; }
2481 }; 2461 };
2482 2462
2483 2463
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
3431 HValue* context() { return OperandAt(0); } 3411 HValue* context() { return OperandAt(0); }
3432 HValue* object() { return OperandAt(1); } 3412 HValue* object() { return OperandAt(1); }
3433 ZoneMapList* types() { return &types_; } 3413 ZoneMapList* types() { return &types_; }
3434 Handle<String> name() { return name_; } 3414 Handle<String> name() { return name_; }
3435 bool need_generic() { return need_generic_; } 3415 bool need_generic() { return need_generic_; }
3436 3416
3437 virtual Representation RequiredInputRepresentation(int index) const { 3417 virtual Representation RequiredInputRepresentation(int index) const {
3438 return Representation::Tagged(); 3418 return Representation::Tagged();
3439 } 3419 }
3440 3420
3421 virtual void PrintDataTo(StringStream* stream);
3422
3441 DECLARE_CONCRETE_INSTRUCTION(LoadNamedFieldPolymorphic) 3423 DECLARE_CONCRETE_INSTRUCTION(LoadNamedFieldPolymorphic)
3442 3424
3443 static const int kMaxLoadPolymorphism = 4; 3425 static const int kMaxLoadPolymorphism = 4;
3444 3426
3445 protected: 3427 protected:
3446 virtual bool DataEquals(HValue* value); 3428 virtual bool DataEquals(HValue* value);
3447 3429
3448 private: 3430 private:
3449 ZoneMapList types_; 3431 ZoneMapList types_;
3450 Handle<String> name_; 3432 Handle<String> name_;
(...skipping 13 matching lines...) Expand all
3464 } 3446 }
3465 3447
3466 HValue* context() { return OperandAt(0); } 3448 HValue* context() { return OperandAt(0); }
3467 HValue* object() { return OperandAt(1); } 3449 HValue* object() { return OperandAt(1); }
3468 Handle<Object> name() const { return name_; } 3450 Handle<Object> name() const { return name_; }
3469 3451
3470 virtual Representation RequiredInputRepresentation(int index) const { 3452 virtual Representation RequiredInputRepresentation(int index) const {
3471 return Representation::Tagged(); 3453 return Representation::Tagged();
3472 } 3454 }
3473 3455
3456 virtual void PrintDataTo(StringStream* stream);
3457
3474 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric) 3458 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric)
3475 3459
3476 private: 3460 private:
3477 Handle<Object> name_; 3461 Handle<Object> name_;
3478 }; 3462 };
3479 3463
3480 3464
3481 class HLoadFunctionPrototype: public HUnaryOperation { 3465 class HLoadFunctionPrototype: public HUnaryOperation {
3482 public: 3466 public:
3483 explicit HLoadFunctionPrototype(HValue* function) 3467 explicit HLoadFunctionPrototype(HValue* function)
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
4203 4187
4204 DECLARE_CONCRETE_INSTRUCTION(In) 4188 DECLARE_CONCRETE_INSTRUCTION(In)
4205 }; 4189 };
4206 4190
4207 #undef DECLARE_INSTRUCTION 4191 #undef DECLARE_INSTRUCTION
4208 #undef DECLARE_CONCRETE_INSTRUCTION 4192 #undef DECLARE_CONCRETE_INSTRUCTION
4209 4193
4210 } } // namespace v8::internal 4194 } } // namespace v8::internal
4211 4195
4212 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 4196 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698