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

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

Issue 15932011: Don't explicitly pass requested representations to constants; implement ConstantS (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 V(ClampIToUint8) \ 80 V(ClampIToUint8) \
81 V(ClampTToUint8) \ 81 V(ClampTToUint8) \
82 V(ClassOfTestAndBranch) \ 82 V(ClassOfTestAndBranch) \
83 V(CmpConstantEqAndBranch) \ 83 V(CmpConstantEqAndBranch) \
84 V(CmpIDAndBranch) \ 84 V(CmpIDAndBranch) \
85 V(CmpObjectEqAndBranch) \ 85 V(CmpObjectEqAndBranch) \
86 V(CmpMapAndBranch) \ 86 V(CmpMapAndBranch) \
87 V(CmpT) \ 87 V(CmpT) \
88 V(ConstantD) \ 88 V(ConstantD) \
89 V(ConstantI) \ 89 V(ConstantI) \
90 V(ConstantS) \
90 V(ConstantT) \ 91 V(ConstantT) \
91 V(Context) \ 92 V(Context) \
92 V(DebugBreak) \ 93 V(DebugBreak) \
93 V(DeclareGlobals) \ 94 V(DeclareGlobals) \
94 V(DeleteProperty) \ 95 V(DeleteProperty) \
95 V(Deoptimize) \ 96 V(Deoptimize) \
96 V(DivI) \ 97 V(DivI) \
97 V(DoubleToI) \ 98 V(DoubleToI) \
98 V(DoubleToSmi) \ 99 V(DoubleToSmi) \
99 V(DummyUse) \ 100 V(DummyUse) \
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 1130
1130 class LConstantI: public LTemplateInstruction<1, 0, 0> { 1131 class LConstantI: public LTemplateInstruction<1, 0, 0> {
1131 public: 1132 public:
1132 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") 1133 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i")
1133 DECLARE_HYDROGEN_ACCESSOR(Constant) 1134 DECLARE_HYDROGEN_ACCESSOR(Constant)
1134 1135
1135 int32_t value() const { return hydrogen()->Integer32Value(); } 1136 int32_t value() const { return hydrogen()->Integer32Value(); }
1136 }; 1137 };
1137 1138
1138 1139
1140 class LConstantS: public LTemplateInstruction<1, 0, 0> {
1141 public:
1142 DECLARE_CONCRETE_INSTRUCTION(ConstantS, "constant-s")
1143 DECLARE_HYDROGEN_ACCESSOR(Constant)
1144
1145 Smi* value() const { return Smi::FromInt(hydrogen()->Integer32Value()); }
1146 };
1147
1148
1139 class LConstantD: public LTemplateInstruction<1, 0, 1> { 1149 class LConstantD: public LTemplateInstruction<1, 0, 1> {
1140 public: 1150 public:
1141 explicit LConstantD(LOperand* temp) { 1151 explicit LConstantD(LOperand* temp) {
1142 temps_[0] = temp; 1152 temps_[0] = temp;
1143 } 1153 }
1144 1154
1145 LOperand* temp() { return temps_[0]; } 1155 LOperand* temp() { return temps_[0]; }
1146 1156
1147 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d") 1157 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d")
1148 DECLARE_HYDROGEN_ACCESSOR(Constant) 1158 DECLARE_HYDROGEN_ACCESSOR(Constant)
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
2739 2749
2740 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2750 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2741 }; 2751 };
2742 2752
2743 #undef DECLARE_HYDROGEN_ACCESSOR 2753 #undef DECLARE_HYDROGEN_ACCESSOR
2744 #undef DECLARE_CONCRETE_INSTRUCTION 2754 #undef DECLARE_CONCRETE_INSTRUCTION
2745 2755
2746 } } // namespace v8::int 2756 } } // namespace v8::int
2747 2757
2748 #endif // V8_X64_LITHIUM_X64_H_ 2758 #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