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

Side by Side Diff: src/mips/lithium-mips.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/mips/lithium-codegen-mips.cc ('k') | src/mips64/code-stubs-mips64.h » ('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_MIPS_LITHIUM_MIPS_H_ 5 #ifndef V8_MIPS_LITHIUM_MIPS_H_
6 #define V8_MIPS_LITHIUM_MIPS_H_ 6 #define V8_MIPS_LITHIUM_MIPS_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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 V(ThisFunction) \ 156 V(ThisFunction) \
157 V(ToFastProperties) \ 157 V(ToFastProperties) \
158 V(TransitionElementsKind) \ 158 V(TransitionElementsKind) \
159 V(TrapAllocationMemento) \ 159 V(TrapAllocationMemento) \
160 V(Typeof) \ 160 V(Typeof) \
161 V(TypeofIsAndBranch) \ 161 V(TypeofIsAndBranch) \
162 V(Uint32ToDouble) \ 162 V(Uint32ToDouble) \
163 V(UnknownOSRValue) \ 163 V(UnknownOSRValue) \
164 V(WrapReceiver) 164 V(WrapReceiver)
165 165
166 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 166 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
167 virtual Opcode opcode() const FINAL OVERRIDE { \ 167 Opcode opcode() const FINAL { return LInstruction::k##type; } \
168 return LInstruction::k##type; \ 168 void CompileToNative(LCodeGen* generator) FINAL; \
169 } \ 169 const char* Mnemonic() const FINAL { return mnemonic; } \
170 virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \ 170 static L##type* cast(LInstruction* instr) { \
171 virtual const char* Mnemonic() const FINAL OVERRIDE { \ 171 DCHECK(instr->Is##type()); \
172 return mnemonic; \ 172 return reinterpret_cast<L##type*>(instr); \
173 } \
174 static L##type* cast(LInstruction* instr) { \
175 DCHECK(instr->Is##type()); \
176 return reinterpret_cast<L##type*>(instr); \
177 } 173 }
178 174
179 175
180 #define DECLARE_HYDROGEN_ACCESSOR(type) \ 176 #define DECLARE_HYDROGEN_ACCESSOR(type) \
181 H##type* hydrogen() const { \ 177 H##type* hydrogen() const { \
182 return H##type::cast(hydrogen_value()); \ 178 return H##type::cast(hydrogen_value()); \
183 } 179 }
184 180
185 181
186 class LInstruction : public ZoneObject { 182 class LInstruction : public ZoneObject {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 int bit_field_; 277 int bit_field_;
282 }; 278 };
283 279
284 280
285 // R = number of result operands (0 or 1). 281 // R = number of result operands (0 or 1).
286 template<int R> 282 template<int R>
287 class LTemplateResultInstruction : public LInstruction { 283 class LTemplateResultInstruction : public LInstruction {
288 public: 284 public:
289 // Allow 0 or 1 output operands. 285 // Allow 0 or 1 output operands.
290 STATIC_ASSERT(R == 0 || R == 1); 286 STATIC_ASSERT(R == 0 || R == 1);
291 virtual bool HasResult() const FINAL OVERRIDE { 287 bool HasResult() const FINAL { return R != 0 && result() != NULL; }
292 return R != 0 && result() != NULL;
293 }
294 void set_result(LOperand* operand) { results_[0] = operand; } 288 void set_result(LOperand* operand) { results_[0] = operand; }
295 LOperand* result() const { return results_[0]; } 289 LOperand* result() const OVERRIDE { return results_[0]; }
296 290
297 protected: 291 protected:
298 EmbeddedContainer<LOperand*, R> results_; 292 EmbeddedContainer<LOperand*, R> results_;
299 }; 293 };
300 294
301 295
302 // R = number of result operands (0 or 1). 296 // R = number of result operands (0 or 1).
303 // I = number of input operands. 297 // I = number of input operands.
304 // T = number of temporary operands. 298 // T = number of temporary operands.
305 template<int R, int I, int T> 299 template<int R, int I, int T>
306 class LTemplateInstruction : public LTemplateResultInstruction<R> { 300 class LTemplateInstruction : public LTemplateResultInstruction<R> {
307 protected: 301 protected:
308 EmbeddedContainer<LOperand*, I> inputs_; 302 EmbeddedContainer<LOperand*, I> inputs_;
309 EmbeddedContainer<LOperand*, T> temps_; 303 EmbeddedContainer<LOperand*, T> temps_;
310 304
311 private: 305 private:
312 // Iterator support. 306 // Iterator support.
313 virtual int InputCount() FINAL OVERRIDE { return I; } 307 int InputCount() FINAL { return I; }
314 virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; } 308 LOperand* InputAt(int i) FINAL { return inputs_[i]; }
315 309
316 virtual int TempCount() FINAL OVERRIDE { return T; } 310 int TempCount() FINAL { return T; }
317 virtual LOperand* TempAt(int i) FINAL OVERRIDE { return temps_[i]; } 311 LOperand* TempAt(int i) FINAL { return temps_[i]; }
318 }; 312 };
319 313
320 314
321 class LGap : public LTemplateInstruction<0, 0, 0> { 315 class LGap : public LTemplateInstruction<0, 0, 0> {
322 public: 316 public:
323 explicit LGap(HBasicBlock* block) 317 explicit LGap(HBasicBlock* block)
324 : block_(block) { 318 : block_(block) {
325 parallel_moves_[BEFORE] = NULL; 319 parallel_moves_[BEFORE] = NULL;
326 parallel_moves_[START] = NULL; 320 parallel_moves_[START] = NULL;
327 parallel_moves_[END] = NULL; 321 parallel_moves_[END] = NULL;
328 parallel_moves_[AFTER] = NULL; 322 parallel_moves_[AFTER] = NULL;
329 } 323 }
330 324
331 // Can't use the DECLARE-macro here because of sub-classes. 325 // Can't use the DECLARE-macro here because of sub-classes.
332 virtual bool IsGap() const FINAL OVERRIDE { return true; } 326 bool IsGap() const FINAL { return true; }
333 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 327 void PrintDataTo(StringStream* stream) OVERRIDE;
334 static LGap* cast(LInstruction* instr) { 328 static LGap* cast(LInstruction* instr) {
335 DCHECK(instr->IsGap()); 329 DCHECK(instr->IsGap());
336 return reinterpret_cast<LGap*>(instr); 330 return reinterpret_cast<LGap*>(instr);
337 } 331 }
338 332
339 bool IsRedundant() const; 333 bool IsRedundant() const;
340 334
341 HBasicBlock* block() const { return block_; } 335 HBasicBlock* block() const { return block_; }
342 336
343 enum InnerPosition { 337 enum InnerPosition {
(...skipping 19 matching lines...) Expand all
363 private: 357 private:
364 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; 358 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1];
365 HBasicBlock* block_; 359 HBasicBlock* block_;
366 }; 360 };
367 361
368 362
369 class LInstructionGap FINAL : public LGap { 363 class LInstructionGap FINAL : public LGap {
370 public: 364 public:
371 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } 365 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
372 366
373 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { 367 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
374 return !IsRedundant(); 368 return !IsRedundant();
375 } 369 }
376 370
377 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") 371 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap")
378 }; 372 };
379 373
380 374
381 class LGoto FINAL : public LTemplateInstruction<0, 0, 0> { 375 class LGoto FINAL : public LTemplateInstruction<0, 0, 0> {
382 public: 376 public:
383 explicit LGoto(HBasicBlock* block) : block_(block) { } 377 explicit LGoto(HBasicBlock* block) : block_(block) { }
384 378
385 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE; 379 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
386 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") 380 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
387 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 381 void PrintDataTo(StringStream* stream) OVERRIDE;
388 virtual bool IsControl() const OVERRIDE { return true; } 382 bool IsControl() const OVERRIDE { return true; }
389 383
390 int block_id() const { return block_->block_id(); } 384 int block_id() const { return block_->block_id(); }
391 385
392 private: 386 private:
393 HBasicBlock* block_; 387 HBasicBlock* block_;
394 }; 388 };
395 389
396 390
397 class LLazyBailout FINAL : public LTemplateInstruction<0, 0, 0> { 391 class LLazyBailout FINAL : public LTemplateInstruction<0, 0, 0> {
398 public: 392 public:
(...skipping 22 matching lines...) Expand all
421 public: 415 public:
422 explicit LDummyUse(LOperand* value) { 416 explicit LDummyUse(LOperand* value) {
423 inputs_[0] = value; 417 inputs_[0] = value;
424 } 418 }
425 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") 419 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use")
426 }; 420 };
427 421
428 422
429 class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> { 423 class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> {
430 public: 424 public:
431 virtual bool IsControl() const OVERRIDE { return true; } 425 bool IsControl() const OVERRIDE { return true; }
432 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") 426 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
433 DECLARE_HYDROGEN_ACCESSOR(Deoptimize) 427 DECLARE_HYDROGEN_ACCESSOR(Deoptimize)
434 }; 428 };
435 429
436 430
437 class LLabel FINAL : public LGap { 431 class LLabel FINAL : public LGap {
438 public: 432 public:
439 explicit LLabel(HBasicBlock* block) 433 explicit LLabel(HBasicBlock* block)
440 : LGap(block), replacement_(NULL) { } 434 : LGap(block), replacement_(NULL) { }
441 435
442 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { 436 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
443 return false;
444 }
445 DECLARE_CONCRETE_INSTRUCTION(Label, "label") 437 DECLARE_CONCRETE_INSTRUCTION(Label, "label")
446 438
447 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 439 void PrintDataTo(StringStream* stream) OVERRIDE;
448 440
449 int block_id() const { return block()->block_id(); } 441 int block_id() const { return block()->block_id(); }
450 bool is_loop_header() const { return block()->IsLoopHeader(); } 442 bool is_loop_header() const { return block()->IsLoopHeader(); }
451 bool is_osr_entry() const { return block()->is_osr_entry(); } 443 bool is_osr_entry() const { return block()->is_osr_entry(); }
452 Label* label() { return &label_; } 444 Label* label() { return &label_; }
453 LLabel* replacement() const { return replacement_; } 445 LLabel* replacement() const { return replacement_; }
454 void set_replacement(LLabel* label) { replacement_ = label; } 446 void set_replacement(LLabel* label) { replacement_ = label; }
455 bool HasReplacement() const { return replacement_ != NULL; } 447 bool HasReplacement() const { return replacement_ != NULL; }
456 448
457 private: 449 private:
458 Label label_; 450 Label label_;
459 LLabel* replacement_; 451 LLabel* replacement_;
460 }; 452 };
461 453
462 454
463 class LParameter FINAL : public LTemplateInstruction<1, 0, 0> { 455 class LParameter FINAL : public LTemplateInstruction<1, 0, 0> {
464 public: 456 public:
465 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { 457 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
466 return false;
467 }
468 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") 458 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
469 }; 459 };
470 460
471 461
472 class LCallStub FINAL : public LTemplateInstruction<1, 1, 0> { 462 class LCallStub FINAL : public LTemplateInstruction<1, 1, 0> {
473 public: 463 public:
474 explicit LCallStub(LOperand* context) { 464 explicit LCallStub(LOperand* context) {
475 inputs_[0] = context; 465 inputs_[0] = context;
476 } 466 }
477 467
(...skipping 20 matching lines...) Expand all
498 LOperand* name() { return inputs_[2]; } 488 LOperand* name() { return inputs_[2]; }
499 489
500 DECLARE_CONCRETE_INSTRUCTION(TailCallThroughMegamorphicCache, 490 DECLARE_CONCRETE_INSTRUCTION(TailCallThroughMegamorphicCache,
501 "tail-call-through-megamorphic-cache") 491 "tail-call-through-megamorphic-cache")
502 DECLARE_HYDROGEN_ACCESSOR(TailCallThroughMegamorphicCache) 492 DECLARE_HYDROGEN_ACCESSOR(TailCallThroughMegamorphicCache)
503 }; 493 };
504 494
505 495
506 class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> { 496 class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> {
507 public: 497 public:
508 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { 498 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
509 return false;
510 }
511 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") 499 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
512 }; 500 };
513 501
514 502
515 template<int I, int T> 503 template<int I, int T>
516 class LControlInstruction : public LTemplateInstruction<0, I, T> { 504 class LControlInstruction : public LTemplateInstruction<0, I, T> {
517 public: 505 public:
518 LControlInstruction() : false_label_(NULL), true_label_(NULL) { } 506 LControlInstruction() : false_label_(NULL), true_label_(NULL) { }
519 507
520 virtual bool IsControl() const FINAL OVERRIDE { return true; } 508 bool IsControl() const FINAL { return true; }
521 509
522 int SuccessorCount() { return hydrogen()->SuccessorCount(); } 510 int SuccessorCount() { return hydrogen()->SuccessorCount(); }
523 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } 511 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
524 512
525 int TrueDestination(LChunk* chunk) { 513 int TrueDestination(LChunk* chunk) {
526 return chunk->LookupDestination(true_block_id()); 514 return chunk->LookupDestination(true_block_id());
527 } 515 }
528 int FalseDestination(LChunk* chunk) { 516 int FalseDestination(LChunk* chunk) {
529 return chunk->LookupDestination(false_block_id()); 517 return chunk->LookupDestination(false_block_id());
530 } 518 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 inputs_[1] = length; 587 inputs_[1] = length;
600 inputs_[2] = index; 588 inputs_[2] = index;
601 } 589 }
602 590
603 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") 591 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at")
604 592
605 LOperand* arguments() { return inputs_[0]; } 593 LOperand* arguments() { return inputs_[0]; }
606 LOperand* length() { return inputs_[1]; } 594 LOperand* length() { return inputs_[1]; }
607 LOperand* index() { return inputs_[2]; } 595 LOperand* index() { return inputs_[2]; }
608 596
609 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 597 void PrintDataTo(StringStream* stream) OVERRIDE;
610 }; 598 };
611 599
612 600
613 class LArgumentsLength FINAL : public LTemplateInstruction<1, 1, 0> { 601 class LArgumentsLength FINAL : public LTemplateInstruction<1, 1, 0> {
614 public: 602 public:
615 explicit LArgumentsLength(LOperand* elements) { 603 explicit LArgumentsLength(LOperand* elements) {
616 inputs_[0] = elements; 604 inputs_[0] = elements;
617 } 605 }
618 606
619 LOperand* elements() { return inputs_[0]; } 607 LOperand* elements() { return inputs_[0]; }
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 827
840 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch, 828 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch,
841 "compare-numeric-and-branch") 829 "compare-numeric-and-branch")
842 DECLARE_HYDROGEN_ACCESSOR(CompareNumericAndBranch) 830 DECLARE_HYDROGEN_ACCESSOR(CompareNumericAndBranch)
843 831
844 Token::Value op() const { return hydrogen()->token(); } 832 Token::Value op() const { return hydrogen()->token(); }
845 bool is_double() const { 833 bool is_double() const {
846 return hydrogen()->representation().IsDouble(); 834 return hydrogen()->representation().IsDouble();
847 } 835 }
848 836
849 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 837 void PrintDataTo(StringStream* stream) OVERRIDE;
850 }; 838 };
851 839
852 840
853 class LMathFloor FINAL : public LTemplateInstruction<1, 1, 1> { 841 class LMathFloor FINAL : public LTemplateInstruction<1, 1, 1> {
854 public: 842 public:
855 LMathFloor(LOperand* value, LOperand* temp) { 843 LMathFloor(LOperand* value, LOperand* temp) {
856 inputs_[0] = value; 844 inputs_[0] = value;
857 temps_[0] = temp; 845 temps_[0] = temp;
858 } 846 }
859 847
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 inputs_[0] = value; 1015 inputs_[0] = value;
1028 temps_[0] = temp; 1016 temps_[0] = temp;
1029 } 1017 }
1030 1018
1031 LOperand* value() { return inputs_[0]; } 1019 LOperand* value() { return inputs_[0]; }
1032 LOperand* temp() { return temps_[0]; } 1020 LOperand* temp() { return temps_[0]; }
1033 1021
1034 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") 1022 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
1035 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) 1023 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
1036 1024
1037 virtual void PrintDataTo(StringStream* stream); 1025 void PrintDataTo(StringStream* stream) OVERRIDE;
1038 }; 1026 };
1039 1027
1040 1028
1041 class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> { 1029 class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> {
1042 public: 1030 public:
1043 LIsStringAndBranch(LOperand* value, LOperand* temp) { 1031 LIsStringAndBranch(LOperand* value, LOperand* temp) {
1044 inputs_[0] = value; 1032 inputs_[0] = value;
1045 temps_[0] = temp; 1033 temps_[0] = temp;
1046 } 1034 }
1047 1035
1048 LOperand* value() { return inputs_[0]; } 1036 LOperand* value() { return inputs_[0]; }
1049 LOperand* temp() { return temps_[0]; } 1037 LOperand* temp() { return temps_[0]; }
1050 1038
1051 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") 1039 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
1052 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) 1040 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
1053 1041
1054 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1042 void PrintDataTo(StringStream* stream) OVERRIDE;
1055 }; 1043 };
1056 1044
1057 1045
1058 class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> { 1046 class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> {
1059 public: 1047 public:
1060 explicit LIsSmiAndBranch(LOperand* value) { 1048 explicit LIsSmiAndBranch(LOperand* value) {
1061 inputs_[0] = value; 1049 inputs_[0] = value;
1062 } 1050 }
1063 1051
1064 LOperand* value() { return inputs_[0]; } 1052 LOperand* value() { return inputs_[0]; }
1065 1053
1066 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") 1054 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
1067 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) 1055 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
1068 1056
1069 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1057 void PrintDataTo(StringStream* stream) OVERRIDE;
1070 }; 1058 };
1071 1059
1072 1060
1073 class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> { 1061 class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> {
1074 public: 1062 public:
1075 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { 1063 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) {
1076 inputs_[0] = value; 1064 inputs_[0] = value;
1077 temps_[0] = temp; 1065 temps_[0] = temp;
1078 } 1066 }
1079 1067
1080 LOperand* value() { return inputs_[0]; } 1068 LOperand* value() { return inputs_[0]; }
1081 LOperand* temp() { return temps_[0]; } 1069 LOperand* temp() { return temps_[0]; }
1082 1070
1083 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, 1071 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch,
1084 "is-undetectable-and-branch") 1072 "is-undetectable-and-branch")
1085 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) 1073 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
1086 1074
1087 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1075 void PrintDataTo(StringStream* stream) OVERRIDE;
1088 }; 1076 };
1089 1077
1090 1078
1091 class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> { 1079 class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> {
1092 public: 1080 public:
1093 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) { 1081 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) {
1094 inputs_[0] = context; 1082 inputs_[0] = context;
1095 inputs_[1] = left; 1083 inputs_[1] = left;
1096 inputs_[2] = right; 1084 inputs_[2] = right;
1097 } 1085 }
1098 1086
1099 LOperand* context() { return inputs_[0]; } 1087 LOperand* context() { return inputs_[0]; }
1100 LOperand* left() { return inputs_[1]; } 1088 LOperand* left() { return inputs_[1]; }
1101 LOperand* right() { return inputs_[2]; } 1089 LOperand* right() { return inputs_[2]; }
1102 1090
1103 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, 1091 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch,
1104 "string-compare-and-branch") 1092 "string-compare-and-branch")
1105 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) 1093 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch)
1106 1094
1107 Token::Value op() const { return hydrogen()->token(); } 1095 Token::Value op() const { return hydrogen()->token(); }
1108 1096
1109 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1097 void PrintDataTo(StringStream* stream) OVERRIDE;
1110 }; 1098 };
1111 1099
1112 1100
1113 class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 0> { 1101 class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 0> {
1114 public: 1102 public:
1115 explicit LHasInstanceTypeAndBranch(LOperand* value) { 1103 explicit LHasInstanceTypeAndBranch(LOperand* value) {
1116 inputs_[0] = value; 1104 inputs_[0] = value;
1117 } 1105 }
1118 1106
1119 LOperand* value() { return inputs_[0]; } 1107 LOperand* value() { return inputs_[0]; }
1120 1108
1121 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, 1109 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch,
1122 "has-instance-type-and-branch") 1110 "has-instance-type-and-branch")
1123 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) 1111 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
1124 1112
1125 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1113 void PrintDataTo(StringStream* stream) OVERRIDE;
1126 }; 1114 };
1127 1115
1128 1116
1129 class LGetCachedArrayIndex FINAL : public LTemplateInstruction<1, 1, 0> { 1117 class LGetCachedArrayIndex FINAL : public LTemplateInstruction<1, 1, 0> {
1130 public: 1118 public:
1131 explicit LGetCachedArrayIndex(LOperand* value) { 1119 explicit LGetCachedArrayIndex(LOperand* value) {
1132 inputs_[0] = value; 1120 inputs_[0] = value;
1133 } 1121 }
1134 1122
1135 LOperand* value() { return inputs_[0]; } 1123 LOperand* value() { return inputs_[0]; }
1136 1124
1137 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") 1125 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index")
1138 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) 1126 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex)
1139 }; 1127 };
1140 1128
1141 1129
1142 class LHasCachedArrayIndexAndBranch FINAL 1130 class LHasCachedArrayIndexAndBranch FINAL
1143 : public LControlInstruction<1, 0> { 1131 : public LControlInstruction<1, 0> {
1144 public: 1132 public:
1145 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { 1133 explicit LHasCachedArrayIndexAndBranch(LOperand* value) {
1146 inputs_[0] = value; 1134 inputs_[0] = value;
1147 } 1135 }
1148 1136
1149 LOperand* value() { return inputs_[0]; } 1137 LOperand* value() { return inputs_[0]; }
1150 1138
1151 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, 1139 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch,
1152 "has-cached-array-index-and-branch") 1140 "has-cached-array-index-and-branch")
1153 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch) 1141 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
1154 1142
1155 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1143 void PrintDataTo(StringStream* stream) OVERRIDE;
1156 }; 1144 };
1157 1145
1158 1146
1159 class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 1> { 1147 class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 1> {
1160 public: 1148 public:
1161 LClassOfTestAndBranch(LOperand* value, LOperand* temp) { 1149 LClassOfTestAndBranch(LOperand* value, LOperand* temp) {
1162 inputs_[0] = value; 1150 inputs_[0] = value;
1163 temps_[0] = temp; 1151 temps_[0] = temp;
1164 } 1152 }
1165 1153
1166 LOperand* value() { return inputs_[0]; } 1154 LOperand* value() { return inputs_[0]; }
1167 LOperand* temp() { return temps_[0]; } 1155 LOperand* temp() { return temps_[0]; }
1168 1156
1169 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, 1157 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch,
1170 "class-of-test-and-branch") 1158 "class-of-test-and-branch")
1171 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) 1159 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
1172 1160
1173 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1161 void PrintDataTo(StringStream* stream) OVERRIDE;
1174 }; 1162 };
1175 1163
1176 1164
1177 class LCmpT FINAL : public LTemplateInstruction<1, 3, 0> { 1165 class LCmpT FINAL : public LTemplateInstruction<1, 3, 0> {
1178 public: 1166 public:
1179 LCmpT(LOperand* context, LOperand* left, LOperand* right) { 1167 LCmpT(LOperand* context, LOperand* left, LOperand* right) {
1180 inputs_[0] = context; 1168 inputs_[0] = context;
1181 inputs_[1] = left; 1169 inputs_[1] = left;
1182 inputs_[2] = right; 1170 inputs_[2] = right;
1183 } 1171 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 public: 1348 public:
1361 explicit LBranch(LOperand* value) { 1349 explicit LBranch(LOperand* value) {
1362 inputs_[0] = value; 1350 inputs_[0] = value;
1363 } 1351 }
1364 1352
1365 LOperand* value() { return inputs_[0]; } 1353 LOperand* value() { return inputs_[0]; }
1366 1354
1367 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") 1355 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
1368 DECLARE_HYDROGEN_ACCESSOR(Branch) 1356 DECLARE_HYDROGEN_ACCESSOR(Branch)
1369 1357
1370 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1358 void PrintDataTo(StringStream* stream) OVERRIDE;
1371 }; 1359 };
1372 1360
1373 1361
1374 class LCmpMapAndBranch FINAL : public LControlInstruction<1, 1> { 1362 class LCmpMapAndBranch FINAL : public LControlInstruction<1, 1> {
1375 public: 1363 public:
1376 LCmpMapAndBranch(LOperand* value, LOperand* temp) { 1364 LCmpMapAndBranch(LOperand* value, LOperand* temp) {
1377 inputs_[0] = value; 1365 inputs_[0] = value;
1378 temps_[0] = temp; 1366 temps_[0] = temp;
1379 } 1367 }
1380 1368
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 LArithmeticD(Token::Value op, LOperand* left, LOperand* right) 1493 LArithmeticD(Token::Value op, LOperand* left, LOperand* right)
1506 : op_(op) { 1494 : op_(op) {
1507 inputs_[0] = left; 1495 inputs_[0] = left;
1508 inputs_[1] = right; 1496 inputs_[1] = right;
1509 } 1497 }
1510 1498
1511 Token::Value op() const { return op_; } 1499 Token::Value op() const { return op_; }
1512 LOperand* left() { return inputs_[0]; } 1500 LOperand* left() { return inputs_[0]; }
1513 LOperand* right() { return inputs_[1]; } 1501 LOperand* right() { return inputs_[1]; }
1514 1502
1515 virtual Opcode opcode() const OVERRIDE { 1503 Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; }
1516 return LInstruction::kArithmeticD; 1504 void CompileToNative(LCodeGen* generator) OVERRIDE;
1517 } 1505 const char* Mnemonic() const OVERRIDE;
1518 virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
1519 virtual const char* Mnemonic() const OVERRIDE;
1520 1506
1521 private: 1507 private:
1522 Token::Value op_; 1508 Token::Value op_;
1523 }; 1509 };
1524 1510
1525 1511
1526 class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> { 1512 class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> {
1527 public: 1513 public:
1528 LArithmeticT(Token::Value op, 1514 LArithmeticT(Token::Value op,
1529 LOperand* context, 1515 LOperand* context,
1530 LOperand* left, 1516 LOperand* left,
1531 LOperand* right) 1517 LOperand* right)
1532 : op_(op) { 1518 : op_(op) {
1533 inputs_[0] = context; 1519 inputs_[0] = context;
1534 inputs_[1] = left; 1520 inputs_[1] = left;
1535 inputs_[2] = right; 1521 inputs_[2] = right;
1536 } 1522 }
1537 1523
1538 LOperand* context() { return inputs_[0]; } 1524 LOperand* context() { return inputs_[0]; }
1539 LOperand* left() { return inputs_[1]; } 1525 LOperand* left() { return inputs_[1]; }
1540 LOperand* right() { return inputs_[2]; } 1526 LOperand* right() { return inputs_[2]; }
1541 Token::Value op() const { return op_; } 1527 Token::Value op() const { return op_; }
1542 1528
1543 virtual Opcode opcode() const FINAL { return LInstruction::kArithmeticT; } 1529 Opcode opcode() const FINAL { return LInstruction::kArithmeticT; }
1544 virtual void CompileToNative(LCodeGen* generator) OVERRIDE; 1530 void CompileToNative(LCodeGen* generator) OVERRIDE;
1545 virtual const char* Mnemonic() const OVERRIDE; 1531 const char* Mnemonic() const OVERRIDE;
1546 1532
1547 private: 1533 private:
1548 Token::Value op_; 1534 Token::Value op_;
1549 }; 1535 };
1550 1536
1551 1537
1552 class LReturn FINAL : public LTemplateInstruction<0, 3, 0> { 1538 class LReturn FINAL : public LTemplateInstruction<0, 3, 0> {
1553 public: 1539 public:
1554 LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) { 1540 LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) {
1555 inputs_[0] = value; 1541 inputs_[0] = value;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1644 bool is_fixed_typed_array() const { 1630 bool is_fixed_typed_array() const {
1645 return hydrogen()->is_fixed_typed_array(); 1631 return hydrogen()->is_fixed_typed_array();
1646 } 1632 }
1647 bool is_typed_elements() const { 1633 bool is_typed_elements() const {
1648 return is_external() || is_fixed_typed_array(); 1634 return is_external() || is_fixed_typed_array();
1649 } 1635 }
1650 1636
1651 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") 1637 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
1652 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) 1638 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
1653 1639
1654 virtual void PrintDataTo(StringStream* stream); 1640 void PrintDataTo(StringStream* stream) OVERRIDE;
1655 uint32_t base_offset() const { return hydrogen()->base_offset(); } 1641 uint32_t base_offset() const { return hydrogen()->base_offset(); }
1656 }; 1642 };
1657 1643
1658 1644
1659 class LLoadKeyedGeneric FINAL : public LTemplateInstruction<1, 3, 1> { 1645 class LLoadKeyedGeneric FINAL : public LTemplateInstruction<1, 3, 1> {
1660 public: 1646 public:
1661 LLoadKeyedGeneric(LOperand* context, LOperand* object, LOperand* key, 1647 LLoadKeyedGeneric(LOperand* context, LOperand* object, LOperand* key,
1662 LOperand* vector) { 1648 LOperand* vector) {
1663 inputs_[0] = context; 1649 inputs_[0] = context;
1664 inputs_[1] = object; 1650 inputs_[1] = object;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 inputs_[0] = context; 1711 inputs_[0] = context;
1726 } 1712 }
1727 1713
1728 LOperand* context() { return inputs_[0]; } 1714 LOperand* context() { return inputs_[0]; }
1729 1715
1730 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") 1716 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot")
1731 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) 1717 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot)
1732 1718
1733 int slot_index() { return hydrogen()->slot_index(); } 1719 int slot_index() { return hydrogen()->slot_index(); }
1734 1720
1735 virtual void PrintDataTo(StringStream* stream); 1721 void PrintDataTo(StringStream* stream) OVERRIDE;
1736 }; 1722 };
1737 1723
1738 1724
1739 class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 0> { 1725 class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 0> {
1740 public: 1726 public:
1741 LStoreContextSlot(LOperand* context, LOperand* value) { 1727 LStoreContextSlot(LOperand* context, LOperand* value) {
1742 inputs_[0] = context; 1728 inputs_[0] = context;
1743 inputs_[1] = value; 1729 inputs_[1] = value;
1744 } 1730 }
1745 1731
1746 LOperand* context() { return inputs_[0]; } 1732 LOperand* context() { return inputs_[0]; }
1747 LOperand* value() { return inputs_[1]; } 1733 LOperand* value() { return inputs_[1]; }
1748 1734
1749 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") 1735 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot")
1750 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) 1736 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot)
1751 1737
1752 int slot_index() { return hydrogen()->slot_index(); } 1738 int slot_index() { return hydrogen()->slot_index(); }
1753 1739
1754 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1740 void PrintDataTo(StringStream* stream) OVERRIDE;
1755 }; 1741 };
1756 1742
1757 1743
1758 class LPushArgument FINAL : public LTemplateInstruction<0, 1, 0> { 1744 class LPushArgument FINAL : public LTemplateInstruction<0, 1, 0> {
1759 public: 1745 public:
1760 explicit LPushArgument(LOperand* value) { 1746 explicit LPushArgument(LOperand* value) {
1761 inputs_[0] = value; 1747 inputs_[0] = value;
1762 } 1748 }
1763 1749
1764 LOperand* value() { return inputs_[0]; } 1750 LOperand* value() { return inputs_[0]; }
(...skipping 18 matching lines...) Expand all
1783 class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 0> { 1769 class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 0> {
1784 public: 1770 public:
1785 LStoreCodeEntry(LOperand* function, LOperand* code_object) { 1771 LStoreCodeEntry(LOperand* function, LOperand* code_object) {
1786 inputs_[0] = function; 1772 inputs_[0] = function;
1787 inputs_[1] = code_object; 1773 inputs_[1] = code_object;
1788 } 1774 }
1789 1775
1790 LOperand* function() { return inputs_[0]; } 1776 LOperand* function() { return inputs_[0]; }
1791 LOperand* code_object() { return inputs_[1]; } 1777 LOperand* code_object() { return inputs_[1]; }
1792 1778
1793 virtual void PrintDataTo(StringStream* stream); 1779 void PrintDataTo(StringStream* stream) OVERRIDE;
1794 1780
1795 DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry") 1781 DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry")
1796 DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry) 1782 DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry)
1797 }; 1783 };
1798 1784
1799 1785
1800 class LInnerAllocatedObject FINAL: public LTemplateInstruction<1, 2, 0> { 1786 class LInnerAllocatedObject FINAL: public LTemplateInstruction<1, 2, 0> {
1801 public: 1787 public:
1802 LInnerAllocatedObject(LOperand* base_object, LOperand* offset) { 1788 LInnerAllocatedObject(LOperand* base_object, LOperand* offset) {
1803 inputs_[0] = base_object; 1789 inputs_[0] = base_object;
1804 inputs_[1] = offset; 1790 inputs_[1] = offset;
1805 } 1791 }
1806 1792
1807 LOperand* base_object() const { return inputs_[0]; } 1793 LOperand* base_object() const { return inputs_[0]; }
1808 LOperand* offset() const { return inputs_[1]; } 1794 LOperand* offset() const { return inputs_[1]; }
1809 1795
1810 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1796 void PrintDataTo(StringStream* stream) OVERRIDE;
1811 1797
1812 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object") 1798 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object")
1813 }; 1799 };
1814 1800
1815 1801
1816 class LThisFunction FINAL : public LTemplateInstruction<1, 0, 0> { 1802 class LThisFunction FINAL : public LTemplateInstruction<1, 0, 0> {
1817 public: 1803 public:
1818 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") 1804 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function")
1819 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) 1805 DECLARE_HYDROGEN_ACCESSOR(ThisFunction)
1820 }; 1806 };
(...skipping 23 matching lines...) Expand all
1844 public: 1830 public:
1845 explicit LCallJSFunction(LOperand* function) { 1831 explicit LCallJSFunction(LOperand* function) {
1846 inputs_[0] = function; 1832 inputs_[0] = function;
1847 } 1833 }
1848 1834
1849 LOperand* function() { return inputs_[0]; } 1835 LOperand* function() { return inputs_[0]; }
1850 1836
1851 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function") 1837 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function")
1852 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction) 1838 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction)
1853 1839
1854 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1840 void PrintDataTo(StringStream* stream) OVERRIDE;
1855 1841
1856 int arity() const { return hydrogen()->argument_count() - 1; } 1842 int arity() const { return hydrogen()->argument_count() - 1; }
1857 }; 1843 };
1858 1844
1859 1845
1860 class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> { 1846 class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
1861 public: 1847 public:
1862 LCallWithDescriptor(CallInterfaceDescriptor descriptor, 1848 LCallWithDescriptor(CallInterfaceDescriptor descriptor,
1863 const ZoneList<LOperand*>& operands, Zone* zone) 1849 const ZoneList<LOperand*>& operands, Zone* zone)
1864 : descriptor_(descriptor), 1850 : descriptor_(descriptor),
1865 inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { 1851 inputs_(descriptor.GetRegisterParameterCount() + 1, zone) {
1866 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); 1852 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length());
1867 inputs_.AddAll(operands, zone); 1853 inputs_.AddAll(operands, zone);
1868 } 1854 }
1869 1855
1870 LOperand* target() const { return inputs_[0]; } 1856 LOperand* target() const { return inputs_[0]; }
1871 1857
1872 const CallInterfaceDescriptor descriptor() { return descriptor_; } 1858 const CallInterfaceDescriptor descriptor() { return descriptor_; }
1873 1859
1874 private: 1860 private:
1875 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") 1861 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
1876 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) 1862 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor)
1877 1863
1878 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1864 void PrintDataTo(StringStream* stream) OVERRIDE;
1879 1865
1880 int arity() const { return hydrogen()->argument_count() - 1; } 1866 int arity() const { return hydrogen()->argument_count() - 1; }
1881 1867
1882 CallInterfaceDescriptor descriptor_; 1868 CallInterfaceDescriptor descriptor_;
1883 ZoneList<LOperand*> inputs_; 1869 ZoneList<LOperand*> inputs_;
1884 1870
1885 // Iterator support. 1871 // Iterator support.
1886 virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); } 1872 int InputCount() FINAL { return inputs_.length(); }
1887 virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; } 1873 LOperand* InputAt(int i) FINAL { return inputs_[i]; }
1888 1874
1889 virtual int TempCount() FINAL OVERRIDE { return 0; } 1875 int TempCount() FINAL { return 0; }
1890 virtual LOperand* TempAt(int i) FINAL OVERRIDE { return NULL; } 1876 LOperand* TempAt(int i) FINAL { return NULL; }
1891 }; 1877 };
1892 1878
1893 1879
1894 class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> { 1880 class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> {
1895 public: 1881 public:
1896 LInvokeFunction(LOperand* context, LOperand* function) { 1882 LInvokeFunction(LOperand* context, LOperand* function) {
1897 inputs_[0] = context; 1883 inputs_[0] = context;
1898 inputs_[1] = function; 1884 inputs_[1] = function;
1899 } 1885 }
1900 1886
1901 LOperand* context() { return inputs_[0]; } 1887 LOperand* context() { return inputs_[0]; }
1902 LOperand* function() { return inputs_[1]; } 1888 LOperand* function() { return inputs_[1]; }
1903 1889
1904 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") 1890 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
1905 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) 1891 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
1906 1892
1907 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1893 void PrintDataTo(StringStream* stream) OVERRIDE;
1908 1894
1909 int arity() const { return hydrogen()->argument_count() - 1; } 1895 int arity() const { return hydrogen()->argument_count() - 1; }
1910 }; 1896 };
1911 1897
1912 1898
1913 class LCallFunction FINAL : public LTemplateInstruction<1, 2, 0> { 1899 class LCallFunction FINAL : public LTemplateInstruction<1, 2, 0> {
1914 public: 1900 public:
1915 LCallFunction(LOperand* context, LOperand* function) { 1901 LCallFunction(LOperand* context, LOperand* function) {
1916 inputs_[0] = context; 1902 inputs_[0] = context;
1917 inputs_[1] = function; 1903 inputs_[1] = function;
(...skipping 15 matching lines...) Expand all
1933 inputs_[0] = context; 1919 inputs_[0] = context;
1934 inputs_[1] = constructor; 1920 inputs_[1] = constructor;
1935 } 1921 }
1936 1922
1937 LOperand* context() { return inputs_[0]; } 1923 LOperand* context() { return inputs_[0]; }
1938 LOperand* constructor() { return inputs_[1]; } 1924 LOperand* constructor() { return inputs_[1]; }
1939 1925
1940 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") 1926 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
1941 DECLARE_HYDROGEN_ACCESSOR(CallNew) 1927 DECLARE_HYDROGEN_ACCESSOR(CallNew)
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 LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> { 1935 class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> {
1950 public: 1936 public:
1951 LCallNewArray(LOperand* context, LOperand* constructor) { 1937 LCallNewArray(LOperand* context, LOperand* constructor) {
1952 inputs_[0] = context; 1938 inputs_[0] = context;
1953 inputs_[1] = constructor; 1939 inputs_[1] = constructor;
1954 } 1940 }
1955 1941
1956 LOperand* context() { return inputs_[0]; } 1942 LOperand* context() { return inputs_[0]; }
1957 LOperand* constructor() { return inputs_[1]; } 1943 LOperand* constructor() { return inputs_[1]; }
1958 1944
1959 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") 1945 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
1960 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) 1946 DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
1961 1947
1962 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 1948 void PrintDataTo(StringStream* stream) OVERRIDE;
1963 1949
1964 int arity() const { return hydrogen()->argument_count() - 1; } 1950 int arity() const { return hydrogen()->argument_count() - 1; }
1965 }; 1951 };
1966 1952
1967 1953
1968 class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> { 1954 class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> {
1969 public: 1955 public:
1970 explicit LCallRuntime(LOperand* context) { 1956 explicit LCallRuntime(LOperand* context) {
1971 inputs_[0] = context; 1957 inputs_[0] = context;
1972 } 1958 }
1973 1959
1974 LOperand* context() { return inputs_[0]; } 1960 LOperand* context() { return inputs_[0]; }
1975 1961
1976 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") 1962 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
1977 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) 1963 DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
1978 1964
1979 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE { 1965 bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
1980 return save_doubles() == kDontSaveFPRegs; 1966 return save_doubles() == kDontSaveFPRegs;
1981 } 1967 }
1982 1968
1983 const Runtime::Function* function() const { return hydrogen()->function(); } 1969 const Runtime::Function* function() const { return hydrogen()->function(); }
1984 int arity() const { return hydrogen()->argument_count(); } 1970 int arity() const { return hydrogen()->argument_count(); }
1985 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } 1971 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); }
1986 }; 1972 };
1987 1973
1988 1974
1989 class LInteger32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> { 1975 class LInteger32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
2163 temps_[0] = temp; 2149 temps_[0] = temp;
2164 } 2150 }
2165 2151
2166 LOperand* object() { return inputs_[0]; } 2152 LOperand* object() { return inputs_[0]; }
2167 LOperand* value() { return inputs_[1]; } 2153 LOperand* value() { return inputs_[1]; }
2168 LOperand* temp() { return temps_[0]; } 2154 LOperand* temp() { return temps_[0]; }
2169 2155
2170 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") 2156 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
2171 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) 2157 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
2172 2158
2173 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 2159 void PrintDataTo(StringStream* stream) OVERRIDE;
2174 2160
2175 Representation representation() const { 2161 Representation representation() const {
2176 return hydrogen()->field_representation(); 2162 return hydrogen()->field_representation();
2177 } 2163 }
2178 }; 2164 };
2179 2165
2180 2166
2181 class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> { 2167 class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> {
2182 public: 2168 public:
2183 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { 2169 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) {
2184 inputs_[0] = context; 2170 inputs_[0] = context;
2185 inputs_[1] = object; 2171 inputs_[1] = object;
2186 inputs_[2] = value; 2172 inputs_[2] = value;
2187 } 2173 }
2188 2174
2189 LOperand* context() { return inputs_[0]; } 2175 LOperand* context() { return inputs_[0]; }
2190 LOperand* object() { return inputs_[1]; } 2176 LOperand* object() { return inputs_[1]; }
2191 LOperand* value() { return inputs_[2]; } 2177 LOperand* value() { return inputs_[2]; }
2192 2178
2193 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 2179 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
2194 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 2180 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
2195 2181
2196 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 2182 void PrintDataTo(StringStream* stream) OVERRIDE;
2197 2183
2198 Handle<Object> name() const { return hydrogen()->name(); } 2184 Handle<Object> name() const { return hydrogen()->name(); }
2199 StrictMode strict_mode() { return hydrogen()->strict_mode(); } 2185 StrictMode strict_mode() { return hydrogen()->strict_mode(); }
2200 }; 2186 };
2201 2187
2202 2188
2203 class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> { 2189 class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> {
2204 public: 2190 public:
2205 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { 2191 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) {
2206 inputs_[0] = object; 2192 inputs_[0] = object;
(...skipping 11 matching lines...) Expand all
2218 LOperand* elements() { return inputs_[0]; } 2204 LOperand* elements() { return inputs_[0]; }
2219 LOperand* key() { return inputs_[1]; } 2205 LOperand* key() { return inputs_[1]; }
2220 LOperand* value() { return inputs_[2]; } 2206 LOperand* value() { return inputs_[2]; }
2221 ElementsKind elements_kind() const { 2207 ElementsKind elements_kind() const {
2222 return hydrogen()->elements_kind(); 2208 return hydrogen()->elements_kind();
2223 } 2209 }
2224 2210
2225 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") 2211 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
2226 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) 2212 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
2227 2213
2228 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 2214 void PrintDataTo(StringStream* stream) OVERRIDE;
2229 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } 2215 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
2230 uint32_t base_offset() const { return hydrogen()->base_offset(); } 2216 uint32_t base_offset() const { return hydrogen()->base_offset(); }
2231 }; 2217 };
2232 2218
2233 2219
2234 class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> { 2220 class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> {
2235 public: 2221 public:
2236 LStoreKeyedGeneric(LOperand* context, 2222 LStoreKeyedGeneric(LOperand* context,
2237 LOperand* obj, 2223 LOperand* obj,
2238 LOperand* key, 2224 LOperand* key,
2239 LOperand* value) { 2225 LOperand* value) {
2240 inputs_[0] = context; 2226 inputs_[0] = context;
2241 inputs_[1] = obj; 2227 inputs_[1] = obj;
2242 inputs_[2] = key; 2228 inputs_[2] = key;
2243 inputs_[3] = value; 2229 inputs_[3] = value;
2244 } 2230 }
2245 2231
2246 LOperand* context() { return inputs_[0]; } 2232 LOperand* context() { return inputs_[0]; }
2247 LOperand* object() { return inputs_[1]; } 2233 LOperand* object() { return inputs_[1]; }
2248 LOperand* key() { return inputs_[2]; } 2234 LOperand* key() { return inputs_[2]; }
2249 LOperand* value() { return inputs_[3]; } 2235 LOperand* value() { return inputs_[3]; }
2250 2236
2251 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 2237 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
2252 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) 2238 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
2253 2239
2254 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 2240 void PrintDataTo(StringStream* stream) OVERRIDE;
2255 2241
2256 StrictMode strict_mode() { return hydrogen()->strict_mode(); } 2242 StrictMode strict_mode() { return hydrogen()->strict_mode(); }
2257 }; 2243 };
2258 2244
2259 2245
2260 class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 1> { 2246 class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 1> {
2261 public: 2247 public:
2262 LTransitionElementsKind(LOperand* object, 2248 LTransitionElementsKind(LOperand* object,
2263 LOperand* context, 2249 LOperand* context,
2264 LOperand* new_map_temp) { 2250 LOperand* new_map_temp) {
2265 inputs_[0] = object; 2251 inputs_[0] = object;
2266 inputs_[1] = context; 2252 inputs_[1] = context;
2267 temps_[0] = new_map_temp; 2253 temps_[0] = new_map_temp;
2268 } 2254 }
2269 2255
2270 LOperand* context() { return inputs_[1]; } 2256 LOperand* context() { return inputs_[1]; }
2271 LOperand* object() { return inputs_[0]; } 2257 LOperand* object() { return inputs_[0]; }
2272 LOperand* new_map_temp() { return temps_[0]; } 2258 LOperand* new_map_temp() { return temps_[0]; }
2273 2259
2274 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, 2260 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind,
2275 "transition-elements-kind") 2261 "transition-elements-kind")
2276 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) 2262 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
2277 2263
2278 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 2264 void PrintDataTo(StringStream* stream) OVERRIDE;
2279 2265
2280 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } 2266 Handle<Map> original_map() { return hydrogen()->original_map().handle(); }
2281 Handle<Map> transitioned_map() { 2267 Handle<Map> transitioned_map() {
2282 return hydrogen()->transitioned_map().handle(); 2268 return hydrogen()->transitioned_map().handle();
2283 } 2269 }
2284 ElementsKind from_kind() { return hydrogen()->from_kind(); } 2270 ElementsKind from_kind() { return hydrogen()->from_kind(); }
2285 ElementsKind to_kind() { return hydrogen()->to_kind(); } 2271 ElementsKind to_kind() { return hydrogen()->to_kind(); }
2286 }; 2272 };
2287 2273
2288 2274
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
2564 inputs_[0] = value; 2550 inputs_[0] = value;
2565 } 2551 }
2566 2552
2567 LOperand* value() { return inputs_[0]; } 2553 LOperand* value() { return inputs_[0]; }
2568 2554
2569 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") 2555 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch")
2570 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch) 2556 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch)
2571 2557
2572 Handle<String> type_literal() { return hydrogen()->type_literal(); } 2558 Handle<String> type_literal() { return hydrogen()->type_literal(); }
2573 2559
2574 virtual void PrintDataTo(StringStream* stream) OVERRIDE; 2560 void PrintDataTo(StringStream* stream) OVERRIDE;
2575 }; 2561 };
2576 2562
2577 2563
2578 class LIsConstructCallAndBranch FINAL : public LControlInstruction<0, 1> { 2564 class LIsConstructCallAndBranch FINAL : public LControlInstruction<0, 1> {
2579 public: 2565 public:
2580 explicit LIsConstructCallAndBranch(LOperand* temp) { 2566 explicit LIsConstructCallAndBranch(LOperand* temp) {
2581 temps_[0] = temp; 2567 temps_[0] = temp;
2582 } 2568 }
2583 2569
2584 LOperand* temp() { return temps_[0]; } 2570 LOperand* temp() { return temps_[0]; }
2585 2571
2586 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, 2572 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch,
2587 "is-construct-call-and-branch") 2573 "is-construct-call-and-branch")
2588 }; 2574 };
2589 2575
2590 2576
2591 class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> { 2577 class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> {
2592 public: 2578 public:
2593 LOsrEntry() {} 2579 LOsrEntry() {}
2594 2580
2595 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { 2581 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
2596 return false;
2597 }
2598 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") 2582 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
2599 }; 2583 };
2600 2584
2601 2585
2602 class LStackCheck FINAL : public LTemplateInstruction<0, 1, 0> { 2586 class LStackCheck FINAL : public LTemplateInstruction<0, 1, 0> {
2603 public: 2587 public:
2604 explicit LStackCheck(LOperand* context) { 2588 explicit LStackCheck(LOperand* context) {
2605 inputs_[0] = context; 2589 inputs_[0] = context;
2606 } 2590 }
2607 2591
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2790 2774
2791 // An input operand in a register or a constant operand. 2775 // An input operand in a register or a constant operand.
2792 MUST_USE_RESULT LOperand* UseRegisterOrConstant(HValue* value); 2776 MUST_USE_RESULT LOperand* UseRegisterOrConstant(HValue* value);
2793 MUST_USE_RESULT LOperand* UseRegisterOrConstantAtStart(HValue* value); 2777 MUST_USE_RESULT LOperand* UseRegisterOrConstantAtStart(HValue* value);
2794 2778
2795 // An input operand in a constant operand. 2779 // An input operand in a constant operand.
2796 MUST_USE_RESULT LOperand* UseConstant(HValue* value); 2780 MUST_USE_RESULT LOperand* UseConstant(HValue* value);
2797 2781
2798 // An input operand in register, stack slot or a constant operand. 2782 // An input operand in register, stack slot or a constant operand.
2799 // Will not be moved to a register even if one is freely available. 2783 // Will not be moved to a register even if one is freely available.
2800 virtual MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE; 2784 MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
2801 2785
2802 // Temporary operand that must be in a register. 2786 // Temporary operand that must be in a register.
2803 MUST_USE_RESULT LUnallocated* TempRegister(); 2787 MUST_USE_RESULT LUnallocated* TempRegister();
2804 MUST_USE_RESULT LUnallocated* TempDoubleRegister(); 2788 MUST_USE_RESULT LUnallocated* TempDoubleRegister();
2805 MUST_USE_RESULT LOperand* FixedTemp(Register reg); 2789 MUST_USE_RESULT LOperand* FixedTemp(Register reg);
2806 MUST_USE_RESULT LOperand* FixedTemp(DoubleRegister reg); 2790 MUST_USE_RESULT LOperand* FixedTemp(DoubleRegister reg);
2807 2791
2808 // Methods for setting up define-use relationships. 2792 // Methods for setting up define-use relationships.
2809 // Return the same instruction that they are passed. 2793 // Return the same instruction that they are passed.
2810 LInstruction* Define(LTemplateResultInstruction<1>* instr, 2794 LInstruction* Define(LTemplateResultInstruction<1>* instr,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2848 2832
2849 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2833 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2850 }; 2834 };
2851 2835
2852 #undef DECLARE_HYDROGEN_ACCESSOR 2836 #undef DECLARE_HYDROGEN_ACCESSOR
2853 #undef DECLARE_CONCRETE_INSTRUCTION 2837 #undef DECLARE_CONCRETE_INSTRUCTION
2854 2838
2855 } } // namespace v8::internal 2839 } } // namespace v8::internal
2856 2840
2857 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2841 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips64/code-stubs-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698