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

Side by Side Diff: src/arm/lithium-arm.h

Issue 6460038: Version 3.1.3.... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
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/arm/full-codegen-arm.cc ('k') | src/arm/lithium-arm.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 23 matching lines...) Expand all
34 #include "safepoint-table.h" 34 #include "safepoint-table.h"
35 35
36 namespace v8 { 36 namespace v8 {
37 namespace internal { 37 namespace internal {
38 38
39 // Forward declarations. 39 // Forward declarations.
40 class LCodeGen; 40 class LCodeGen;
41 41
42 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \ 42 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \
43 V(ControlInstruction) \ 43 V(ControlInstruction) \
44 V(Constant) \
45 V(Call) \ 44 V(Call) \
46 V(StoreKeyed) \ 45 V(StoreKeyed) \
47 V(StoreNamed) \ 46 V(StoreNamed) \
48 LITHIUM_CONCRETE_INSTRUCTION_LIST(V) 47 LITHIUM_CONCRETE_INSTRUCTION_LIST(V)
49 48
50 49
51 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ 50 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
52 V(AccessArgumentsAt) \ 51 V(AccessArgumentsAt) \
53 V(AddI) \ 52 V(AddI) \
54 V(ApplyArguments) \ 53 V(ApplyArguments) \
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 V(StoreNamedField) \ 145 V(StoreNamedField) \
147 V(StoreNamedGeneric) \ 146 V(StoreNamedGeneric) \
148 V(StringCharCodeAt) \ 147 V(StringCharCodeAt) \
149 V(StringLength) \ 148 V(StringLength) \
150 V(SubI) \ 149 V(SubI) \
151 V(TaggedToI) \ 150 V(TaggedToI) \
152 V(Throw) \ 151 V(Throw) \
153 V(Typeof) \ 152 V(Typeof) \
154 V(TypeofIs) \ 153 V(TypeofIs) \
155 V(TypeofIsAndBranch) \ 154 V(TypeofIsAndBranch) \
155 V(IsConstructCall) \
156 V(IsConstructCallAndBranch) \
156 V(UnaryMathOperation) \ 157 V(UnaryMathOperation) \
157 V(UnknownOSRValue) \ 158 V(UnknownOSRValue) \
158 V(ValueOf) 159 V(ValueOf)
159 160
160 161
161 #define DECLARE_INSTRUCTION(type) \ 162 #define DECLARE_INSTRUCTION(type) \
162 virtual bool Is##type() const { return true; } \ 163 virtual bool Is##type() const { return true; } \
163 static L##type* cast(LInstruction* instr) { \ 164 static L##type* cast(LInstruction* instr) { \
164 ASSERT(instr->Is##type()); \ 165 ASSERT(instr->Is##type()); \
165 return reinterpret_cast<L##type*>(instr); \ 166 return reinterpret_cast<L##type*>(instr); \
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 LSubI(LOperand* left, LOperand* right) { 897 LSubI(LOperand* left, LOperand* right) {
897 inputs_[0] = left; 898 inputs_[0] = left;
898 inputs_[1] = right; 899 inputs_[1] = right;
899 } 900 }
900 901
901 DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i") 902 DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i")
902 DECLARE_HYDROGEN_ACCESSOR(Sub) 903 DECLARE_HYDROGEN_ACCESSOR(Sub)
903 }; 904 };
904 905
905 906
906 class LConstant: public LTemplateInstruction<1, 0, 0> { 907 class LConstantI: public LTemplateInstruction<1, 0, 0> {
907 DECLARE_INSTRUCTION(Constant) 908 public:
909 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i")
910 DECLARE_HYDROGEN_ACCESSOR(Constant)
911
912 int32_t value() const { return hydrogen()->Integer32Value(); }
908 }; 913 };
909 914
910 915
911 class LConstantI: public LConstant { 916 class LConstantD: public LTemplateInstruction<1, 0, 0> {
912 public: 917 public:
913 explicit LConstantI(int32_t value) : value_(value) { } 918 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d")
914 int32_t value() const { return value_; } 919 DECLARE_HYDROGEN_ACCESSOR(Constant)
915 920
916 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") 921 double value() const { return hydrogen()->DoubleValue(); }
917
918 private:
919 int32_t value_;
920 }; 922 };
921 923
922 924
923 class LConstantD: public LConstant { 925 class LConstantT: public LTemplateInstruction<1, 0, 0> {
924 public: 926 public:
925 explicit LConstantD(double value) : value_(value) { } 927 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t")
926 double value() const { return value_; } 928 DECLARE_HYDROGEN_ACCESSOR(Constant)
927 929
928 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d") 930 Handle<Object> value() const { return hydrogen()->handle(); }
929
930 private:
931 double value_;
932 }; 931 };
933 932
934 933
935 class LConstantT: public LConstant {
936 public:
937 explicit LConstantT(Handle<Object> value) : value_(value) { }
938 Handle<Object> value() const { return value_; }
939
940 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t")
941
942 private:
943 Handle<Object> value_;
944 };
945
946
947 class LBranch: public LControlInstruction<1, 0> { 934 class LBranch: public LControlInstruction<1, 0> {
948 public: 935 public:
949 explicit LBranch(LOperand* value) { 936 explicit LBranch(LOperand* value) {
950 inputs_[0] = value; 937 inputs_[0] = value;
951 } 938 }
952 939
953 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") 940 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
954 DECLARE_HYDROGEN_ACCESSOR(Value) 941 DECLARE_HYDROGEN_ACCESSOR(Value)
955 942
956 virtual void PrintDataTo(StringStream* stream); 943 virtual void PrintDataTo(StringStream* stream);
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 1696
1710 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") 1697 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch")
1711 DECLARE_HYDROGEN_ACCESSOR(TypeofIs) 1698 DECLARE_HYDROGEN_ACCESSOR(TypeofIs)
1712 1699
1713 Handle<String> type_literal() { return hydrogen()->type_literal(); } 1700 Handle<String> type_literal() { return hydrogen()->type_literal(); }
1714 1701
1715 virtual void PrintDataTo(StringStream* stream); 1702 virtual void PrintDataTo(StringStream* stream);
1716 }; 1703 };
1717 1704
1718 1705
1706 class LIsConstructCall: public LTemplateInstruction<1, 0, 0> {
1707 public:
1708 DECLARE_CONCRETE_INSTRUCTION(IsConstructCall, "is-construct-call")
1709 DECLARE_HYDROGEN_ACCESSOR(IsConstructCall)
1710 };
1711
1712
1713 class LIsConstructCallAndBranch: public LControlInstruction<0, 1> {
1714 public:
1715 explicit LIsConstructCallAndBranch(LOperand* temp) {
1716 temps_[0] = temp;
1717 }
1718
1719 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch,
1720 "is-construct-call-and-branch")
1721 };
1722
1723
1719 class LDeleteProperty: public LTemplateInstruction<1, 2, 0> { 1724 class LDeleteProperty: public LTemplateInstruction<1, 2, 0> {
1720 public: 1725 public:
1721 LDeleteProperty(LOperand* obj, LOperand* key) { 1726 LDeleteProperty(LOperand* obj, LOperand* key) {
1722 inputs_[0] = obj; 1727 inputs_[0] = obj;
1723 inputs_[1] = key; 1728 inputs_[1] = key;
1724 } 1729 }
1725 1730
1726 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property") 1731 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property")
1727 1732
1728 LOperand* object() { return inputs_[0]; } 1733 LOperand* object() { return inputs_[0]; }
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1970 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 1975 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
1971 }; 1976 };
1972 1977
1973 #undef DECLARE_HYDROGEN_ACCESSOR 1978 #undef DECLARE_HYDROGEN_ACCESSOR
1974 #undef DECLARE_INSTRUCTION 1979 #undef DECLARE_INSTRUCTION
1975 #undef DECLARE_CONCRETE_INSTRUCTION 1980 #undef DECLARE_CONCRETE_INSTRUCTION
1976 1981
1977 } } // namespace v8::internal 1982 } } // namespace v8::internal
1978 1983
1979 #endif // V8_ARM_LITHIUM_ARM_H_ 1984 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698