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

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

Issue 9572008: Implement date library functions in C++. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 V(DateField) \ 181 V(DateField)
182 V(SetDateField)
183 182
184 183
185 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 184 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
186 virtual Opcode opcode() const { return LInstruction::k##type; } \ 185 virtual Opcode opcode() const { return LInstruction::k##type; } \
187 virtual void CompileToNative(LCodeGen* generator); \ 186 virtual void CompileToNative(LCodeGen* generator); \
188 virtual const char* Mnemonic() const { return mnemonic; } \ 187 virtual const char* Mnemonic() const { return mnemonic; } \
189 static L##type* cast(LInstruction* instr) { \ 188 static L##type* cast(LInstruction* instr) { \
190 ASSERT(instr->Is##type()); \ 189 ASSERT(instr->Is##type()); \
191 return reinterpret_cast<L##type*>(instr); \ 190 return reinterpret_cast<L##type*>(instr); \
192 } 191 }
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 inputs_[0] = value; 983 inputs_[0] = value;
985 } 984 }
986 985
987 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") 986 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of")
988 DECLARE_HYDROGEN_ACCESSOR(ValueOf) 987 DECLARE_HYDROGEN_ACCESSOR(ValueOf)
989 }; 988 };
990 989
991 990
992 class LDateField: public LTemplateInstruction<1, 1, 0> { 991 class LDateField: public LTemplateInstruction<1, 1, 0> {
993 public: 992 public:
994 LDateField(LOperand* date, int index) : index_(index) { 993 LDateField(LOperand* date, Smi* index) : index_(index) {
995 inputs_[0] = date; 994 inputs_[0] = date;
996 } 995 }
997 996
998 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "date-field") 997 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "date-field")
999 DECLARE_HYDROGEN_ACCESSOR(ValueOf) 998 DECLARE_HYDROGEN_ACCESSOR(ValueOf)
1000 999
1001 int index() const { return index_; } 1000 Smi* index() const { return index_; }
1002 1001
1003 private: 1002 private:
1004 int index_; 1003 Smi* index_;
1005 }; 1004 };
1006 1005
1007 1006
1008 class LSetDateField: public LTemplateInstruction<1, 2, 0> {
1009 public:
1010 LSetDateField(LOperand* date, LOperand* value, int index) : index_(index) {
1011 inputs_[0] = date;
1012 inputs_[1] = value;
1013 }
1014
1015 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-set-field")
1016 DECLARE_HYDROGEN_ACCESSOR(DateField)
1017
1018 int index() const { return index_; }
1019
1020 private:
1021 int index_;
1022 };
1023
1024
1025 class LThrow: public LTemplateInstruction<0, 1, 0> { 1007 class LThrow: public LTemplateInstruction<0, 1, 0> {
1026 public: 1008 public:
1027 explicit LThrow(LOperand* value) { 1009 explicit LThrow(LOperand* value) {
1028 inputs_[0] = value; 1010 inputs_[0] = value;
1029 } 1011 }
1030 1012
1031 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") 1013 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw")
1032 }; 1014 };
1033 1015
1034 1016
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
2372 2354
2373 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2355 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2374 }; 2356 };
2375 2357
2376 #undef DECLARE_HYDROGEN_ACCESSOR 2358 #undef DECLARE_HYDROGEN_ACCESSOR
2377 #undef DECLARE_CONCRETE_INSTRUCTION 2359 #undef DECLARE_CONCRETE_INSTRUCTION
2378 2360
2379 } } // namespace v8::int 2361 } } // namespace v8::int
2380 2362
2381 #endif // V8_X64_LITHIUM_X64_H_ 2363 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698