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

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

Issue 6676065: Merge revision 7239 (=-7215, -7212) to trunk (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 9 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 V(IsNull) \ 115 V(IsNull) \
116 V(IsObject) \ 116 V(IsObject) \
117 V(IsSmi) \ 117 V(IsSmi) \
118 V(IsConstructCall) \ 118 V(IsConstructCall) \
119 V(JSArrayLength) \ 119 V(JSArrayLength) \
120 V(LeaveInlined) \ 120 V(LeaveInlined) \
121 V(LoadContextSlot) \ 121 V(LoadContextSlot) \
122 V(LoadElements) \ 122 V(LoadElements) \
123 V(LoadExternalArrayPointer) \ 123 V(LoadExternalArrayPointer) \
124 V(LoadFunctionPrototype) \ 124 V(LoadFunctionPrototype) \
125 V(LoadGlobalCell) \ 125 V(LoadGlobal) \
126 V(LoadGlobalGeneric) \
127 V(LoadKeyedFastElement) \ 126 V(LoadKeyedFastElement) \
128 V(LoadKeyedGeneric) \ 127 V(LoadKeyedGeneric) \
129 V(LoadNamedField) \ 128 V(LoadNamedField) \
130 V(LoadNamedGeneric) \ 129 V(LoadNamedGeneric) \
131 V(LoadPixelArrayElement) \ 130 V(LoadPixelArrayElement) \
132 V(Mod) \ 131 V(Mod) \
133 V(Mul) \ 132 V(Mul) \
134 V(ObjectLiteral) \ 133 V(ObjectLiteral) \
135 V(OsrEntry) \ 134 V(OsrEntry) \
136 V(OuterContext) \ 135 V(OuterContext) \
(...skipping 2642 matching lines...) Expand 10 before | Expand all | Expand 10 after
2779 HUnknownOSRValue() { set_representation(Representation::Tagged()); } 2778 HUnknownOSRValue() { set_representation(Representation::Tagged()); }
2780 2779
2781 virtual Representation RequiredInputRepresentation(int index) const { 2780 virtual Representation RequiredInputRepresentation(int index) const {
2782 return Representation::None(); 2781 return Representation::None();
2783 } 2782 }
2784 2783
2785 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown_osr_value") 2784 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown_osr_value")
2786 }; 2785 };
2787 2786
2788 2787
2789 class HLoadGlobalCell: public HTemplateInstruction<0> { 2788 class HLoadGlobal: public HTemplateInstruction<0> {
2790 public: 2789 public:
2791 HLoadGlobalCell(Handle<JSGlobalPropertyCell> cell, bool check_hole_value) 2790 HLoadGlobal(Handle<JSGlobalPropertyCell> cell, bool check_hole_value)
2792 : cell_(cell), check_hole_value_(check_hole_value) { 2791 : cell_(cell), check_hole_value_(check_hole_value) {
2793 set_representation(Representation::Tagged()); 2792 set_representation(Representation::Tagged());
2794 SetFlag(kUseGVN); 2793 SetFlag(kUseGVN);
2795 SetFlag(kDependsOnGlobalVars); 2794 SetFlag(kDependsOnGlobalVars);
2796 } 2795 }
2797 2796
2798 Handle<JSGlobalPropertyCell> cell() const { return cell_; } 2797 Handle<JSGlobalPropertyCell> cell() const { return cell_; }
2799 bool check_hole_value() const { return check_hole_value_; } 2798 bool check_hole_value() const { return check_hole_value_; }
2800 2799
2801 virtual void PrintDataTo(StringStream* stream); 2800 virtual void PrintDataTo(StringStream* stream);
2802 2801
2803 virtual intptr_t Hashcode() { 2802 virtual intptr_t Hashcode() {
2804 ASSERT(!Heap::allow_allocation(false)); 2803 ASSERT(!Heap::allow_allocation(false));
2805 return reinterpret_cast<intptr_t>(*cell_); 2804 return reinterpret_cast<intptr_t>(*cell_);
2806 } 2805 }
2807 2806
2808 virtual Representation RequiredInputRepresentation(int index) const { 2807 virtual Representation RequiredInputRepresentation(int index) const {
2809 return Representation::None(); 2808 return Representation::None();
2810 } 2809 }
2811 2810
2812 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load_global_cell") 2811 DECLARE_CONCRETE_INSTRUCTION(LoadGlobal, "load_global")
2813 2812
2814 protected: 2813 protected:
2815 virtual bool DataEquals(HValue* other) { 2814 virtual bool DataEquals(HValue* other) {
2816 HLoadGlobalCell* b = HLoadGlobalCell::cast(other); 2815 HLoadGlobal* b = HLoadGlobal::cast(other);
2817 return cell_.is_identical_to(b->cell()); 2816 return cell_.is_identical_to(b->cell());
2818 } 2817 }
2819 2818
2820 private: 2819 private:
2821 Handle<JSGlobalPropertyCell> cell_; 2820 Handle<JSGlobalPropertyCell> cell_;
2822 bool check_hole_value_; 2821 bool check_hole_value_;
2823 }; 2822 };
2824 2823
2825 2824
2826 class HLoadGlobalGeneric: public HBinaryOperation {
2827 public:
2828 HLoadGlobalGeneric(HValue* context,
2829 HValue* global_object,
2830 Handle<Object> name,
2831 bool for_typeof)
2832 : HBinaryOperation(context, global_object),
2833 name_(name),
2834 for_typeof_(for_typeof) {
2835 set_representation(Representation::Tagged());
2836 SetAllSideEffects();
2837 }
2838
2839 HValue* context() { return OperandAt(0); }
2840 HValue* global_object() { return OperandAt(1); }
2841 Handle<Object> name() const { return name_; }
2842 bool for_typeof() const { return for_typeof_; }
2843
2844 virtual void PrintDataTo(StringStream* stream);
2845
2846 virtual Representation RequiredInputRepresentation(int index) const {
2847 return Representation::Tagged();
2848 }
2849
2850 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load_global_generic")
2851
2852 private:
2853 Handle<Object> name_;
2854 bool for_typeof_;
2855 };
2856
2857
2858 class HStoreGlobal: public HUnaryOperation { 2825 class HStoreGlobal: public HUnaryOperation {
2859 public: 2826 public:
2860 HStoreGlobal(HValue* value, 2827 HStoreGlobal(HValue* value,
2861 Handle<JSGlobalPropertyCell> cell, 2828 Handle<JSGlobalPropertyCell> cell,
2862 bool check_hole_value) 2829 bool check_hole_value)
2863 : HUnaryOperation(value), 2830 : HUnaryOperation(value),
2864 cell_(cell), 2831 cell_(cell),
2865 check_hole_value_(check_hole_value) { 2832 check_hole_value_(check_hole_value) {
2866 SetFlag(kChangesGlobalVars); 2833 SetFlag(kChangesGlobalVars);
2867 } 2834 }
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
3512 HValue* object() { return left(); } 3479 HValue* object() { return left(); }
3513 HValue* key() { return right(); } 3480 HValue* key() { return right(); }
3514 }; 3481 };
3515 3482
3516 #undef DECLARE_INSTRUCTION 3483 #undef DECLARE_INSTRUCTION
3517 #undef DECLARE_CONCRETE_INSTRUCTION 3484 #undef DECLARE_CONCRETE_INSTRUCTION
3518 3485
3519 } } // namespace v8::internal 3486 } } // namespace v8::internal
3520 3487
3521 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 3488 #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