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

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

Issue 9668045: MIPS: Port Date-related changes. (Closed)
Patch Set: Created 8 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
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 V(ToFastProperties) \ 170 V(ToFastProperties) \
171 V(TransitionElementsKind) \ 171 V(TransitionElementsKind) \
172 V(Typeof) \ 172 V(Typeof) \
173 V(TypeofIsAndBranch) \ 173 V(TypeofIsAndBranch) \
174 V(UnaryMathOperation) \ 174 V(UnaryMathOperation) \
175 V(UnknownOSRValue) \ 175 V(UnknownOSRValue) \
176 V(ValueOf) \ 176 V(ValueOf) \
177 V(ForInPrepareMap) \ 177 V(ForInPrepareMap) \
178 V(ForInCacheArray) \ 178 V(ForInCacheArray) \
179 V(CheckMapValue) \ 179 V(CheckMapValue) \
180 V(LoadFieldByIndex) 180 V(LoadFieldByIndex) \
181 181 V(DateField)
182 182
183 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 183 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
184 virtual Opcode opcode() const { return LInstruction::k##type; } \ 184 virtual Opcode opcode() const { return LInstruction::k##type; } \
185 virtual void CompileToNative(LCodeGen* generator); \ 185 virtual void CompileToNative(LCodeGen* generator); \
186 virtual const char* Mnemonic() const { return mnemonic; } \ 186 virtual const char* Mnemonic() const { return mnemonic; } \
187 static L##type* cast(LInstruction* instr) { \ 187 static L##type* cast(LInstruction* instr) { \
188 ASSERT(instr->Is##type()); \ 188 ASSERT(instr->Is##type()); \
189 return reinterpret_cast<L##type*>(instr); \ 189 return reinterpret_cast<L##type*>(instr); \
190 } 190 }
191 191
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 LValueOf(LOperand* value, LOperand* temp) { 982 LValueOf(LOperand* value, LOperand* temp) {
983 inputs_[0] = value; 983 inputs_[0] = value;
984 temps_[0] = temp; 984 temps_[0] = temp;
985 } 985 }
986 986
987 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") 987 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of")
988 DECLARE_HYDROGEN_ACCESSOR(ValueOf) 988 DECLARE_HYDROGEN_ACCESSOR(ValueOf)
989 }; 989 };
990 990
991 991
992 class LDateField: public LTemplateInstruction<1, 1, 1> {
993 public:
994 LDateField(LOperand* date, LOperand* temp, Smi* index) : index_(index) {
995 inputs_[0] = date;
996 temps_[0] = temp;
997 }
998
999 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "date-field")
1000 DECLARE_HYDROGEN_ACCESSOR(ValueOf)
1001 Smi* index() const { return index_; }
1002
1003 private:
1004 Smi* index_;
1005 };
1006
1007
1008 class LSetDateField: public LTemplateInstruction<1, 2, 1> {
ulan 2012/03/12 08:43:33 I will remove this class since it is not used anym
1009 public:
1010 LSetDateField(LOperand* date, LOperand* value, LOperand* temp, int index)
1011 : index_(index) {
1012 inputs_[0] = date;
1013 inputs_[1] = value;
1014 temps_[0] = temp;
1015 }
1016
1017 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-set-field")
1018 DECLARE_HYDROGEN_ACCESSOR(DateField)
1019
1020 int index() const { return index_; }
1021
1022 private:
1023 int index_;
1024 };
1025
1026
992 class LThrow: public LTemplateInstruction<0, 1, 0> { 1027 class LThrow: public LTemplateInstruction<0, 1, 0> {
993 public: 1028 public:
994 explicit LThrow(LOperand* value) { 1029 explicit LThrow(LOperand* value) {
995 inputs_[0] = value; 1030 inputs_[0] = value;
996 } 1031 }
997 1032
998 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") 1033 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw")
999 }; 1034 };
1000 1035
1001 1036
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 2388
2354 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2389 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2355 }; 2390 };
2356 2391
2357 #undef DECLARE_HYDROGEN_ACCESSOR 2392 #undef DECLARE_HYDROGEN_ACCESSOR
2358 #undef DECLARE_CONCRETE_INSTRUCTION 2393 #undef DECLARE_CONCRETE_INSTRUCTION
2359 2394
2360 } } // namespace v8::internal 2395 } } // namespace v8::internal
2361 2396
2362 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2397 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698