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

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

Issue 797943002: Consistently use only one of virtual/OVERRIDE/FINAL. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed temporary hack. Created 6 years 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/arm/code-stubs-arm.h ('k') | src/arm/lithium-codegen-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_ARM_LITHIUM_ARM_H_ 5 #ifndef V8_ARM_LITHIUM_ARM_H_
6 #define V8_ARM_LITHIUM_ARM_H_ 6 #define V8_ARM_LITHIUM_ARM_H_
7 7
8 #include "src/hydrogen.h" 8 #include "src/hydrogen.h"
9 #include "src/lithium.h" 9 #include "src/lithium.h"
10 #include "src/lithium-allocator.h" 10 #include "src/lithium-allocator.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 V(ToFastProperties) \ 159 V(ToFastProperties) \
160 V(TransitionElementsKind) \ 160 V(TransitionElementsKind) \
161 V(TrapAllocationMemento) \ 161 V(TrapAllocationMemento) \
162 V(Typeof) \ 162 V(Typeof) \
163 V(TypeofIsAndBranch) \ 163 V(TypeofIsAndBranch) \
164 V(Uint32ToDouble) \ 164 V(Uint32ToDouble) \
165 V(UnknownOSRValue) \ 165 V(UnknownOSRValue) \
166 V(WrapReceiver) 166 V(WrapReceiver)
167 167
168 168
169 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 169 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
170 virtual Opcode opcode() const FINAL OVERRIDE { \ 170 Opcode opcode() const FINAL { return LInstruction::k##type; } \
171 return LInstruction::k##type; \ 171 void CompileToNative(LCodeGen* generator) FINAL; \
172 } \ 172 const char* Mnemonic() const FINAL { return mnemonic; } \
173 virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \ 173 static L##type* cast(LInstruction* instr) { \
174 virtual const char* Mnemonic() const FINAL OVERRIDE { \ 174 DCHECK(instr->Is##type()); \
175 return mnemonic; \ 175 return reinterpret_cast<L##type*>(instr); \
176 } \
177 static L##type* cast(LInstruction* instr) { \
178 DCHECK(instr->Is##type()); \
179 return reinterpret_cast<L##type*>(instr); \
180 } 176 }
181 177
182 178
183 #define DECLARE_HYDROGEN_ACCESSOR(type) \ 179 #define DECLARE_HYDROGEN_ACCESSOR(type) \
184 H##type* hydrogen() const { \ 180 H##type* hydrogen() const { \
185 return H##type::cast(hydrogen_value()); \ 181 return H##type::cast(hydrogen_value()); \
186 } 182 }
187 183
188 184
189 class LInstruction : public ZoneObject { 185 class LInstruction : public ZoneObject {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 int bit_field_; 280 int bit_field_;
285 }; 281 };
286 282
287 283
288 // R = number of result operands (0 or 1). 284 // R = number of result operands (0 or 1).
289 template<int R> 285 template<int R>
290 class LTemplateResultInstruction : public LInstruction { 286 class LTemplateResultInstruction : public LInstruction {
291 public: 287 public:
292 // Allow 0 or 1 output operands. 288 // Allow 0 or 1 output operands.
293 STATIC_ASSERT(R == 0 || R == 1); 289 STATIC_ASSERT(R == 0 || R == 1);
294 virtual bool HasResult() const FINAL OVERRIDE { 290 bool HasResult() const FINAL { return R != 0 && result() != NULL; }
295 return R != 0 && result() != NULL;
296 }
297 void set_result(LOperand* operand) { results_[0] = operand; } 291 void set_result(LOperand* operand) { results_[0] = operand; }
298 LOperand* result() const { return results_[0]; } 292 LOperand* result() const OVERRIDE { return results_[0]; }
299 293
300 protected: 294 protected:
301 EmbeddedContainer<LOperand*, R> results_; 295 EmbeddedContainer<LOperand*, R> results_;
302 }; 296 };
303 297
304 298
305 // R = number of result operands (0 or 1). 299 // R = number of result operands (0 or 1).
306 // I = number of input operands. 300 // I = number of input operands.
307 // T = number of temporary operands. 301 // T = number of temporary operands.
308 template<int R, int I, int T> 302 template<int R, int I, int T>
309 class LTemplateInstruction : public LTemplateResultInstruction<R> { 303 class LTemplateInstruction : public LTemplateResultInstruction<R> {
310 protected: 304 protected:
311 EmbeddedContainer<LOperand*, I> inputs_; 305 EmbeddedContainer<LOperand*, I> inputs_;
312 EmbeddedContainer<LOperand*, T> temps_; 306 EmbeddedContainer<LOperand*, T> temps_;
313 307
314 private: 308 private:
315 // Iterator support. 309 // Iterator support.
316 virtual int InputCount() FINAL OVERRIDE { return I; } 310 int InputCount() FINAL { return I; }
317 virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; } 311 LOperand* InputAt(int i) FINAL { return inputs_[i]; }
318 312
319 virtual int TempCount() FINAL OVERRIDE { return T; } 313 int TempCount() FINAL { return T; }
320 virtual LOperand* TempAt(int i) FINAL OVERRIDE { return temps_[i]; } 314 LOperand* TempAt(int i) FINAL { return temps_[i]; }
321 }; 315 };
322 316
323 317
324 class LGap : public LTemplateInstruction<0, 0, 0> { 318 class LGap : public LTemplateInstruction<0, 0, 0> {
325 public: 319 public:
326 explicit LGap(HBasicBlock* block) 320 explicit LGap(HBasicBlock* block)
327 : block_(block) { 321 : block_(block) {
328 parallel_moves_[BEFORE] = NULL; 322 parallel_moves_[BEFORE] = NULL;
329 parallel_moves_[START] = NULL; 323 parallel_moves_[START] = NULL;
330 parallel_moves_[END] = NULL; 324 parallel_moves_[END] = NULL;
331 parallel_moves_[AFTER] = NULL; 325 parallel_moves_[AFTER] = NULL;
332 } 326 }
333 327
334 // Can't use the DECLARE-macro here because of sub-classes. 328 // Can't use the DECLARE-macro here because of sub-classes.
335 virtual bool IsGap() const OVERRIDE { return true; } 329 bool IsGap() const OVERRIDE { return true; }
336 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 330 void PrintDataTo(StringStream* stream) OVERRIDE;
337 static LGap* cast(LInstruction* instr) { 331 static LGap* cast(LInstruction* instr) {
338 DCHECK(instr->IsGap()); 332 DCHECK(instr->IsGap());
339 return reinterpret_cast<LGap*>(instr); 333 return reinterpret_cast<LGap*>(instr);
340 } 334 }
341 335
342 bool IsRedundant() const; 336 bool IsRedundant() const;
343 337
344 HBasicBlock* block() const { return block_; } 338 HBasicBlock* block() const { return block_; }
345 339
346 enum InnerPosition { 340 enum InnerPosition {
(...skipping 19 matching lines...) Expand all
366 private: 360 private:
367 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; 361 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1];
368 HBasicBlock* block_; 362 HBasicBlock* block_;
369 }; 363 };
370 364
371 365
372 class LInstructionGap FINAL : public LGap { 366 class LInstructionGap FINAL : public LGap {
373 public: 367 public:
374 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } 368 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
375 369
376 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { 370 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
377 return !IsRedundant(); 371 return !IsRedundant();
378 } 372 }
379 373
380 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") 374 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap")
381 }; 375 };
382 376
383 377
384 class LGoto FINAL : public LTemplateInstruction<0, 0, 0> { 378 class LGoto FINAL : public LTemplateInstruction<0, 0, 0> {
385 public: 379 public:
386 explicit LGoto(HBasicBlock* block) : block_(block) { } 380 explicit LGoto(HBasicBlock* block) : block_(block) { }
387 381
388 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE; 382 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
389 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") 383 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
390 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 384 void PrintDataTo(StringStream* stream) OVERRIDE;
391 virtual bool IsControl() const OVERRIDE { return true; } 385 bool IsControl() const OVERRIDE { return true; }
392 386
393 int block_id() const { return block_->block_id(); } 387 int block_id() const { return block_->block_id(); }
394 388
395 private: 389 private:
396 HBasicBlock* block_; 390 HBasicBlock* block_;
397 }; 391 };
398 392
399 393
400 class LLazyBailout FINAL : public LTemplateInstruction<0, 0, 0> { 394 class LLazyBailout FINAL : public LTemplateInstruction<0, 0, 0> {
401 public: 395 public:
(...skipping 22 matching lines...) Expand all
424 public: 418 public:
425 explicit LDummyUse(LOperand* value) { 419 explicit LDummyUse(LOperand* value) {
426 inputs_[0] = value; 420 inputs_[0] = value;
427 } 421 }
428 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") 422 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use")
429 }; 423 };
430 424
431 425
432 class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> { 426 class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> {
433 public: 427 public:
434 virtual bool IsControl() const OVERRIDE { return true; } 428 bool IsControl() const OVERRIDE { return true; }
435 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") 429 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
436 DECLARE_HYDROGEN_ACCESSOR(Deoptimize) 430 DECLARE_HYDROGEN_ACCESSOR(Deoptimize)
437 }; 431 };
438 432
439 433
440 class LLabel FINAL : public LGap { 434 class LLabel FINAL : public LGap {
441 public: 435 public:
442 explicit LLabel(HBasicBlock* block) 436 explicit LLabel(HBasicBlock* block)
443 : LGap(block), replacement_(NULL) { } 437 : LGap(block), replacement_(NULL) { }
444 438
445 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { 439 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
446 return false;
447 }
448 DECLARE_CONCRETE_INSTRUCTION(Label, "label") 440 DECLARE_CONCRETE_INSTRUCTION(Label, "label")
449 441
450 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 442 void PrintDataTo(StringStream* stream) OVERRIDE;
451 443
452 int block_id() const { return block()->block_id(); } 444 int block_id() const { return block()->block_id(); }
453 bool is_loop_header() const { return block()->IsLoopHeader(); } 445 bool is_loop_header() const { return block()->IsLoopHeader(); }
454 bool is_osr_entry() const { return block()->is_osr_entry(); } 446 bool is_osr_entry() const { return block()->is_osr_entry(); }
455 Label* label() { return &label_; } 447 Label* label() { return &label_; }
456 LLabel* replacement() const { return replacement_; } 448 LLabel* replacement() const { return replacement_; }
457 void set_replacement(LLabel* label) { replacement_ = label; } 449 void set_replacement(LLabel* label) { replacement_ = label; }
458 bool HasReplacement() const { return replacement_ != NULL; } 450 bool HasReplacement() const { return replacement_ != NULL; }
459 451
460 private: 452 private:
461 Label label_; 453 Label label_;
462 LLabel* replacement_; 454 LLabel* replacement_;
463 }; 455 };
464 456
465 457
466 class LParameter FINAL : public LTemplateInstruction<1, 0, 0> { 458 class LParameter FINAL : public LTemplateInstruction<1, 0, 0> {
467 public: 459 public:
468 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } 460 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
469 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") 461 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
470 }; 462 };
471 463
472 464
473 class LCallStub FINAL : public LTemplateInstruction<1, 1, 0> { 465 class LCallStub FINAL : public LTemplateInstruction<1, 1, 0> {
474 public: 466 public:
475 explicit LCallStub(LOperand* context) { 467 explicit LCallStub(LOperand* context) {
476 inputs_[0] = context; 468 inputs_[0] = context;
477 } 469 }
478 470
(...skipping 19 matching lines...) Expand all
498 LOperand* receiver() { return inputs_[1]; } 490 LOperand* receiver() { return inputs_[1]; }
499 LOperand* name() { return inputs_[2]; } 491 LOperand* name() { return inputs_[2]; }
500 492
501 DECLARE_CONCRETE_INSTRUCTION(TailCallThroughMegamorphicCache, 493 DECLARE_CONCRETE_INSTRUCTION(TailCallThroughMegamorphicCache,
502 "tail-call-through-megamorphic-cache") 494 "tail-call-through-megamorphic-cache")
503 DECLARE_HYDROGEN_ACCESSOR(TailCallThroughMegamorphicCache) 495 DECLARE_HYDROGEN_ACCESSOR(TailCallThroughMegamorphicCache)
504 }; 496 };
505 497
506 class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> { 498 class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> {
507 public: 499 public:
508 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { 500 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
509 return false;
510 }
511 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") 501 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
512 }; 502 };
513 503
514 504
515 template<int I, int T> 505 template<int I, int T>
516 class LControlInstruction : public LTemplateInstruction<0, I, T> { 506 class LControlInstruction : public LTemplateInstruction<0, I, T> {
517 public: 507 public:
518 LControlInstruction() : false_label_(NULL), true_label_(NULL) { } 508 LControlInstruction() : false_label_(NULL), true_label_(NULL) { }
519 509
520 virtual bool IsControl() const FINAL OVERRIDE { return true; } 510 bool IsControl() const FINAL { return true; }
521 511
522 int SuccessorCount() { return hydrogen()->SuccessorCount(); } 512 int SuccessorCount() { return hydrogen()->SuccessorCount(); }
523 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } 513 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
524 514
525 int TrueDestination(LChunk* chunk) { 515 int TrueDestination(LChunk* chunk) {
526 return chunk->LookupDestination(true_block_id()); 516 return chunk->LookupDestination(true_block_id());
527 } 517 }
528 int FalseDestination(LChunk* chunk) { 518 int FalseDestination(LChunk* chunk) {
529 return chunk->LookupDestination(false_block_id()); 519 return chunk->LookupDestination(false_block_id());
530 } 520 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 inputs_[1] = length; 589 inputs_[1] = length;
600 inputs_[2] = index; 590 inputs_[2] = index;
601 } 591 }
602 592
603 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") 593 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at")
604 594
605 LOperand* arguments() { return inputs_[0]; } 595 LOperand* arguments() { return inputs_[0]; }
606 LOperand* length() { return inputs_[1]; } 596 LOperand* length() { return inputs_[1]; }
607 LOperand* index() { return inputs_[2]; } 597 LOperand* index() { return inputs_[2]; }
608 598
609 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 599 void PrintDataTo(StringStream* stream) OVERRIDE;
610 }; 600 };
611 601
612 602
613 class LArgumentsLength FINAL : public LTemplateInstruction<1, 1, 0> { 603 class LArgumentsLength FINAL : public LTemplateInstruction<1, 1, 0> {
614 public: 604 public:
615 explicit LArgumentsLength(LOperand* elements) { 605 explicit LArgumentsLength(LOperand* elements) {
616 inputs_[0] = elements; 606 inputs_[0] = elements;
617 } 607 }
618 608
619 LOperand* elements() { return inputs_[0]; } 609 LOperand* elements() { return inputs_[0]; }
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 852
863 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch, 853 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch,
864 "compare-numeric-and-branch") 854 "compare-numeric-and-branch")
865 DECLARE_HYDROGEN_ACCESSOR(CompareNumericAndBranch) 855 DECLARE_HYDROGEN_ACCESSOR(CompareNumericAndBranch)
866 856
867 Token::Value op() const { return hydrogen()->token(); } 857 Token::Value op() const { return hydrogen()->token(); }
868 bool is_double() const { 858 bool is_double() const {
869 return hydrogen()->representation().IsDouble(); 859 return hydrogen()->representation().IsDouble();
870 } 860 }
871 861
872 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 862 void PrintDataTo(StringStream* stream) OVERRIDE;
873 }; 863 };
874 864
875 865
876 class LMathFloor FINAL : public LTemplateInstruction<1, 1, 0> { 866 class LMathFloor FINAL : public LTemplateInstruction<1, 1, 0> {
877 public: 867 public:
878 explicit LMathFloor(LOperand* value) { 868 explicit LMathFloor(LOperand* value) {
879 inputs_[0] = value; 869 inputs_[0] = value;
880 } 870 }
881 871
882 LOperand* value() { return inputs_[0]; } 872 LOperand* value() { return inputs_[0]; }
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 inputs_[0] = value; 1036 inputs_[0] = value;
1047 temps_[0] = temp; 1037 temps_[0] = temp;
1048 } 1038 }
1049 1039
1050 LOperand* value() { return inputs_[0]; } 1040 LOperand* value() { return inputs_[0]; }
1051 LOperand* temp() { return temps_[0]; } 1041 LOperand* temp() { return temps_[0]; }
1052 1042
1053 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") 1043 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
1054 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) 1044 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
1055 1045
1056 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1046 void PrintDataTo(StringStream* stream) OVERRIDE;
1057 }; 1047 };
1058 1048
1059 1049
1060 class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> { 1050 class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> {
1061 public: 1051 public:
1062 LIsStringAndBranch(LOperand* value, LOperand* temp) { 1052 LIsStringAndBranch(LOperand* value, LOperand* temp) {
1063 inputs_[0] = value; 1053 inputs_[0] = value;
1064 temps_[0] = temp; 1054 temps_[0] = temp;
1065 } 1055 }
1066 1056
1067 LOperand* value() { return inputs_[0]; } 1057 LOperand* value() { return inputs_[0]; }
1068 LOperand* temp() { return temps_[0]; } 1058 LOperand* temp() { return temps_[0]; }
1069 1059
1070 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") 1060 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
1071 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) 1061 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
1072 1062
1073 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1063 void PrintDataTo(StringStream* stream) OVERRIDE;
1074 }; 1064 };
1075 1065
1076 1066
1077 class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> { 1067 class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> {
1078 public: 1068 public:
1079 explicit LIsSmiAndBranch(LOperand* value) { 1069 explicit LIsSmiAndBranch(LOperand* value) {
1080 inputs_[0] = value; 1070 inputs_[0] = value;
1081 } 1071 }
1082 1072
1083 LOperand* value() { return inputs_[0]; } 1073 LOperand* value() { return inputs_[0]; }
1084 1074
1085 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") 1075 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
1086 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) 1076 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
1087 1077
1088 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1078 void PrintDataTo(StringStream* stream) OVERRIDE;
1089 }; 1079 };
1090 1080
1091 1081
1092 class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> { 1082 class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> {
1093 public: 1083 public:
1094 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { 1084 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) {
1095 inputs_[0] = value; 1085 inputs_[0] = value;
1096 temps_[0] = temp; 1086 temps_[0] = temp;
1097 } 1087 }
1098 1088
1099 LOperand* value() { return inputs_[0]; } 1089 LOperand* value() { return inputs_[0]; }
1100 LOperand* temp() { return temps_[0]; } 1090 LOperand* temp() { return temps_[0]; }
1101 1091
1102 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, 1092 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch,
1103 "is-undetectable-and-branch") 1093 "is-undetectable-and-branch")
1104 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) 1094 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
1105 1095
1106 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1096 void PrintDataTo(StringStream* stream) OVERRIDE;
1107 }; 1097 };
1108 1098
1109 1099
1110 class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> { 1100 class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> {
1111 public: 1101 public:
1112 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) { 1102 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) {
1113 inputs_[0] = context; 1103 inputs_[0] = context;
1114 inputs_[1] = left; 1104 inputs_[1] = left;
1115 inputs_[2] = right; 1105 inputs_[2] = right;
1116 } 1106 }
1117 1107
1118 LOperand* context() { return inputs_[0]; } 1108 LOperand* context() { return inputs_[0]; }
1119 LOperand* left() { return inputs_[1]; } 1109 LOperand* left() { return inputs_[1]; }
1120 LOperand* right() { return inputs_[2]; } 1110 LOperand* right() { return inputs_[2]; }
1121 1111
1122 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, 1112 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch,
1123 "string-compare-and-branch") 1113 "string-compare-and-branch")
1124 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) 1114 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch)
1125 1115
1126 Token::Value op() const { return hydrogen()->token(); } 1116 Token::Value op() const { return hydrogen()->token(); }
1127 1117
1128 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1118 void PrintDataTo(StringStream* stream) OVERRIDE;
1129 }; 1119 };
1130 1120
1131 1121
1132 class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 0> { 1122 class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 0> {
1133 public: 1123 public:
1134 explicit LHasInstanceTypeAndBranch(LOperand* value) { 1124 explicit LHasInstanceTypeAndBranch(LOperand* value) {
1135 inputs_[0] = value; 1125 inputs_[0] = value;
1136 } 1126 }
1137 1127
1138 LOperand* value() { return inputs_[0]; } 1128 LOperand* value() { return inputs_[0]; }
1139 1129
1140 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, 1130 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch,
1141 "has-instance-type-and-branch") 1131 "has-instance-type-and-branch")
1142 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) 1132 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
1143 1133
1144 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1134 void PrintDataTo(StringStream* stream) OVERRIDE;
1145 }; 1135 };
1146 1136
1147 1137
1148 class LGetCachedArrayIndex FINAL : public LTemplateInstruction<1, 1, 0> { 1138 class LGetCachedArrayIndex FINAL : public LTemplateInstruction<1, 1, 0> {
1149 public: 1139 public:
1150 explicit LGetCachedArrayIndex(LOperand* value) { 1140 explicit LGetCachedArrayIndex(LOperand* value) {
1151 inputs_[0] = value; 1141 inputs_[0] = value;
1152 } 1142 }
1153 1143
1154 LOperand* value() { return inputs_[0]; } 1144 LOperand* value() { return inputs_[0]; }
1155 1145
1156 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") 1146 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index")
1157 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) 1147 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex)
1158 }; 1148 };
1159 1149
1160 1150
1161 class LHasCachedArrayIndexAndBranch FINAL 1151 class LHasCachedArrayIndexAndBranch FINAL
1162 : public LControlInstruction<1, 0> { 1152 : public LControlInstruction<1, 0> {
1163 public: 1153 public:
1164 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { 1154 explicit LHasCachedArrayIndexAndBranch(LOperand* value) {
1165 inputs_[0] = value; 1155 inputs_[0] = value;
1166 } 1156 }
1167 1157
1168 LOperand* value() { return inputs_[0]; } 1158 LOperand* value() { return inputs_[0]; }
1169 1159
1170 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, 1160 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch,
1171 "has-cached-array-index-and-branch") 1161 "has-cached-array-index-and-branch")
1172 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch) 1162 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
1173 1163
1174 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1164 void PrintDataTo(StringStream* stream) OVERRIDE;
1175 }; 1165 };
1176 1166
1177 1167
1178 class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 1> { 1168 class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 1> {
1179 public: 1169 public:
1180 LClassOfTestAndBranch(LOperand* value, LOperand* temp) { 1170 LClassOfTestAndBranch(LOperand* value, LOperand* temp) {
1181 inputs_[0] = value; 1171 inputs_[0] = value;
1182 temps_[0] = temp; 1172 temps_[0] = temp;
1183 } 1173 }
1184 1174
1185 LOperand* value() { return inputs_[0]; } 1175 LOperand* value() { return inputs_[0]; }
1186 LOperand* temp() { return temps_[0]; } 1176 LOperand* temp() { return temps_[0]; }
1187 1177
1188 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, 1178 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch,
1189 "class-of-test-and-branch") 1179 "class-of-test-and-branch")
1190 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) 1180 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
1191 1181
1192 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1182 void PrintDataTo(StringStream* stream) OVERRIDE;
1193 }; 1183 };
1194 1184
1195 1185
1196 class LCmpT FINAL : public LTemplateInstruction<1, 3, 0> { 1186 class LCmpT FINAL : public LTemplateInstruction<1, 3, 0> {
1197 public: 1187 public:
1198 LCmpT(LOperand* context, LOperand* left, LOperand* right) { 1188 LCmpT(LOperand* context, LOperand* left, LOperand* right) {
1199 inputs_[0] = context; 1189 inputs_[0] = context;
1200 inputs_[1] = left; 1190 inputs_[1] = left;
1201 inputs_[2] = right; 1191 inputs_[2] = right;
1202 } 1192 }
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 public: 1384 public:
1395 explicit LBranch(LOperand* value) { 1385 explicit LBranch(LOperand* value) {
1396 inputs_[0] = value; 1386 inputs_[0] = value;
1397 } 1387 }
1398 1388
1399 LOperand* value() { return inputs_[0]; } 1389 LOperand* value() { return inputs_[0]; }
1400 1390
1401 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") 1391 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
1402 DECLARE_HYDROGEN_ACCESSOR(Branch) 1392 DECLARE_HYDROGEN_ACCESSOR(Branch)
1403 1393
1404 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1394 void PrintDataTo(StringStream* stream) OVERRIDE;
1405 }; 1395 };
1406 1396
1407 1397
1408 class LCmpMapAndBranch FINAL : public LControlInstruction<1, 1> { 1398 class LCmpMapAndBranch FINAL : public LControlInstruction<1, 1> {
1409 public: 1399 public:
1410 LCmpMapAndBranch(LOperand* value, LOperand* temp) { 1400 LCmpMapAndBranch(LOperand* value, LOperand* temp) {
1411 inputs_[0] = value; 1401 inputs_[0] = value;
1412 temps_[0] = temp; 1402 temps_[0] = temp;
1413 } 1403 }
1414 1404
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 LArithmeticD(Token::Value op, LOperand* left, LOperand* right) 1529 LArithmeticD(Token::Value op, LOperand* left, LOperand* right)
1540 : op_(op) { 1530 : op_(op) {
1541 inputs_[0] = left; 1531 inputs_[0] = left;
1542 inputs_[1] = right; 1532 inputs_[1] = right;
1543 } 1533 }
1544 1534
1545 Token::Value op() const { return op_; } 1535 Token::Value op() const { return op_; }
1546 LOperand* left() { return inputs_[0]; } 1536 LOperand* left() { return inputs_[0]; }
1547 LOperand* right() { return inputs_[1]; } 1537 LOperand* right() { return inputs_[1]; }
1548 1538
1549 virtual Opcode opcode() const OVERRIDE { 1539 Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; }
1550 return LInstruction::kArithmeticD; 1540 void CompileToNative(LCodeGen* generator) OVERRIDE;
1551 } 1541 const char* Mnemonic() const OVERRIDE;
1552 virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
1553 virtual const char* Mnemonic() const OVERRIDE;
1554 1542
1555 private: 1543 private:
1556 Token::Value op_; 1544 Token::Value op_;
1557 }; 1545 };
1558 1546
1559 1547
1560 class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> { 1548 class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> {
1561 public: 1549 public:
1562 LArithmeticT(Token::Value op, 1550 LArithmeticT(Token::Value op,
1563 LOperand* context, 1551 LOperand* context,
1564 LOperand* left, 1552 LOperand* left,
1565 LOperand* right) 1553 LOperand* right)
1566 : op_(op) { 1554 : op_(op) {
1567 inputs_[0] = context; 1555 inputs_[0] = context;
1568 inputs_[1] = left; 1556 inputs_[1] = left;
1569 inputs_[2] = right; 1557 inputs_[2] = right;
1570 } 1558 }
1571 1559
1572 LOperand* context() { return inputs_[0]; } 1560 LOperand* context() { return inputs_[0]; }
1573 LOperand* left() { return inputs_[1]; } 1561 LOperand* left() { return inputs_[1]; }
1574 LOperand* right() { return inputs_[2]; } 1562 LOperand* right() { return inputs_[2]; }
1575 Token::Value op() const { return op_; } 1563 Token::Value op() const { return op_; }
1576 1564
1577 virtual Opcode opcode() const OVERRIDE { 1565 Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticT; }
1578 return LInstruction::kArithmeticT; 1566 void CompileToNative(LCodeGen* generator) OVERRIDE;
1579 } 1567 const char* Mnemonic() const OVERRIDE;
1580 virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
1581 virtual const char* Mnemonic() const OVERRIDE;
1582 1568
1583 private: 1569 private:
1584 Token::Value op_; 1570 Token::Value op_;
1585 }; 1571 };
1586 1572
1587 1573
1588 class LReturn FINAL : public LTemplateInstruction<0, 3, 0> { 1574 class LReturn FINAL : public LTemplateInstruction<0, 3, 0> {
1589 public: 1575 public:
1590 LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) { 1576 LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) {
1591 inputs_[0] = value; 1577 inputs_[0] = value;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 bool is_fixed_typed_array() const { 1666 bool is_fixed_typed_array() const {
1681 return hydrogen()->is_fixed_typed_array(); 1667 return hydrogen()->is_fixed_typed_array();
1682 } 1668 }
1683 bool is_typed_elements() const { 1669 bool is_typed_elements() const {
1684 return is_external() || is_fixed_typed_array(); 1670 return is_external() || is_fixed_typed_array();
1685 } 1671 }
1686 1672
1687 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") 1673 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
1688 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) 1674 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
1689 1675
1690 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1676 void PrintDataTo(StringStream* stream) OVERRIDE;
1691 uint32_t base_offset() const { return hydrogen()->base_offset(); } 1677 uint32_t base_offset() const { return hydrogen()->base_offset(); }
1692 }; 1678 };
1693 1679
1694 1680
1695 class LLoadKeyedGeneric FINAL : public LTemplateInstruction<1, 3, 1> { 1681 class LLoadKeyedGeneric FINAL : public LTemplateInstruction<1, 3, 1> {
1696 public: 1682 public:
1697 LLoadKeyedGeneric(LOperand* context, LOperand* object, LOperand* key, 1683 LLoadKeyedGeneric(LOperand* context, LOperand* object, LOperand* key,
1698 LOperand* vector) { 1684 LOperand* vector) {
1699 inputs_[0] = context; 1685 inputs_[0] = context;
1700 inputs_[1] = object; 1686 inputs_[1] = object;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 inputs_[0] = context; 1747 inputs_[0] = context;
1762 } 1748 }
1763 1749
1764 LOperand* context() { return inputs_[0]; } 1750 LOperand* context() { return inputs_[0]; }
1765 1751
1766 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") 1752 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot")
1767 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) 1753 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot)
1768 1754
1769 int slot_index() { return hydrogen()->slot_index(); } 1755 int slot_index() { return hydrogen()->slot_index(); }
1770 1756
1771 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1757 void PrintDataTo(StringStream* stream) OVERRIDE;
1772 }; 1758 };
1773 1759
1774 1760
1775 class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 0> { 1761 class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 0> {
1776 public: 1762 public:
1777 LStoreContextSlot(LOperand* context, LOperand* value) { 1763 LStoreContextSlot(LOperand* context, LOperand* value) {
1778 inputs_[0] = context; 1764 inputs_[0] = context;
1779 inputs_[1] = value; 1765 inputs_[1] = value;
1780 } 1766 }
1781 1767
1782 LOperand* context() { return inputs_[0]; } 1768 LOperand* context() { return inputs_[0]; }
1783 LOperand* value() { return inputs_[1]; } 1769 LOperand* value() { return inputs_[1]; }
1784 1770
1785 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") 1771 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot")
1786 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) 1772 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot)
1787 1773
1788 int slot_index() { return hydrogen()->slot_index(); } 1774 int slot_index() { return hydrogen()->slot_index(); }
1789 1775
1790 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1776 void PrintDataTo(StringStream* stream) OVERRIDE;
1791 }; 1777 };
1792 1778
1793 1779
1794 class LPushArgument FINAL : public LTemplateInstruction<0, 1, 0> { 1780 class LPushArgument FINAL : public LTemplateInstruction<0, 1, 0> {
1795 public: 1781 public:
1796 explicit LPushArgument(LOperand* value) { 1782 explicit LPushArgument(LOperand* value) {
1797 inputs_[0] = value; 1783 inputs_[0] = value;
1798 } 1784 }
1799 1785
1800 LOperand* value() { return inputs_[0]; } 1786 LOperand* value() { return inputs_[0]; }
(...skipping 18 matching lines...) Expand all
1819 class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 0> { 1805 class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 0> {
1820 public: 1806 public:
1821 LStoreCodeEntry(LOperand* function, LOperand* code_object) { 1807 LStoreCodeEntry(LOperand* function, LOperand* code_object) {
1822 inputs_[0] = function; 1808 inputs_[0] = function;
1823 inputs_[1] = code_object; 1809 inputs_[1] = code_object;
1824 } 1810 }
1825 1811
1826 LOperand* function() { return inputs_[0]; } 1812 LOperand* function() { return inputs_[0]; }
1827 LOperand* code_object() { return inputs_[1]; } 1813 LOperand* code_object() { return inputs_[1]; }
1828 1814
1829 virtual void PrintDataTo(StringStream* stream); 1815 void PrintDataTo(StringStream* stream) OVERRIDE;
1830 1816
1831 DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry") 1817 DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry")
1832 DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry) 1818 DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry)
1833 }; 1819 };
1834 1820
1835 1821
1836 class LInnerAllocatedObject FINAL: public LTemplateInstruction<1, 2, 0> { 1822 class LInnerAllocatedObject FINAL: public LTemplateInstruction<1, 2, 0> {
1837 public: 1823 public:
1838 LInnerAllocatedObject(LOperand* base_object, LOperand* offset) { 1824 LInnerAllocatedObject(LOperand* base_object, LOperand* offset) {
1839 inputs_[0] = base_object; 1825 inputs_[0] = base_object;
1840 inputs_[1] = offset; 1826 inputs_[1] = offset;
1841 } 1827 }
1842 1828
1843 LOperand* base_object() const { return inputs_[0]; } 1829 LOperand* base_object() const { return inputs_[0]; }
1844 LOperand* offset() const { return inputs_[1]; } 1830 LOperand* offset() const { return inputs_[1]; }
1845 1831
1846 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1832 void PrintDataTo(StringStream* stream) OVERRIDE;
1847 1833
1848 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object") 1834 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object")
1849 }; 1835 };
1850 1836
1851 1837
1852 class LThisFunction FINAL : public LTemplateInstruction<1, 0, 0> { 1838 class LThisFunction FINAL : public LTemplateInstruction<1, 0, 0> {
1853 public: 1839 public:
1854 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") 1840 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function")
1855 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) 1841 DECLARE_HYDROGEN_ACCESSOR(ThisFunction)
1856 }; 1842 };
(...skipping 23 matching lines...) Expand all
1880 public: 1866 public:
1881 explicit LCallJSFunction(LOperand* function) { 1867 explicit LCallJSFunction(LOperand* function) {
1882 inputs_[0] = function; 1868 inputs_[0] = function;
1883 } 1869 }
1884 1870
1885 LOperand* function() { return inputs_[0]; } 1871 LOperand* function() { return inputs_[0]; }
1886 1872
1887 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function") 1873 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function")
1888 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction) 1874 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction)
1889 1875
1890 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1876 void PrintDataTo(StringStream* stream) OVERRIDE;
1891 1877
1892 int arity() const { return hydrogen()->argument_count() - 1; } 1878 int arity() const { return hydrogen()->argument_count() - 1; }
1893 }; 1879 };
1894 1880
1895 1881
1896 class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> { 1882 class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
1897 public: 1883 public:
1898 LCallWithDescriptor(CallInterfaceDescriptor descriptor, 1884 LCallWithDescriptor(CallInterfaceDescriptor descriptor,
1899 const ZoneList<LOperand*>& operands, Zone* zone) 1885 const ZoneList<LOperand*>& operands, Zone* zone)
1900 : descriptor_(descriptor), 1886 : descriptor_(descriptor),
1901 inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { 1887 inputs_(descriptor.GetRegisterParameterCount() + 1, zone) {
1902 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); 1888 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length());
1903 inputs_.AddAll(operands, zone); 1889 inputs_.AddAll(operands, zone);
1904 } 1890 }
1905 1891
1906 LOperand* target() const { return inputs_[0]; } 1892 LOperand* target() const { return inputs_[0]; }
1907 1893
1908 const CallInterfaceDescriptor descriptor() { return descriptor_; } 1894 const CallInterfaceDescriptor descriptor() { return descriptor_; }
1909 1895
1910 private: 1896 private:
1911 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") 1897 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
1912 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) 1898 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor)
1913 1899
1914 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1900 void PrintDataTo(StringStream* stream) OVERRIDE;
1915 1901
1916 int arity() const { return hydrogen()->argument_count() - 1; } 1902 int arity() const { return hydrogen()->argument_count() - 1; }
1917 1903
1918 CallInterfaceDescriptor descriptor_; 1904 CallInterfaceDescriptor descriptor_;
1919 ZoneList<LOperand*> inputs_; 1905 ZoneList<LOperand*> inputs_;
1920 1906
1921 // Iterator support. 1907 // Iterator support.
1922 virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); } 1908 int InputCount() FINAL { return inputs_.length(); }
1923 virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; } 1909 LOperand* InputAt(int i) FINAL { return inputs_[i]; }
1924 1910
1925 virtual int TempCount() FINAL OVERRIDE { return 0; } 1911 int TempCount() FINAL { return 0; }
1926 virtual LOperand* TempAt(int i) FINAL OVERRIDE { return NULL; } 1912 LOperand* TempAt(int i) FINAL { return NULL; }
1927 }; 1913 };
1928 1914
1929 1915
1930 class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> { 1916 class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> {
1931 public: 1917 public:
1932 LInvokeFunction(LOperand* context, LOperand* function) { 1918 LInvokeFunction(LOperand* context, LOperand* function) {
1933 inputs_[0] = context; 1919 inputs_[0] = context;
1934 inputs_[1] = function; 1920 inputs_[1] = function;
1935 } 1921 }
1936 1922
1937 LOperand* context() { return inputs_[0]; } 1923 LOperand* context() { return inputs_[0]; }
1938 LOperand* function() { return inputs_[1]; } 1924 LOperand* function() { return inputs_[1]; }
1939 1925
1940 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") 1926 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
1941 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) 1927 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
1942 1928
1943 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1929 void PrintDataTo(StringStream* stream) OVERRIDE;
1944 1930
1945 int arity() const { return hydrogen()->argument_count() - 1; } 1931 int arity() const { return hydrogen()->argument_count() - 1; }
1946 }; 1932 };
1947 1933
1948 1934
1949 class LCallFunction FINAL : public LTemplateInstruction<1, 2, 0> { 1935 class LCallFunction FINAL : public LTemplateInstruction<1, 2, 0> {
1950 public: 1936 public:
1951 LCallFunction(LOperand* context, LOperand* function) { 1937 LCallFunction(LOperand* context, LOperand* function) {
1952 inputs_[0] = context; 1938 inputs_[0] = context;
1953 inputs_[1] = function; 1939 inputs_[1] = function;
(...skipping 15 matching lines...) Expand all
1969 inputs_[0] = context; 1955 inputs_[0] = context;
1970 inputs_[1] = constructor; 1956 inputs_[1] = constructor;
1971 } 1957 }
1972 1958
1973 LOperand* context() { return inputs_[0]; } 1959 LOperand* context() { return inputs_[0]; }
1974 LOperand* constructor() { return inputs_[1]; } 1960 LOperand* constructor() { return inputs_[1]; }
1975 1961
1976 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") 1962 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
1977 DECLARE_HYDROGEN_ACCESSOR(CallNew) 1963 DECLARE_HYDROGEN_ACCESSOR(CallNew)
1978 1964
1979 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1965 void PrintDataTo(StringStream* stream) OVERRIDE;
1980 1966
1981 int arity() const { return hydrogen()->argument_count() - 1; } 1967 int arity() const { return hydrogen()->argument_count() - 1; }
1982 }; 1968 };
1983 1969
1984 1970
1985 class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> { 1971 class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> {
1986 public: 1972 public:
1987 LCallNewArray(LOperand* context, LOperand* constructor) { 1973 LCallNewArray(LOperand* context, LOperand* constructor) {
1988 inputs_[0] = context; 1974 inputs_[0] = context;
1989 inputs_[1] = constructor; 1975 inputs_[1] = constructor;
1990 } 1976 }
1991 1977
1992 LOperand* context() { return inputs_[0]; } 1978 LOperand* context() { return inputs_[0]; }
1993 LOperand* constructor() { return inputs_[1]; } 1979 LOperand* constructor() { return inputs_[1]; }
1994 1980
1995 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") 1981 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
1996 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) 1982 DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
1997 1983
1998 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1984 void PrintDataTo(StringStream* stream) OVERRIDE;
1999 1985
2000 int arity() const { return hydrogen()->argument_count() - 1; } 1986 int arity() const { return hydrogen()->argument_count() - 1; }
2001 }; 1987 };
2002 1988
2003 1989
2004 class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> { 1990 class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> {
2005 public: 1991 public:
2006 explicit LCallRuntime(LOperand* context) { 1992 explicit LCallRuntime(LOperand* context) {
2007 inputs_[0] = context; 1993 inputs_[0] = context;
2008 } 1994 }
2009 1995
2010 LOperand* context() { return inputs_[0]; } 1996 LOperand* context() { return inputs_[0]; }
2011 1997
2012 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") 1998 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
2013 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) 1999 DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
2014 2000
2015 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE { 2001 bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
2016 return save_doubles() == kDontSaveFPRegs; 2002 return save_doubles() == kDontSaveFPRegs;
2017 } 2003 }
2018 2004
2019 const Runtime::Function* function() const { return hydrogen()->function(); } 2005 const Runtime::Function* function() const { return hydrogen()->function(); }
2020 int arity() const { return hydrogen()->argument_count(); } 2006 int arity() const { return hydrogen()->argument_count(); }
2021 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } 2007 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); }
2022 }; 2008 };
2023 2009
2024 2010
2025 class LInteger32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> { 2011 class LInteger32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
2199 temps_[0] = temp; 2185 temps_[0] = temp;
2200 } 2186 }
2201 2187
2202 LOperand* object() { return inputs_[0]; } 2188 LOperand* object() { return inputs_[0]; }
2203 LOperand* value() { return inputs_[1]; } 2189 LOperand* value() { return inputs_[1]; }
2204 LOperand* temp() { return temps_[0]; } 2190 LOperand* temp() { return temps_[0]; }
2205 2191
2206 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") 2192 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
2207 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) 2193 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
2208 2194
2209 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 2195 void PrintDataTo(StringStream* stream) OVERRIDE;
2210 2196
2211 Representation representation() const { 2197 Representation representation() const {
2212 return hydrogen()->field_representation(); 2198 return hydrogen()->field_representation();
2213 } 2199 }
2214 }; 2200 };
2215 2201
2216 2202
2217 class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> { 2203 class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> {
2218 public: 2204 public:
2219 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { 2205 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) {
2220 inputs_[0] = context; 2206 inputs_[0] = context;
2221 inputs_[1] = object; 2207 inputs_[1] = object;
2222 inputs_[2] = value; 2208 inputs_[2] = value;
2223 } 2209 }
2224 2210
2225 LOperand* context() { return inputs_[0]; } 2211 LOperand* context() { return inputs_[0]; }
2226 LOperand* object() { return inputs_[1]; } 2212 LOperand* object() { return inputs_[1]; }
2227 LOperand* value() { return inputs_[2]; } 2213 LOperand* value() { return inputs_[2]; }
2228 2214
2229 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 2215 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
2230 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 2216 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
2231 2217
2232 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 2218 void PrintDataTo(StringStream* stream) OVERRIDE;
2233 2219
2234 Handle<Object> name() const { return hydrogen()->name(); } 2220 Handle<Object> name() const { return hydrogen()->name(); }
2235 StrictMode strict_mode() { return hydrogen()->strict_mode(); } 2221 StrictMode strict_mode() { return hydrogen()->strict_mode(); }
2236 }; 2222 };
2237 2223
2238 2224
2239 class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> { 2225 class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> {
2240 public: 2226 public:
2241 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { 2227 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) {
2242 inputs_[0] = object; 2228 inputs_[0] = object;
(...skipping 11 matching lines...) Expand all
2254 LOperand* elements() { return inputs_[0]; } 2240 LOperand* elements() { return inputs_[0]; }
2255 LOperand* key() { return inputs_[1]; } 2241 LOperand* key() { return inputs_[1]; }
2256 LOperand* value() { return inputs_[2]; } 2242 LOperand* value() { return inputs_[2]; }
2257 ElementsKind elements_kind() const { 2243 ElementsKind elements_kind() const {
2258 return hydrogen()->elements_kind(); 2244 return hydrogen()->elements_kind();
2259 } 2245 }
2260 2246
2261 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") 2247 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
2262 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) 2248 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
2263 2249
2264 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 2250 void PrintDataTo(StringStream* stream) OVERRIDE;
2265 bool NeedsCanonicalization() { 2251 bool NeedsCanonicalization() {
2266 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() || 2252 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() ||
2267 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) { 2253 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) {
2268 return false; 2254 return false;
2269 } 2255 }
2270 return hydrogen()->NeedsCanonicalization(); 2256 return hydrogen()->NeedsCanonicalization();
2271 } 2257 }
2272 uint32_t base_offset() const { return hydrogen()->base_offset(); } 2258 uint32_t base_offset() const { return hydrogen()->base_offset(); }
2273 }; 2259 };
2274 2260
(...skipping 11 matching lines...) Expand all
2286 } 2272 }
2287 2273
2288 LOperand* context() { return inputs_[0]; } 2274 LOperand* context() { return inputs_[0]; }
2289 LOperand* object() { return inputs_[1]; } 2275 LOperand* object() { return inputs_[1]; }
2290 LOperand* key() { return inputs_[2]; } 2276 LOperand* key() { return inputs_[2]; }
2291 LOperand* value() { return inputs_[3]; } 2277 LOperand* value() { return inputs_[3]; }
2292 2278
2293 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 2279 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
2294 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) 2280 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
2295 2281
2296 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 2282 void PrintDataTo(StringStream* stream) OVERRIDE;
2297 2283
2298 StrictMode strict_mode() { return hydrogen()->strict_mode(); } 2284 StrictMode strict_mode() { return hydrogen()->strict_mode(); }
2299 }; 2285 };
2300 2286
2301 2287
2302 class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 1> { 2288 class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 1> {
2303 public: 2289 public:
2304 LTransitionElementsKind(LOperand* object, 2290 LTransitionElementsKind(LOperand* object,
2305 LOperand* context, 2291 LOperand* context,
2306 LOperand* new_map_temp) { 2292 LOperand* new_map_temp) {
2307 inputs_[0] = object; 2293 inputs_[0] = object;
2308 inputs_[1] = context; 2294 inputs_[1] = context;
2309 temps_[0] = new_map_temp; 2295 temps_[0] = new_map_temp;
2310 } 2296 }
2311 2297
2312 LOperand* context() { return inputs_[1]; } 2298 LOperand* context() { return inputs_[1]; }
2313 LOperand* object() { return inputs_[0]; } 2299 LOperand* object() { return inputs_[0]; }
2314 LOperand* new_map_temp() { return temps_[0]; } 2300 LOperand* new_map_temp() { return temps_[0]; }
2315 2301
2316 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, 2302 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind,
2317 "transition-elements-kind") 2303 "transition-elements-kind")
2318 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) 2304 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
2319 2305
2320 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 2306 void PrintDataTo(StringStream* stream) OVERRIDE;
2321 2307
2322 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } 2308 Handle<Map> original_map() { return hydrogen()->original_map().handle(); }
2323 Handle<Map> transitioned_map() { 2309 Handle<Map> transitioned_map() {
2324 return hydrogen()->transitioned_map().handle(); 2310 return hydrogen()->transitioned_map().handle();
2325 } 2311 }
2326 ElementsKind from_kind() { return hydrogen()->from_kind(); } 2312 ElementsKind from_kind() { return hydrogen()->from_kind(); }
2327 ElementsKind to_kind() { return hydrogen()->to_kind(); } 2313 ElementsKind to_kind() { return hydrogen()->to_kind(); }
2328 }; 2314 };
2329 2315
2330 2316
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
2604 inputs_[0] = value; 2590 inputs_[0] = value;
2605 } 2591 }
2606 2592
2607 LOperand* value() { return inputs_[0]; } 2593 LOperand* value() { return inputs_[0]; }
2608 2594
2609 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") 2595 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch")
2610 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch) 2596 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch)
2611 2597
2612 Handle<String> type_literal() { return hydrogen()->type_literal(); } 2598 Handle<String> type_literal() { return hydrogen()->type_literal(); }
2613 2599
2614 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 2600 void PrintDataTo(StringStream* stream) OVERRIDE;
2615 }; 2601 };
2616 2602
2617 2603
2618 class LIsConstructCallAndBranch FINAL : public LControlInstruction<0, 1> { 2604 class LIsConstructCallAndBranch FINAL : public LControlInstruction<0, 1> {
2619 public: 2605 public:
2620 explicit LIsConstructCallAndBranch(LOperand* temp) { 2606 explicit LIsConstructCallAndBranch(LOperand* temp) {
2621 temps_[0] = temp; 2607 temps_[0] = temp;
2622 } 2608 }
2623 2609
2624 LOperand* temp() { return temps_[0]; } 2610 LOperand* temp() { return temps_[0]; }
2625 2611
2626 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, 2612 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch,
2627 "is-construct-call-and-branch") 2613 "is-construct-call-and-branch")
2628 }; 2614 };
2629 2615
2630 2616
2631 class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> { 2617 class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> {
2632 public: 2618 public:
2633 LOsrEntry() {} 2619 LOsrEntry() {}
2634 2620
2635 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { 2621 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
2636 return false;
2637 }
2638 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") 2622 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
2639 }; 2623 };
2640 2624
2641 2625
2642 class LStackCheck FINAL : public LTemplateInstruction<0, 1, 0> { 2626 class LStackCheck FINAL : public LTemplateInstruction<0, 1, 0> {
2643 public: 2627 public:
2644 explicit LStackCheck(LOperand* context) { 2628 explicit LStackCheck(LOperand* context) {
2645 inputs_[0] = context; 2629 inputs_[0] = context;
2646 } 2630 }
2647 2631
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2832 2816
2833 // An input operand in a register or a constant operand. 2817 // An input operand in a register or a constant operand.
2834 MUST_USE_RESULT LOperand* UseRegisterOrConstant(HValue* value); 2818 MUST_USE_RESULT LOperand* UseRegisterOrConstant(HValue* value);
2835 MUST_USE_RESULT LOperand* UseRegisterOrConstantAtStart(HValue* value); 2819 MUST_USE_RESULT LOperand* UseRegisterOrConstantAtStart(HValue* value);
2836 2820
2837 // An input operand in a constant operand. 2821 // An input operand in a constant operand.
2838 MUST_USE_RESULT LOperand* UseConstant(HValue* value); 2822 MUST_USE_RESULT LOperand* UseConstant(HValue* value);
2839 2823
2840 // An input operand in register, stack slot or a constant operand. 2824 // An input operand in register, stack slot or a constant operand.
2841 // Will not be moved to a register even if one is freely available. 2825 // Will not be moved to a register even if one is freely available.
2842 virtual MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE; 2826 MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
2843 2827
2844 // Temporary operand that must be in a register. 2828 // Temporary operand that must be in a register.
2845 MUST_USE_RESULT LUnallocated* TempRegister(); 2829 MUST_USE_RESULT LUnallocated* TempRegister();
2846 MUST_USE_RESULT LUnallocated* TempDoubleRegister(); 2830 MUST_USE_RESULT LUnallocated* TempDoubleRegister();
2847 MUST_USE_RESULT LOperand* FixedTemp(Register reg); 2831 MUST_USE_RESULT LOperand* FixedTemp(Register reg);
2848 MUST_USE_RESULT LOperand* FixedTemp(DoubleRegister reg); 2832 MUST_USE_RESULT LOperand* FixedTemp(DoubleRegister reg);
2849 2833
2850 // Methods for setting up define-use relationships. 2834 // Methods for setting up define-use relationships.
2851 // Return the same instruction that they are passed. 2835 // Return the same instruction that they are passed.
2852 LInstruction* Define(LTemplateResultInstruction<1>* instr, 2836 LInstruction* Define(LTemplateResultInstruction<1>* instr,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2889 2873
2890 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2874 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2891 }; 2875 };
2892 2876
2893 #undef DECLARE_HYDROGEN_ACCESSOR 2877 #undef DECLARE_HYDROGEN_ACCESSOR
2894 #undef DECLARE_CONCRETE_INSTRUCTION 2878 #undef DECLARE_CONCRETE_INSTRUCTION
2895 2879
2896 } } // namespace v8::internal 2880 } } // namespace v8::internal
2897 2881
2898 #endif // V8_ARM_LITHIUM_ARM_H_ 2882 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698