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

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

Issue 296113008: Allow HPushArgument to handle more than one argument. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase, and use int instead of unsigned Created 6 years, 7 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/lithium-arm.cc ('k') | src/arm64/lithium-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_ARM64_LITHIUM_ARM64_H_ 5 #ifndef V8_ARM64_LITHIUM_ARM64_H_
6 #define V8_ARM64_LITHIUM_ARM64_H_ 6 #define V8_ARM64_LITHIUM_ARM64_H_
7 7
8 #include "hydrogen.h" 8 #include "hydrogen.h"
9 #include "lithium-allocator.h" 9 #include "lithium-allocator.h"
10 #include "lithium.h" 10 #include "lithium.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 V(ModI) \ 129 V(ModI) \
130 V(MulConstIS) \ 130 V(MulConstIS) \
131 V(MulI) \ 131 V(MulI) \
132 V(MulS) \ 132 V(MulS) \
133 V(NumberTagD) \ 133 V(NumberTagD) \
134 V(NumberTagU) \ 134 V(NumberTagU) \
135 V(NumberUntagD) \ 135 V(NumberUntagD) \
136 V(OsrEntry) \ 136 V(OsrEntry) \
137 V(Parameter) \ 137 V(Parameter) \
138 V(Power) \ 138 V(Power) \
139 V(PushArgument) \ 139 V(PreparePushArguments) \
140 V(PushArguments) \
140 V(RegExpLiteral) \ 141 V(RegExpLiteral) \
141 V(Return) \ 142 V(Return) \
142 V(SeqStringGetChar) \ 143 V(SeqStringGetChar) \
143 V(SeqStringSetChar) \ 144 V(SeqStringSetChar) \
144 V(ShiftI) \ 145 V(ShiftI) \
145 V(ShiftS) \ 146 V(ShiftS) \
146 V(SmiTag) \ 147 V(SmiTag) \
147 V(SmiUntag) \ 148 V(SmiUntag) \
148 V(StackCheck) \ 149 V(StackCheck) \
149 V(StoreCodeEntry) \ 150 V(StoreCodeEntry) \
(...skipping 2092 matching lines...) Expand 10 before | Expand all | Expand 10 after
2242 } 2243 }
2243 2244
2244 LOperand* left() { return inputs_[0]; } 2245 LOperand* left() { return inputs_[0]; }
2245 LOperand* right() { return inputs_[1]; } 2246 LOperand* right() { return inputs_[1]; }
2246 2247
2247 DECLARE_CONCRETE_INSTRUCTION(Power, "power") 2248 DECLARE_CONCRETE_INSTRUCTION(Power, "power")
2248 DECLARE_HYDROGEN_ACCESSOR(Power) 2249 DECLARE_HYDROGEN_ACCESSOR(Power)
2249 }; 2250 };
2250 2251
2251 2252
2252 class LPushArgument V8_FINAL : public LTemplateInstruction<0, 1, 0> { 2253 class LPreparePushArguments V8_FINAL : public LTemplateInstruction<0, 0, 0> {
2253 public: 2254 public:
2254 explicit LPushArgument(LOperand* value) { 2255 explicit LPreparePushArguments(int argc) : argc_(argc) {}
2255 inputs_[0] = value;
2256 }
2257 2256
2258 LOperand* value() { return inputs_[0]; } 2257 inline int argc() const { return argc_; }
2259 2258
2260 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") 2259 DECLARE_CONCRETE_INSTRUCTION(PreparePushArguments, "prepare-push-arguments")
2260
2261 protected:
2262 int argc_;
2261 }; 2263 };
2262 2264
2263 2265
2266 class LPushArguments V8_FINAL : public LTemplateResultInstruction<0> {
2267 public:
2268 explicit LPushArguments(Zone* zone,
2269 int capacity = kRecommendedMaxPushedArgs)
2270 : zone_(zone), inputs_(capacity, zone) {}
2271
2272 LOperand* argument(int i) { return inputs_[i]; }
2273 int ArgumentCount() const { return inputs_.length(); }
2274
2275 void AddArgument(LOperand* arg) { inputs_.Add(arg, zone_); }
2276
2277 DECLARE_CONCRETE_INSTRUCTION(PushArguments, "push-arguments")
2278
2279 // It is better to limit the number of arguments pushed simultaneously to
2280 // avoid pressure on the register allocator.
2281 static const int kRecommendedMaxPushedArgs = 4;
2282 bool ShouldSplitPush() const {
2283 return inputs_.length() >= kRecommendedMaxPushedArgs;
2284 }
2285
2286 protected:
2287 Zone* zone_;
2288 ZoneList<LOperand*> inputs_;
2289
2290 private:
2291 // Iterator support.
2292 virtual int InputCount() V8_FINAL V8_OVERRIDE { return inputs_.length(); }
2293 virtual LOperand* InputAt(int i) V8_FINAL V8_OVERRIDE { return inputs_[i]; }
2294
2295 virtual int TempCount() V8_FINAL V8_OVERRIDE { return 0; }
2296 virtual LOperand* TempAt(int i) V8_FINAL V8_OVERRIDE { return NULL; }
2297 };
2298
2299
2264 class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2300 class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2265 public: 2301 public:
2266 explicit LRegExpLiteral(LOperand* context) { 2302 explicit LRegExpLiteral(LOperand* context) {
2267 inputs_[0] = context; 2303 inputs_[0] = context;
2268 } 2304 }
2269 2305
2270 LOperand* context() { return inputs_[0]; } 2306 LOperand* context() { return inputs_[0]; }
2271 2307
2272 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") 2308 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal")
2273 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) 2309 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral)
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
3189 3225
3190 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 3226 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
3191 }; 3227 };
3192 3228
3193 #undef DECLARE_HYDROGEN_ACCESSOR 3229 #undef DECLARE_HYDROGEN_ACCESSOR
3194 #undef DECLARE_CONCRETE_INSTRUCTION 3230 #undef DECLARE_CONCRETE_INSTRUCTION
3195 3231
3196 } } // namespace v8::internal 3232 } } // namespace v8::internal
3197 3233
3198 #endif // V8_ARM64_LITHIUM_ARM64_H_ 3234 #endif // V8_ARM64_LITHIUM_ARM64_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm64/lithium-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698