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

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

Issue 153733002: A64: Add V8_FINAL and V8_OVERRIDE to Lithium instructions (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 V(TrapAllocationMemento) \ 190 V(TrapAllocationMemento) \
191 V(TruncateDoubleToIntOrSmi) \ 191 V(TruncateDoubleToIntOrSmi) \
192 V(Typeof) \ 192 V(Typeof) \
193 V(TypeofIsAndBranch) \ 193 V(TypeofIsAndBranch) \
194 V(Uint32ToDouble) \ 194 V(Uint32ToDouble) \
195 V(UnknownOSRValue) \ 195 V(UnknownOSRValue) \
196 V(ValueOf) \ 196 V(ValueOf) \
197 V(WrapReceiver) 197 V(WrapReceiver)
198 198
199 199
200 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 200 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
201 virtual Opcode opcode() const { return LInstruction::k##type; } \ 201 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \
202 virtual void CompileToNative(LCodeGen* generator); \ 202 return LInstruction::k##type; \
203 virtual const char* Mnemonic() const { return mnemonic; } \ 203 } \
204 static L##type* cast(LInstruction* instr) { \ 204 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \
205 ASSERT(instr->Is##type()); \ 205 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \
206 return reinterpret_cast<L##type*>(instr); \ 206 return mnemonic; \
207 } \
208 static L##type* cast(LInstruction* instr) { \
209 ASSERT(instr->Is##type()); \
210 return reinterpret_cast<L##type*>(instr); \
207 } 211 }
208 212
209 213
210 #define DECLARE_HYDROGEN_ACCESSOR(type) \ 214 #define DECLARE_HYDROGEN_ACCESSOR(type) \
211 H##type* hydrogen() const { \ 215 H##type* hydrogen() const { \
212 return H##type::cast(this->hydrogen_value()); \ 216 return H##type::cast(this->hydrogen_value()); \
213 } 217 }
214 218
215 219
216 class LInstruction: public ZoneObject { 220 class LInstruction : public ZoneObject {
217 public: 221 public:
218 LInstruction() 222 LInstruction()
219 : environment_(NULL), 223 : environment_(NULL),
220 hydrogen_value_(NULL), 224 hydrogen_value_(NULL),
221 bit_field_(IsCallBits::encode(false)) { 225 bit_field_(IsCallBits::encode(false)) {
222 set_position(RelocInfo::kNoPosition); 226 set_position(RelocInfo::kNoPosition);
223 } 227 }
224 228
225 virtual ~LInstruction() { } 229 virtual ~LInstruction() { }
226 230
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 SetOncePointer<LPointerMap> pointer_map_; 312 SetOncePointer<LPointerMap> pointer_map_;
309 HValue* hydrogen_value_; 313 HValue* hydrogen_value_;
310 int32_t bit_field_; 314 int32_t bit_field_;
311 }; 315 };
312 316
313 317
314 // R = number of result operands (0 or 1). 318 // R = number of result operands (0 or 1).
315 // I = number of input operands. 319 // I = number of input operands.
316 // T = number of temporary operands. 320 // T = number of temporary operands.
317 template<int R, int I, int T> 321 template<int R, int I, int T>
318 class LTemplateInstruction: public LInstruction { 322 class LTemplateInstruction : public LInstruction {
319 public: 323 public:
320 // Allow 0 or 1 output operands. 324 // Allow 0 or 1 output operands.
321 STATIC_ASSERT(R == 0 || R == 1); 325 STATIC_ASSERT(R == 0 || R == 1);
322 virtual bool HasResult() const { return (R != 0) && (result() != NULL); } 326 virtual bool HasResult() const V8_FINAL V8_OVERRIDE {
327 return (R != 0) && (result() != NULL);
328 }
323 void set_result(LOperand* operand) { results_[0] = operand; } 329 void set_result(LOperand* operand) { results_[0] = operand; }
324 LOperand* result() const { return results_[0]; } 330 LOperand* result() const { return results_[0]; }
325 331
326 int InputCount() { return I; }
327 LOperand* InputAt(int i) { return inputs_[i]; }
328
329 int TempCount() { return T; }
330 LOperand* TempAt(int i) { return temps_[i]; }
331
332 protected: 332 protected:
333 EmbeddedContainer<LOperand*, R> results_; 333 EmbeddedContainer<LOperand*, R> results_;
334 EmbeddedContainer<LOperand*, I> inputs_; 334 EmbeddedContainer<LOperand*, I> inputs_;
335 EmbeddedContainer<LOperand*, T> temps_; 335 EmbeddedContainer<LOperand*, T> temps_;
336
337 private:
338 virtual int InputCount() V8_FINAL V8_OVERRIDE { return I; }
339 virtual LOperand* InputAt(int i) V8_FINAL V8_OVERRIDE { return inputs_[i]; }
340
341 virtual int TempCount() V8_FINAL V8_OVERRIDE { return T; }
342 virtual LOperand* TempAt(int i) V8_FINAL V8_OVERRIDE { return temps_[i]; }
336 }; 343 };
337 344
338 345
339 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> { 346 class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> {
340 public: 347 public:
341 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } 348 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
349 return false;
350 }
342 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") 351 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
343 }; 352 };
344 353
345 354
346 template<int I, int T> 355 template<int I, int T>
347 class LControlInstruction: public LTemplateInstruction<0, I, T> { 356 class LControlInstruction : public LTemplateInstruction<0, I, T> {
348 public: 357 public:
349 LControlInstruction() : false_label_(NULL), true_label_(NULL) { } 358 LControlInstruction() : false_label_(NULL), true_label_(NULL) { }
350 359
351 virtual bool IsControl() const { return true; } 360 virtual bool IsControl() const V8_FINAL V8_OVERRIDE { return true; }
352 361
353 int SuccessorCount() { return hydrogen()->SuccessorCount(); } 362 int SuccessorCount() { return hydrogen()->SuccessorCount(); }
354 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } 363 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
355 364
356 int TrueDestination(LChunk* chunk) { 365 int TrueDestination(LChunk* chunk) {
357 return chunk->LookupDestination(true_block_id()); 366 return chunk->LookupDestination(true_block_id());
358 } 367 }
359 368
360 int FalseDestination(LChunk* chunk) { 369 int FalseDestination(LChunk* chunk) {
361 return chunk->LookupDestination(false_block_id()); 370 return chunk->LookupDestination(false_block_id());
(...skipping 18 matching lines...) Expand all
380 int false_block_id() { return SuccessorAt(1)->block_id(); } 389 int false_block_id() { return SuccessorAt(1)->block_id(); }
381 390
382 private: 391 private:
383 DECLARE_HYDROGEN_ACCESSOR(ControlInstruction); 392 DECLARE_HYDROGEN_ACCESSOR(ControlInstruction);
384 393
385 Label* false_label_; 394 Label* false_label_;
386 Label* true_label_; 395 Label* true_label_;
387 }; 396 };
388 397
389 398
390 class LGap: public LTemplateInstruction<0, 0, 0> { 399 class LGap : public LTemplateInstruction<0, 0, 0> {
391 public: 400 public:
392 explicit LGap(HBasicBlock* block) 401 explicit LGap(HBasicBlock* block)
393 : block_(block) { 402 : block_(block) {
394 parallel_moves_[BEFORE] = NULL; 403 parallel_moves_[BEFORE] = NULL;
395 parallel_moves_[START] = NULL; 404 parallel_moves_[START] = NULL;
396 parallel_moves_[END] = NULL; 405 parallel_moves_[END] = NULL;
397 parallel_moves_[AFTER] = NULL; 406 parallel_moves_[AFTER] = NULL;
398 } 407 }
399 408
400 // Can't use the DECLARE-macro here because of sub-classes. 409 // Can't use the DECLARE-macro here because of sub-classes.
401 virtual bool IsGap() const { return true; } 410 virtual bool IsGap() const V8_OVERRIDE { return true; }
402 virtual void PrintDataTo(StringStream* stream); 411 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
403 static LGap* cast(LInstruction* instr) { 412 static LGap* cast(LInstruction* instr) {
404 ASSERT(instr->IsGap()); 413 ASSERT(instr->IsGap());
405 return reinterpret_cast<LGap*>(instr); 414 return reinterpret_cast<LGap*>(instr);
406 } 415 }
407 416
408 bool IsRedundant() const; 417 bool IsRedundant() const;
409 418
410 HBasicBlock* block() const { return block_; } 419 HBasicBlock* block() const { return block_; }
411 420
412 enum InnerPosition { 421 enum InnerPosition {
(...skipping 15 matching lines...) Expand all
428 LParallelMove* GetParallelMove(InnerPosition pos) { 437 LParallelMove* GetParallelMove(InnerPosition pos) {
429 return parallel_moves_[pos]; 438 return parallel_moves_[pos];
430 } 439 }
431 440
432 private: 441 private:
433 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; 442 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1];
434 HBasicBlock* block_; 443 HBasicBlock* block_;
435 }; 444 };
436 445
437 446
438 class LInstanceSize: public LTemplateInstruction<1, 1, 0> { 447 class LInstanceSize V8_FINAL : public LTemplateInstruction<1, 1, 0> {
439 public: 448 public:
440 explicit LInstanceSize(LOperand* object) { 449 explicit LInstanceSize(LOperand* object) {
441 inputs_[0] = object; 450 inputs_[0] = object;
442 } 451 }
443 452
444 LOperand* object() { return inputs_[0]; } 453 LOperand* object() { return inputs_[0]; }
445 454
446 DECLARE_CONCRETE_INSTRUCTION(InstanceSize, "instance-size") 455 DECLARE_CONCRETE_INSTRUCTION(InstanceSize, "instance-size")
447 DECLARE_HYDROGEN_ACCESSOR(InstanceSize) 456 DECLARE_HYDROGEN_ACCESSOR(InstanceSize)
448 }; 457 };
449 458
450 459
451 class LInstructionGap: public LGap { 460 class LInstructionGap V8_FINAL : public LGap {
452 public: 461 public:
453 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } 462 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
454 463
455 virtual bool HasInterestingComment(LCodeGen* gen) const { 464 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
456 return !IsRedundant(); 465 return !IsRedundant();
457 } 466 }
458 467
459 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") 468 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap")
460 }; 469 };
461 470
462 471
463 class LDrop: public LTemplateInstruction<0, 0, 0> { 472 class LDrop V8_FINAL : public LTemplateInstruction<0, 0, 0> {
464 public: 473 public:
465 explicit LDrop(int count) : count_(count) { } 474 explicit LDrop(int count) : count_(count) { }
466 475
467 int count() const { return count_; } 476 int count() const { return count_; }
468 477
469 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop") 478 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop")
470 479
471 private: 480 private:
472 int count_; 481 int count_;
473 }; 482 };
474 483
475 484
476 class LDummyUse: public LTemplateInstruction<1, 1, 0> { 485 class LDummyUse V8_FINAL : public LTemplateInstruction<1, 1, 0> {
477 public: 486 public:
478 explicit LDummyUse(LOperand* value) { 487 explicit LDummyUse(LOperand* value) {
479 inputs_[0] = value; 488 inputs_[0] = value;
480 } 489 }
481 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") 490 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use")
482 }; 491 };
483 492
484 493
485 class LGoto: public LTemplateInstruction<0, 0, 0> { 494 class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> {
486 public: 495 public:
487 explicit LGoto(int block_id) : block_id_(block_id) { } 496 explicit LGoto(int block_id) : block_id_(block_id) { }
488 497
489 virtual bool HasInterestingComment(LCodeGen* gen) const; 498 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE;
490 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") 499 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
491 virtual void PrintDataTo(StringStream* stream); 500 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
492 virtual bool IsControl() const { return true; } 501 virtual bool IsControl() const V8_OVERRIDE { return true; }
493 502
494 int block_id() const { return block_id_; } 503 int block_id() const { return block_id_; }
495 504
496 private: 505 private:
497 int block_id_; 506 int block_id_;
498 }; 507 };
499 508
500 509
501 class LLazyBailout: public LTemplateInstruction<0, 0, 0> { 510 class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> {
502 public: 511 public:
503 LLazyBailout() : gap_instructions_size_(0) { } 512 LLazyBailout() : gap_instructions_size_(0) { }
504 513
505 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout") 514 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout")
506 515
507 void set_gap_instructions_size(int gap_instructions_size) { 516 void set_gap_instructions_size(int gap_instructions_size) {
508 gap_instructions_size_ = gap_instructions_size; 517 gap_instructions_size_ = gap_instructions_size;
509 } 518 }
510 int gap_instructions_size() { return gap_instructions_size_; } 519 int gap_instructions_size() { return gap_instructions_size_; }
511 520
512 private: 521 private:
513 int gap_instructions_size_; 522 int gap_instructions_size_;
514 }; 523 };
515 524
516 525
517 class LLabel: public LGap { 526 class LLabel V8_FINAL : public LGap {
518 public: 527 public:
519 explicit LLabel(HBasicBlock* block) 528 explicit LLabel(HBasicBlock* block)
520 : LGap(block), replacement_(NULL) { } 529 : LGap(block), replacement_(NULL) { }
521 530
522 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } 531 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
532 return false;
533 }
523 DECLARE_CONCRETE_INSTRUCTION(Label, "label") 534 DECLARE_CONCRETE_INSTRUCTION(Label, "label")
524 535
525 virtual void PrintDataTo(StringStream* stream); 536 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
526 537
527 int block_id() const { return block()->block_id(); } 538 int block_id() const { return block()->block_id(); }
528 bool is_loop_header() const { return block()->IsLoopHeader(); } 539 bool is_loop_header() const { return block()->IsLoopHeader(); }
529 bool is_osr_entry() const { return block()->is_osr_entry(); } 540 bool is_osr_entry() const { return block()->is_osr_entry(); }
530 Label* label() { return &label_; } 541 Label* label() { return &label_; }
531 LLabel* replacement() const { return replacement_; } 542 LLabel* replacement() const { return replacement_; }
532 void set_replacement(LLabel* label) { replacement_ = label; } 543 void set_replacement(LLabel* label) { replacement_ = label; }
533 bool HasReplacement() const { return replacement_ != NULL; } 544 bool HasReplacement() const { return replacement_ != NULL; }
534 545
535 private: 546 private:
536 Label label_; 547 Label label_;
537 LLabel* replacement_; 548 LLabel* replacement_;
538 }; 549 };
539 550
540 551
541 class LOsrEntry: public LTemplateInstruction<0, 0, 0> { 552 class LOsrEntry V8_FINAL : public LTemplateInstruction<0, 0, 0> {
542 public: 553 public:
543 LOsrEntry() {} 554 LOsrEntry() {}
544 555
545 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } 556 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
557 return false;
558 }
546 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") 559 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
547 }; 560 };
548 561
549 562
550 class LOuterContext: public LTemplateInstruction<1, 1, 0> { 563 class LOuterContext V8_FINAL : public LTemplateInstruction<1, 1, 0> {
551 public: 564 public:
552 explicit LOuterContext(LOperand* context) { 565 explicit LOuterContext(LOperand* context) {
553 inputs_[0] = context; 566 inputs_[0] = context;
554 } 567 }
555 568
556 LOperand* context() { return inputs_[0]; } 569 LOperand* context() { return inputs_[0]; }
557 570
558 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") 571 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context")
559 }; 572 };
560 573
561 574
562 class LAccessArgumentsAt: public LTemplateInstruction<1, 3, 1> { 575 class LAccessArgumentsAt V8_FINAL : public LTemplateInstruction<1, 3, 1> {
563 public: 576 public:
564 LAccessArgumentsAt(LOperand* arguments, 577 LAccessArgumentsAt(LOperand* arguments,
565 LOperand* length, 578 LOperand* length,
566 LOperand* index, 579 LOperand* index,
567 LOperand* temp) { 580 LOperand* temp) {
568 inputs_[0] = arguments; 581 inputs_[0] = arguments;
569 inputs_[1] = length; 582 inputs_[1] = length;
570 inputs_[2] = index; 583 inputs_[2] = index;
571 temps_[0] = temp; 584 temps_[0] = temp;
572 } 585 }
573 586
574 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") 587 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at")
575 588
576 LOperand* arguments() { return inputs_[0]; } 589 LOperand* arguments() { return inputs_[0]; }
577 LOperand* length() { return inputs_[1]; } 590 LOperand* length() { return inputs_[1]; }
578 LOperand* index() { return inputs_[2]; } 591 LOperand* index() { return inputs_[2]; }
579 LOperand* temp() { return temps_[0]; } 592 LOperand* temp() { return temps_[0]; }
580 593
581 virtual void PrintDataTo(StringStream* stream); 594 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
582 }; 595 };
583 596
584 597
585 class LAddI: public LTemplateInstruction<1, 2, 0> { 598 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
586 public: 599 public:
587 LAddI(LOperand* left, LOperand* right) { 600 LAddI(LOperand* left, LOperand* right) {
588 inputs_[0] = left; 601 inputs_[0] = left;
589 inputs_[1] = right; 602 inputs_[1] = right;
590 } 603 }
591 604
592 LOperand* left() { return inputs_[0]; } 605 LOperand* left() { return inputs_[0]; }
593 LOperand* right() { return inputs_[1]; } 606 LOperand* right() { return inputs_[1]; }
594 607
595 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") 608 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i")
596 DECLARE_HYDROGEN_ACCESSOR(Add) 609 DECLARE_HYDROGEN_ACCESSOR(Add)
597 }; 610 };
598 611
599 612
600 class LAddS: public LTemplateInstruction<1, 2, 0> { 613 class LAddS V8_FINAL : public LTemplateInstruction<1, 2, 0> {
601 public: 614 public:
602 LAddS(LOperand* left, LOperand* right) { 615 LAddS(LOperand* left, LOperand* right) {
603 inputs_[0] = left; 616 inputs_[0] = left;
604 inputs_[1] = right; 617 inputs_[1] = right;
605 } 618 }
606 619
607 LOperand* left() { return inputs_[0]; } 620 LOperand* left() { return inputs_[0]; }
608 LOperand* right() { return inputs_[1]; } 621 LOperand* right() { return inputs_[1]; }
609 622
610 DECLARE_CONCRETE_INSTRUCTION(AddS, "add-s") 623 DECLARE_CONCRETE_INSTRUCTION(AddS, "add-s")
611 DECLARE_HYDROGEN_ACCESSOR(Add) 624 DECLARE_HYDROGEN_ACCESSOR(Add)
612 }; 625 };
613 626
614 627
615 class LAllocate: public LTemplateInstruction<1, 1, 2> { 628 class LAllocate V8_FINAL : public LTemplateInstruction<1, 1, 2> {
616 public: 629 public:
617 // TODO(jbramley): On ia32, this takes a context, and it is used by the 630 // TODO(jbramley): On ia32, this takes a context, and it is used by the
618 // deferred code. On ARM, an LOperand is allocated for another input, but it 631 // deferred code. On ARM, an LOperand is allocated for another input, but it
619 // is never used, and the deferred code doesn't need the context. Why? 632 // is never used, and the deferred code doesn't need the context. Why?
620 LAllocate(LOperand* size, LOperand* temp1, LOperand* temp2) { 633 LAllocate(LOperand* size, LOperand* temp1, LOperand* temp2) {
621 inputs_[0] = size; 634 inputs_[0] = size;
622 temps_[0] = temp1; 635 temps_[0] = temp1;
623 temps_[1] = temp2; 636 temps_[1] = temp2;
624 } 637 }
625 638
626 LOperand* size() { return inputs_[0]; } 639 LOperand* size() { return inputs_[0]; }
627 LOperand* temp1() { return temps_[0]; } 640 LOperand* temp1() { return temps_[0]; }
628 LOperand* temp2() { return temps_[1]; } 641 LOperand* temp2() { return temps_[1]; }
629 642
630 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") 643 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate")
631 DECLARE_HYDROGEN_ACCESSOR(Allocate) 644 DECLARE_HYDROGEN_ACCESSOR(Allocate)
632 }; 645 };
633 646
634 647
635 class LApplyArguments: public LTemplateInstruction<1, 4, 0> { 648 class LApplyArguments V8_FINAL : public LTemplateInstruction<1, 4, 0> {
636 public: 649 public:
637 LApplyArguments(LOperand* function, 650 LApplyArguments(LOperand* function,
638 LOperand* receiver, 651 LOperand* receiver,
639 LOperand* length, 652 LOperand* length,
640 LOperand* elements) { 653 LOperand* elements) {
641 inputs_[0] = function; 654 inputs_[0] = function;
642 inputs_[1] = receiver; 655 inputs_[1] = receiver;
643 inputs_[2] = length; 656 inputs_[2] = length;
644 inputs_[3] = elements; 657 inputs_[3] = elements;
645 } 658 }
646 659
647 DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply-arguments") 660 DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply-arguments")
648 661
649 LOperand* function() { return inputs_[0]; } 662 LOperand* function() { return inputs_[0]; }
650 LOperand* receiver() { return inputs_[1]; } 663 LOperand* receiver() { return inputs_[1]; }
651 LOperand* length() { return inputs_[2]; } 664 LOperand* length() { return inputs_[2]; }
652 LOperand* elements() { return inputs_[3]; } 665 LOperand* elements() { return inputs_[3]; }
653 }; 666 };
654 667
655 668
656 class LArgumentsElements: public LTemplateInstruction<1, 0, 1> { 669 class LArgumentsElements V8_FINAL : public LTemplateInstruction<1, 0, 1> {
657 public: 670 public:
658 explicit LArgumentsElements(LOperand* temp) { 671 explicit LArgumentsElements(LOperand* temp) {
659 temps_[0] = temp; 672 temps_[0] = temp;
660 } 673 }
661 674
662 LOperand* temp() { return temps_[0]; } 675 LOperand* temp() { return temps_[0]; }
663 676
664 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") 677 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements")
665 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) 678 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements)
666 }; 679 };
667 680
668 681
669 class LArgumentsLength: public LTemplateInstruction<1, 1, 0> { 682 class LArgumentsLength V8_FINAL : public LTemplateInstruction<1, 1, 0> {
670 public: 683 public:
671 explicit LArgumentsLength(LOperand* elements) { 684 explicit LArgumentsLength(LOperand* elements) {
672 inputs_[0] = elements; 685 inputs_[0] = elements;
673 } 686 }
674 687
675 LOperand* elements() { return inputs_[0]; } 688 LOperand* elements() { return inputs_[0]; }
676 689
677 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") 690 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length")
678 }; 691 };
679 692
680 693
681 class LArithmeticD: public LTemplateInstruction<1, 2, 0> { 694 class LArithmeticD V8_FINAL : public LTemplateInstruction<1, 2, 0> {
682 public: 695 public:
683 LArithmeticD(Token::Value op, LOperand* left, LOperand* right) 696 LArithmeticD(Token::Value op, LOperand* left, LOperand* right)
684 : op_(op) { 697 : op_(op) {
685 inputs_[0] = left; 698 inputs_[0] = left;
686 inputs_[1] = right; 699 inputs_[1] = right;
687 } 700 }
688 701
689 Token::Value op() const { return op_; } 702 Token::Value op() const { return op_; }
690 LOperand* left() { return inputs_[0]; } 703 LOperand* left() { return inputs_[0]; }
691 LOperand* right() { return inputs_[1]; } 704 LOperand* right() { return inputs_[1]; }
692 705
693 virtual Opcode opcode() const { return LInstruction::kArithmeticD; } 706 virtual Opcode opcode() const V8_OVERRIDE {
694 virtual void CompileToNative(LCodeGen* generator); 707 return LInstruction::kArithmeticD;
695 virtual const char* Mnemonic() const; 708 }
709 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE;
710 virtual const char* Mnemonic() const V8_OVERRIDE;
696 711
697 private: 712 private:
698 Token::Value op_; 713 Token::Value op_;
699 }; 714 };
700 715
701 716
702 class LArithmeticT: public LTemplateInstruction<1, 2, 0> { 717 class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 2, 0> {
703 public: 718 public:
704 LArithmeticT(Token::Value op, LOperand* left, LOperand* right) 719 LArithmeticT(Token::Value op, LOperand* left, LOperand* right)
705 : op_(op) { 720 : op_(op) {
706 inputs_[0] = left; 721 inputs_[0] = left;
707 inputs_[1] = right; 722 inputs_[1] = right;
708 } 723 }
709 724
710 LOperand* left() { return inputs_[0]; } 725 LOperand* left() { return inputs_[0]; }
711 LOperand* right() { return inputs_[1]; } 726 LOperand* right() { return inputs_[1]; }
712 Token::Value op() const { return op_; } 727 Token::Value op() const { return op_; }
713 728
714 virtual Opcode opcode() const { return LInstruction::kArithmeticT; } 729 virtual Opcode opcode() const V8_OVERRIDE {
715 virtual void CompileToNative(LCodeGen* generator); 730 return LInstruction::kArithmeticT;
716 virtual const char* Mnemonic() const; 731 }
732 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE;
733 virtual const char* Mnemonic() const V8_OVERRIDE;
717 734
718 private: 735 private:
719 Token::Value op_; 736 Token::Value op_;
720 }; 737 };
721 738
722 739
723 class LBoundsCheck: public LTemplateInstruction<0, 2, 0> { 740 class LBoundsCheck V8_FINAL : public LTemplateInstruction<0, 2, 0> {
724 public: 741 public:
725 explicit LBoundsCheck(LOperand* index, LOperand* length) { 742 explicit LBoundsCheck(LOperand* index, LOperand* length) {
726 inputs_[0] = index; 743 inputs_[0] = index;
727 inputs_[1] = length; 744 inputs_[1] = length;
728 } 745 }
729 746
730 LOperand* index() { return inputs_[0]; } 747 LOperand* index() { return inputs_[0]; }
731 LOperand* length() { return inputs_[1]; } 748 LOperand* length() { return inputs_[1]; }
732 749
733 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check") 750 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check")
734 DECLARE_HYDROGEN_ACCESSOR(BoundsCheck) 751 DECLARE_HYDROGEN_ACCESSOR(BoundsCheck)
735 }; 752 };
736 753
737 754
738 class LBitI: public LTemplateInstruction<1, 2, 0> { 755 class LBitI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
739 public: 756 public:
740 LBitI(LOperand* left, LOperand* right) { 757 LBitI(LOperand* left, LOperand* right) {
741 inputs_[0] = left; 758 inputs_[0] = left;
742 inputs_[1] = right; 759 inputs_[1] = right;
743 } 760 }
744 761
745 LOperand* left() { return inputs_[0]; } 762 LOperand* left() { return inputs_[0]; }
746 LOperand* right() { return inputs_[1]; } 763 LOperand* right() { return inputs_[1]; }
747 764
748 Token::Value op() const { return hydrogen()->op(); } 765 Token::Value op() const { return hydrogen()->op(); }
749 766
750 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i") 767 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i")
751 DECLARE_HYDROGEN_ACCESSOR(Bitwise) 768 DECLARE_HYDROGEN_ACCESSOR(Bitwise)
752 }; 769 };
753 770
754 771
755 class LBitS: public LTemplateInstruction<1, 2, 0> { 772 class LBitS V8_FINAL : public LTemplateInstruction<1, 2, 0> {
756 public: 773 public:
757 LBitS(LOperand* left, LOperand* right) { 774 LBitS(LOperand* left, LOperand* right) {
758 inputs_[0] = left; 775 inputs_[0] = left;
759 inputs_[1] = right; 776 inputs_[1] = right;
760 } 777 }
761 778
762 LOperand* left() { return inputs_[0]; } 779 LOperand* left() { return inputs_[0]; }
763 LOperand* right() { return inputs_[1]; } 780 LOperand* right() { return inputs_[1]; }
764 781
765 Token::Value op() const { return hydrogen()->op(); } 782 Token::Value op() const { return hydrogen()->op(); }
766 783
767 DECLARE_CONCRETE_INSTRUCTION(BitS, "bit-s") 784 DECLARE_CONCRETE_INSTRUCTION(BitS, "bit-s")
768 DECLARE_HYDROGEN_ACCESSOR(Bitwise) 785 DECLARE_HYDROGEN_ACCESSOR(Bitwise)
769 }; 786 };
770 787
771 788
772 class LBranch: public LControlInstruction<1, 2> { 789 class LBranch V8_FINAL : public LControlInstruction<1, 2> {
773 public: 790 public:
774 explicit LBranch(LOperand* value, LOperand *temp1, LOperand *temp2) { 791 explicit LBranch(LOperand* value, LOperand *temp1, LOperand *temp2) {
775 inputs_[0] = value; 792 inputs_[0] = value;
776 temps_[0] = temp1; 793 temps_[0] = temp1;
777 temps_[1] = temp2; 794 temps_[1] = temp2;
778 } 795 }
779 796
780 LOperand* value() { return inputs_[0]; } 797 LOperand* value() { return inputs_[0]; }
781 LOperand* temp1() { return temps_[0]; } 798 LOperand* temp1() { return temps_[0]; }
782 LOperand* temp2() { return temps_[1]; } 799 LOperand* temp2() { return temps_[1]; }
783 800
784 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") 801 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
785 DECLARE_HYDROGEN_ACCESSOR(Branch) 802 DECLARE_HYDROGEN_ACCESSOR(Branch)
786 803
787 virtual void PrintDataTo(StringStream* stream); 804 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
788 }; 805 };
789 806
790 807
791 class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> { 808 class LCallConstantFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> {
792 public: 809 public:
793 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") 810 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function")
794 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) 811 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction)
795 812
796 virtual void PrintDataTo(StringStream* stream); 813 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
797 814
798 Handle<JSFunction> function() { return hydrogen()->function(); } 815 Handle<JSFunction> function() { return hydrogen()->function(); }
799 int arity() const { return hydrogen()->argument_count() - 1; } 816 int arity() const { return hydrogen()->argument_count() - 1; }
800 }; 817 };
801 818
802 819
803 class LCallFunction: public LTemplateInstruction<1, 1, 0> { 820 class LCallFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> {
804 public: 821 public:
805 explicit LCallFunction(LOperand* function) { 822 explicit LCallFunction(LOperand* function) {
806 inputs_[0] = function; 823 inputs_[0] = function;
807 } 824 }
808 825
809 LOperand* function() { return inputs_[0]; } 826 LOperand* function() { return inputs_[0]; }
810 827
811 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") 828 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function")
812 DECLARE_HYDROGEN_ACCESSOR(CallFunction) 829 DECLARE_HYDROGEN_ACCESSOR(CallFunction)
813 830
814 int arity() const { return hydrogen()->argument_count() - 1; } 831 int arity() const { return hydrogen()->argument_count() - 1; }
815 }; 832 };
816 833
817 834
818 class LCallKnownGlobal: public LTemplateInstruction<1, 0, 0> { 835 class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> {
819 public: 836 public:
820 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") 837 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global")
821 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) 838 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal)
822 839
823 virtual void PrintDataTo(StringStream* stream); 840 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
824 841
825 int arity() const { return hydrogen()->argument_count() - 1; } 842 int arity() const { return hydrogen()->argument_count() - 1; }
826 }; 843 };
827 844
828 845
829 class LCallGlobal: public LTemplateInstruction<1, 0, 0> { 846 class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> {
830 public: 847 public:
831 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") 848 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global")
832 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) 849 DECLARE_HYDROGEN_ACCESSOR(CallGlobal)
833 850
834 virtual void PrintDataTo(StringStream* stream); 851 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
835 852
836 Handle<String> name() const { return hydrogen()->name(); } 853 Handle<String> name() const { return hydrogen()->name(); }
837 int arity() const { return hydrogen()->argument_count() - 1; } 854 int arity() const { return hydrogen()->argument_count() - 1; }
838 }; 855 };
839 856
840 857
841 class LCallKeyed: public LTemplateInstruction<1, 1, 0> { 858 class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 1, 0> {
842 public: 859 public:
843 explicit LCallKeyed(LOperand* key) { 860 explicit LCallKeyed(LOperand* key) {
844 inputs_[0] = key; 861 inputs_[0] = key;
845 } 862 }
846 863
847 LOperand* key() { return inputs_[0]; } 864 LOperand* key() { return inputs_[0]; }
848 865
849 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") 866 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed")
850 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) 867 DECLARE_HYDROGEN_ACCESSOR(CallKeyed)
851 868
852 virtual void PrintDataTo(StringStream* stream); 869 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
853 870
854 int arity() const { return hydrogen()->argument_count() - 1; } 871 int arity() const { return hydrogen()->argument_count() - 1; }
855 }; 872 };
856 873
857 874
858 class LCallNamed: public LTemplateInstruction<1, 0, 0> { 875 class LCallNamed V8_FINAL : public LTemplateInstruction<1, 0, 0> {
859 public: 876 public:
860 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") 877 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named")
861 DECLARE_HYDROGEN_ACCESSOR(CallNamed) 878 DECLARE_HYDROGEN_ACCESSOR(CallNamed)
862 879
863 virtual void PrintDataTo(StringStream* stream); 880 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
864 881
865 Handle<String> name() const { return hydrogen()->name(); } 882 Handle<String> name() const { return hydrogen()->name(); }
866 int arity() const { return hydrogen()->argument_count() - 1; } 883 int arity() const { return hydrogen()->argument_count() - 1; }
867 }; 884 };
868 885
869 886
870 class LCallNew: public LTemplateInstruction<1, 1, 0> { 887 class LCallNew V8_FINAL : public LTemplateInstruction<1, 1, 0> {
871 public: 888 public:
872 explicit LCallNew(LOperand* constructor) { 889 explicit LCallNew(LOperand* constructor) {
873 inputs_[0] = constructor; 890 inputs_[0] = constructor;
874 } 891 }
875 892
876 LOperand* constructor() { return inputs_[0]; } 893 LOperand* constructor() { return inputs_[0]; }
877 894
878 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") 895 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
879 DECLARE_HYDROGEN_ACCESSOR(CallNew) 896 DECLARE_HYDROGEN_ACCESSOR(CallNew)
880 897
881 virtual void PrintDataTo(StringStream* stream); 898 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
882 899
883 int arity() const { return hydrogen()->argument_count() - 1; } 900 int arity() const { return hydrogen()->argument_count() - 1; }
884 }; 901 };
885 902
886 903
887 class LCallNewArray: public LTemplateInstruction<1, 1, 0> { 904 class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 1, 0> {
888 public: 905 public:
889 explicit LCallNewArray(LOperand* constructor) { 906 explicit LCallNewArray(LOperand* constructor) {
890 inputs_[0] = constructor; 907 inputs_[0] = constructor;
891 } 908 }
892 909
893 LOperand* constructor() { return inputs_[0]; } 910 LOperand* constructor() { return inputs_[0]; }
894 911
895 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") 912 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
896 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) 913 DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
897 914
898 virtual void PrintDataTo(StringStream* stream); 915 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
899 916
900 int arity() const { return hydrogen()->argument_count() - 1; } 917 int arity() const { return hydrogen()->argument_count() - 1; }
901 }; 918 };
902 919
903 920
904 class LCallRuntime: public LTemplateInstruction<1, 0, 0> { 921 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> {
905 public: 922 public:
906 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") 923 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
907 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) 924 DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
908 925
909 const Runtime::Function* function() const { return hydrogen()->function(); } 926 const Runtime::Function* function() const { return hydrogen()->function(); }
910 int arity() const { return hydrogen()->argument_count(); } 927 int arity() const { return hydrogen()->argument_count(); }
911 }; 928 };
912 929
913 930
914 class LCallStub: public LTemplateInstruction<1, 0, 0> { 931 class LCallStub V8_FINAL : public LTemplateInstruction<1, 0, 0> {
915 public: 932 public:
916 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") 933 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub")
917 DECLARE_HYDROGEN_ACCESSOR(CallStub) 934 DECLARE_HYDROGEN_ACCESSOR(CallStub)
918 935
919 TranscendentalCache::Type transcendental_type() { 936 TranscendentalCache::Type transcendental_type() {
920 return hydrogen()->transcendental_type(); 937 return hydrogen()->transcendental_type();
921 } 938 }
922 }; 939 };
923 940
924 941
925 class LCheckInstanceType: public LTemplateInstruction<0, 1, 1> { 942 class LCheckInstanceType V8_FINAL : public LTemplateInstruction<0, 1, 1> {
926 public: 943 public:
927 explicit LCheckInstanceType(LOperand* value, LOperand* temp) { 944 explicit LCheckInstanceType(LOperand* value, LOperand* temp) {
928 inputs_[0] = value; 945 inputs_[0] = value;
929 temps_[0] = temp; 946 temps_[0] = temp;
930 } 947 }
931 948
932 LOperand* value() { return inputs_[0]; } 949 LOperand* value() { return inputs_[0]; }
933 LOperand* temp() { return temps_[0]; } 950 LOperand* temp() { return temps_[0]; }
934 951
935 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type") 952 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type")
936 DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType) 953 DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType)
937 }; 954 };
938 955
939 956
940 class LCheckMaps: public LTemplateInstruction<0, 1, 1> { 957 class LCheckMaps V8_FINAL : public LTemplateInstruction<0, 1, 1> {
941 public: 958 public:
942 explicit LCheckMaps(LOperand* value, LOperand* temp = NULL) { 959 explicit LCheckMaps(LOperand* value, LOperand* temp = NULL) {
943 inputs_[0] = value; 960 inputs_[0] = value;
944 temps_[0] = temp; 961 temps_[0] = temp;
945 } 962 }
946 963
947 LOperand* value() { return inputs_[0]; } 964 LOperand* value() { return inputs_[0]; }
948 LOperand* temp() { return temps_[0]; } 965 LOperand* temp() { return temps_[0]; }
949 966
950 DECLARE_CONCRETE_INSTRUCTION(CheckMaps, "check-maps") 967 DECLARE_CONCRETE_INSTRUCTION(CheckMaps, "check-maps")
951 DECLARE_HYDROGEN_ACCESSOR(CheckMaps) 968 DECLARE_HYDROGEN_ACCESSOR(CheckMaps)
952 }; 969 };
953 970
954 971
955 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { 972 class LCheckNonSmi V8_FINAL : public LTemplateInstruction<0, 1, 0> {
956 public: 973 public:
957 explicit LCheckNonSmi(LOperand* value) { 974 explicit LCheckNonSmi(LOperand* value) {
958 inputs_[0] = value; 975 inputs_[0] = value;
959 } 976 }
960 977
961 LOperand* value() { return inputs_[0]; } 978 LOperand* value() { return inputs_[0]; }
962 979
963 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") 980 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi")
964 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject) 981 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject)
965 }; 982 };
966 983
967 984
968 class LCheckSmi: public LTemplateInstruction<1, 1, 0> { 985 class LCheckSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> {
969 public: 986 public:
970 explicit LCheckSmi(LOperand* value) { 987 explicit LCheckSmi(LOperand* value) {
971 inputs_[0] = value; 988 inputs_[0] = value;
972 } 989 }
973 990
974 LOperand* value() { return inputs_[0]; } 991 LOperand* value() { return inputs_[0]; }
975 992
976 DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi") 993 DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi")
977 }; 994 };
978 995
979 996
980 class LCheckValue: public LTemplateInstruction<0, 1, 1> { 997 class LCheckValue V8_FINAL : public LTemplateInstruction<0, 1, 1> {
981 public: 998 public:
982 LCheckValue(LOperand* value, LOperand* temp) { 999 LCheckValue(LOperand* value, LOperand* temp) {
983 inputs_[0] = value; 1000 inputs_[0] = value;
984 temps_[0] = temp; 1001 temps_[0] = temp;
985 } 1002 }
986 1003
987 LOperand* value() { return inputs_[0]; } 1004 LOperand* value() { return inputs_[0]; }
988 LOperand* temp() { return temps_[0]; } 1005 LOperand* temp() { return temps_[0]; }
989 1006
990 DECLARE_CONCRETE_INSTRUCTION(CheckValue, "check-value") 1007 DECLARE_CONCRETE_INSTRUCTION(CheckValue, "check-value")
991 DECLARE_HYDROGEN_ACCESSOR(CheckValue) 1008 DECLARE_HYDROGEN_ACCESSOR(CheckValue)
992 }; 1009 };
993 1010
994 1011
995 class LClampDToUint8: public LTemplateInstruction<1, 1, 0> { 1012 class LClampDToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 0> {
996 public: 1013 public:
997 explicit LClampDToUint8(LOperand* unclamped) { 1014 explicit LClampDToUint8(LOperand* unclamped) {
998 inputs_[0] = unclamped; 1015 inputs_[0] = unclamped;
999 } 1016 }
1000 1017
1001 LOperand* unclamped() { return inputs_[0]; } 1018 LOperand* unclamped() { return inputs_[0]; }
1002 1019
1003 DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8") 1020 DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8")
1004 }; 1021 };
1005 1022
1006 1023
1007 class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { 1024 class LClampIToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1008 public: 1025 public:
1009 explicit LClampIToUint8(LOperand* unclamped) { 1026 explicit LClampIToUint8(LOperand* unclamped) {
1010 inputs_[0] = unclamped; 1027 inputs_[0] = unclamped;
1011 } 1028 }
1012 1029
1013 LOperand* unclamped() { return inputs_[0]; } 1030 LOperand* unclamped() { return inputs_[0]; }
1014 1031
1015 DECLARE_CONCRETE_INSTRUCTION(ClampIToUint8, "clamp-i-to-uint8") 1032 DECLARE_CONCRETE_INSTRUCTION(ClampIToUint8, "clamp-i-to-uint8")
1016 }; 1033 };
1017 1034
1018 1035
1019 class LClampTToUint8: public LTemplateInstruction<1, 1, 2> { 1036 class LClampTToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 2> {
1020 public: 1037 public:
1021 LClampTToUint8(LOperand* unclamped, LOperand* temp1, LOperand* temp2) { 1038 LClampTToUint8(LOperand* unclamped, LOperand* temp1, LOperand* temp2) {
1022 inputs_[0] = unclamped; 1039 inputs_[0] = unclamped;
1023 temps_[0] = temp1; 1040 temps_[0] = temp1;
1024 temps_[1] = temp2; 1041 temps_[1] = temp2;
1025 } 1042 }
1026 1043
1027 LOperand* unclamped() { return inputs_[0]; } 1044 LOperand* unclamped() { return inputs_[0]; }
1028 LOperand* temp1() { return temps_[0]; } 1045 LOperand* temp1() { return temps_[0]; }
1029 LOperand* temp2() { return temps_[1]; } 1046 LOperand* temp2() { return temps_[1]; }
1030 1047
1031 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") 1048 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8")
1032 }; 1049 };
1033 1050
1034 1051
1035 class LClassOfTestAndBranch: public LControlInstruction<1, 2> { 1052 class LClassOfTestAndBranch V8_FINAL : public LControlInstruction<1, 2> {
1036 public: 1053 public:
1037 LClassOfTestAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) { 1054 LClassOfTestAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) {
1038 inputs_[0] = value; 1055 inputs_[0] = value;
1039 temps_[0] = temp1; 1056 temps_[0] = temp1;
1040 temps_[1] = temp2; 1057 temps_[1] = temp2;
1041 } 1058 }
1042 1059
1043 LOperand* value() { return inputs_[0]; } 1060 LOperand* value() { return inputs_[0]; }
1044 LOperand* temp1() { return temps_[0]; } 1061 LOperand* temp1() { return temps_[0]; }
1045 LOperand* temp2() { return temps_[1]; } 1062 LOperand* temp2() { return temps_[1]; }
1046 1063
1047 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, 1064 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch,
1048 "class-of-test-and-branch") 1065 "class-of-test-and-branch")
1049 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) 1066 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
1050 1067
1051 virtual void PrintDataTo(StringStream* stream); 1068 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1052 }; 1069 };
1053 1070
1054 1071
1055 class LCmpHoleAndBranchD: public LControlInstruction<1, 1> { 1072 class LCmpHoleAndBranchD V8_FINAL : public LControlInstruction<1, 1> {
1056 public: 1073 public:
1057 explicit LCmpHoleAndBranchD(LOperand* object, LOperand* temp) { 1074 explicit LCmpHoleAndBranchD(LOperand* object, LOperand* temp) {
1058 inputs_[0] = object; 1075 inputs_[0] = object;
1059 temps_[0] = temp; 1076 temps_[0] = temp;
1060 } 1077 }
1061 1078
1062 LOperand* object() { return inputs_[0]; } 1079 LOperand* object() { return inputs_[0]; }
1063 LOperand* temp() { return temps_[0]; } 1080 LOperand* temp() { return temps_[0]; }
1064 1081
1065 DECLARE_CONCRETE_INSTRUCTION(CmpHoleAndBranchD, "cmp-hole-and-branch-d") 1082 DECLARE_CONCRETE_INSTRUCTION(CmpHoleAndBranchD, "cmp-hole-and-branch-d")
1066 DECLARE_HYDROGEN_ACCESSOR(CompareHoleAndBranch) 1083 DECLARE_HYDROGEN_ACCESSOR(CompareHoleAndBranch)
1067 }; 1084 };
1068 1085
1069 1086
1070 class LCmpHoleAndBranchT: public LControlInstruction<1, 0> { 1087 class LCmpHoleAndBranchT V8_FINAL : public LControlInstruction<1, 0> {
1071 public: 1088 public:
1072 explicit LCmpHoleAndBranchT(LOperand* object) { 1089 explicit LCmpHoleAndBranchT(LOperand* object) {
1073 inputs_[0] = object; 1090 inputs_[0] = object;
1074 } 1091 }
1075 1092
1076 LOperand* object() { return inputs_[0]; } 1093 LOperand* object() { return inputs_[0]; }
1077 1094
1078 DECLARE_CONCRETE_INSTRUCTION(CmpHoleAndBranchT, "cmp-hole-and-branch-t") 1095 DECLARE_CONCRETE_INSTRUCTION(CmpHoleAndBranchT, "cmp-hole-and-branch-t")
1079 DECLARE_HYDROGEN_ACCESSOR(CompareHoleAndBranch) 1096 DECLARE_HYDROGEN_ACCESSOR(CompareHoleAndBranch)
1080 }; 1097 };
1081 1098
1082 1099
1083 class LCmpMapAndBranch: public LControlInstruction<1, 1> { 1100 class LCmpMapAndBranch V8_FINAL : public LControlInstruction<1, 1> {
1084 public: 1101 public:
1085 LCmpMapAndBranch(LOperand* value, LOperand* temp) { 1102 LCmpMapAndBranch(LOperand* value, LOperand* temp) {
1086 inputs_[0] = value; 1103 inputs_[0] = value;
1087 temps_[0] = temp; 1104 temps_[0] = temp;
1088 } 1105 }
1089 1106
1090 LOperand* value() { return inputs_[0]; } 1107 LOperand* value() { return inputs_[0]; }
1091 LOperand* temp() { return temps_[0]; } 1108 LOperand* temp() { return temps_[0]; }
1092 1109
1093 DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch") 1110 DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch")
1094 DECLARE_HYDROGEN_ACCESSOR(CompareMap) 1111 DECLARE_HYDROGEN_ACCESSOR(CompareMap)
1095 1112
1096 Handle<Map> map() const { return hydrogen()->map(); } 1113 Handle<Map> map() const { return hydrogen()->map(); }
1097 }; 1114 };
1098 1115
1099 1116
1100 class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { 1117 class LCmpObjectEqAndBranch V8_FINAL : public LControlInstruction<2, 0> {
1101 public: 1118 public:
1102 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) { 1119 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) {
1103 inputs_[0] = left; 1120 inputs_[0] = left;
1104 inputs_[1] = right; 1121 inputs_[1] = right;
1105 } 1122 }
1106 1123
1107 LOperand* left() { return inputs_[0]; } 1124 LOperand* left() { return inputs_[0]; }
1108 LOperand* right() { return inputs_[1]; } 1125 LOperand* right() { return inputs_[1]; }
1109 1126
1110 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, "cmp-object-eq-and-branch") 1127 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, "cmp-object-eq-and-branch")
1111 DECLARE_HYDROGEN_ACCESSOR(CompareObjectEqAndBranch) 1128 DECLARE_HYDROGEN_ACCESSOR(CompareObjectEqAndBranch)
1112 }; 1129 };
1113 1130
1114 1131
1115 class LCmpT: public LTemplateInstruction<1, 2, 0> { 1132 class LCmpT V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1116 public: 1133 public:
1117 LCmpT(LOperand* left, LOperand* right) { 1134 LCmpT(LOperand* left, LOperand* right) {
1118 inputs_[0] = left; 1135 inputs_[0] = left;
1119 inputs_[1] = right; 1136 inputs_[1] = right;
1120 } 1137 }
1121 1138
1122 LOperand* left() { return inputs_[0]; } 1139 LOperand* left() { return inputs_[0]; }
1123 LOperand* right() { return inputs_[1]; } 1140 LOperand* right() { return inputs_[1]; }
1124 1141
1125 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") 1142 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t")
1126 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) 1143 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric)
1127 1144
1128 Token::Value op() const { return hydrogen()->token(); } 1145 Token::Value op() const { return hydrogen()->token(); }
1129 }; 1146 };
1130 1147
1131 1148
1132 class LCompareNumericAndBranch: public LControlInstruction<2, 0> { 1149 class LCompareNumericAndBranch V8_FINAL : public LControlInstruction<2, 0> {
1133 public: 1150 public:
1134 LCompareNumericAndBranch(LOperand* left, LOperand* right) { 1151 LCompareNumericAndBranch(LOperand* left, LOperand* right) {
1135 inputs_[0] = left; 1152 inputs_[0] = left;
1136 inputs_[1] = right; 1153 inputs_[1] = right;
1137 } 1154 }
1138 1155
1139 LOperand* left() { return inputs_[0]; } 1156 LOperand* left() { return inputs_[0]; }
1140 LOperand* right() { return inputs_[1]; } 1157 LOperand* right() { return inputs_[1]; }
1141 1158
1142 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch, 1159 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch,
1143 "compare-numeric-and-branch") 1160 "compare-numeric-and-branch")
1144 DECLARE_HYDROGEN_ACCESSOR(CompareNumericAndBranch) 1161 DECLARE_HYDROGEN_ACCESSOR(CompareNumericAndBranch)
1145 1162
1146 Token::Value op() const { return hydrogen()->token(); } 1163 Token::Value op() const { return hydrogen()->token(); }
1147 bool is_double() const { 1164 bool is_double() const {
1148 return hydrogen()->representation().IsDouble(); 1165 return hydrogen()->representation().IsDouble();
1149 } 1166 }
1150 1167
1151 virtual void PrintDataTo(StringStream* stream); 1168 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1152 }; 1169 };
1153 1170
1154 1171
1155 class LConstantD: public LTemplateInstruction<1, 0, 0> { 1172 class LConstantD V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1156 public: 1173 public:
1157 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d") 1174 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d")
1158 DECLARE_HYDROGEN_ACCESSOR(Constant) 1175 DECLARE_HYDROGEN_ACCESSOR(Constant)
1159 1176
1160 double value() const { return hydrogen()->DoubleValue(); } 1177 double value() const { return hydrogen()->DoubleValue(); }
1161 }; 1178 };
1162 1179
1163 1180
1164 class LConstantE: public LTemplateInstruction<1, 0, 0> { 1181 class LConstantE V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1165 public: 1182 public:
1166 DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e") 1183 DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e")
1167 DECLARE_HYDROGEN_ACCESSOR(Constant) 1184 DECLARE_HYDROGEN_ACCESSOR(Constant)
1168 1185
1169 ExternalReference value() const { 1186 ExternalReference value() const {
1170 return hydrogen()->ExternalReferenceValue(); 1187 return hydrogen()->ExternalReferenceValue();
1171 } 1188 }
1172 }; 1189 };
1173 1190
1174 1191
1175 class LConstantI: public LTemplateInstruction<1, 0, 0> { 1192 class LConstantI V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1176 public: 1193 public:
1177 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") 1194 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i")
1178 DECLARE_HYDROGEN_ACCESSOR(Constant) 1195 DECLARE_HYDROGEN_ACCESSOR(Constant)
1179 1196
1180 int32_t value() const { return hydrogen()->Integer32Value(); } 1197 int32_t value() const { return hydrogen()->Integer32Value(); }
1181 }; 1198 };
1182 1199
1183 1200
1184 class LConstantS: public LTemplateInstruction<1, 0, 0> { 1201 class LConstantS V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1185 public: 1202 public:
1186 DECLARE_CONCRETE_INSTRUCTION(ConstantS, "constant-s") 1203 DECLARE_CONCRETE_INSTRUCTION(ConstantS, "constant-s")
1187 DECLARE_HYDROGEN_ACCESSOR(Constant) 1204 DECLARE_HYDROGEN_ACCESSOR(Constant)
1188 1205
1189 Smi* value() const { return Smi::FromInt(hydrogen()->Integer32Value()); } 1206 Smi* value() const { return Smi::FromInt(hydrogen()->Integer32Value()); }
1190 }; 1207 };
1191 1208
1192 1209
1193 class LConstantT: public LTemplateInstruction<1, 0, 0> { 1210 class LConstantT V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1194 public: 1211 public:
1195 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") 1212 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t")
1196 DECLARE_HYDROGEN_ACCESSOR(Constant) 1213 DECLARE_HYDROGEN_ACCESSOR(Constant)
1197 1214
1198 Handle<Object> value(Isolate* isolate) const { 1215 Handle<Object> value(Isolate* isolate) const {
1199 return hydrogen()->handle(isolate); 1216 return hydrogen()->handle(isolate);
1200 } 1217 }
1201 }; 1218 };
1202 1219
1203 1220
1204 class LContext: public LTemplateInstruction<1, 0, 0> { 1221 class LContext V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1205 public: 1222 public:
1206 DECLARE_CONCRETE_INSTRUCTION(Context, "context") 1223 DECLARE_CONCRETE_INSTRUCTION(Context, "context")
1207 DECLARE_HYDROGEN_ACCESSOR(Context) 1224 DECLARE_HYDROGEN_ACCESSOR(Context)
1208 }; 1225 };
1209 1226
1210 1227
1211 class LDateField: public LTemplateInstruction<1, 1, 0> { 1228 class LDateField V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1212 public: 1229 public:
1213 LDateField(LOperand* date, Smi* index) : index_(index) { 1230 LDateField(LOperand* date, Smi* index) : index_(index) {
1214 inputs_[0] = date; 1231 inputs_[0] = date;
1215 } 1232 }
1216 1233
1217 LOperand* date() { return inputs_[0]; } 1234 LOperand* date() { return inputs_[0]; }
1218 Smi* index() const { return index_; } 1235 Smi* index() const { return index_; }
1219 1236
1220 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field") 1237 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field")
1221 DECLARE_HYDROGEN_ACCESSOR(DateField) 1238 DECLARE_HYDROGEN_ACCESSOR(DateField)
1222 1239
1223 private: 1240 private:
1224 Smi* index_; 1241 Smi* index_;
1225 }; 1242 };
1226 1243
1227 1244
1228 class LDebugBreak: public LTemplateInstruction<0, 0, 0> { 1245 class LDebugBreak V8_FINAL : public LTemplateInstruction<0, 0, 0> {
1229 public: 1246 public:
1230 DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break") 1247 DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break")
1231 }; 1248 };
1232 1249
1233 1250
1234 class LDeclareGlobals: public LTemplateInstruction<0, 0, 0> { 1251 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 0, 0> {
1235 public: 1252 public:
1236 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") 1253 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals")
1237 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) 1254 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals)
1238 }; 1255 };
1239 1256
1240 1257
1241 class LDeoptimize: public LTemplateInstruction<0, 0, 0> { 1258 class LDeoptimize V8_FINAL : public LTemplateInstruction<0, 0, 0> {
1242 public: 1259 public:
1243 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") 1260 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
1244 DECLARE_HYDROGEN_ACCESSOR(Deoptimize) 1261 DECLARE_HYDROGEN_ACCESSOR(Deoptimize)
1245 }; 1262 };
1246 1263
1247 1264
1248 class LDivI: public LTemplateInstruction<1, 2, 1> { 1265 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> {
1249 public: 1266 public:
1250 LDivI(LOperand* left, LOperand* right, LOperand* temp) { 1267 LDivI(LOperand* left, LOperand* right, LOperand* temp) {
1251 inputs_[0] = left; 1268 inputs_[0] = left;
1252 inputs_[1] = right; 1269 inputs_[1] = right;
1253 temps_[0] = temp; 1270 temps_[0] = temp;
1254 } 1271 }
1255 1272
1256 LOperand* left() { return inputs_[0]; } 1273 LOperand* left() { return inputs_[0]; }
1257 LOperand* right() { return inputs_[1]; } 1274 LOperand* right() { return inputs_[1]; }
1258 LOperand* temp() { return temps_[0]; } 1275 LOperand* temp() { return temps_[0]; }
1259 1276
1260 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") 1277 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i")
1261 DECLARE_HYDROGEN_ACCESSOR(Div) 1278 DECLARE_HYDROGEN_ACCESSOR(Div)
1262 }; 1279 };
1263 1280
1264 1281
1265 class LDoubleToIntOrSmi: public LTemplateInstruction<1, 1, 0> { 1282 class LDoubleToIntOrSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1266 public: 1283 public:
1267 explicit LDoubleToIntOrSmi(LOperand* value) { 1284 explicit LDoubleToIntOrSmi(LOperand* value) {
1268 inputs_[0] = value; 1285 inputs_[0] = value;
1269 } 1286 }
1270 1287
1271 LOperand* value() { return inputs_[0]; } 1288 LOperand* value() { return inputs_[0]; }
1272 1289
1273 DECLARE_CONCRETE_INSTRUCTION(DoubleToIntOrSmi, "double-to-int-or-smi") 1290 DECLARE_CONCRETE_INSTRUCTION(DoubleToIntOrSmi, "double-to-int-or-smi")
1274 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) 1291 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
1275 1292
1276 bool tag_result() { return hydrogen()->representation().IsSmi(); } 1293 bool tag_result() { return hydrogen()->representation().IsSmi(); }
1277 }; 1294 };
1278 1295
1279 1296
1280 class LElementsKind: public LTemplateInstruction<1, 1, 0> { 1297 class LElementsKind V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1281 public: 1298 public:
1282 explicit LElementsKind(LOperand* value) { 1299 explicit LElementsKind(LOperand* value) {
1283 inputs_[0] = value; 1300 inputs_[0] = value;
1284 } 1301 }
1285 1302
1286 LOperand* value() { return inputs_[0]; } 1303 LOperand* value() { return inputs_[0]; }
1287 1304
1288 DECLARE_CONCRETE_INSTRUCTION(ElementsKind, "elements-kind") 1305 DECLARE_CONCRETE_INSTRUCTION(ElementsKind, "elements-kind")
1289 DECLARE_HYDROGEN_ACCESSOR(ElementsKind) 1306 DECLARE_HYDROGEN_ACCESSOR(ElementsKind)
1290 }; 1307 };
1291 1308
1292 1309
1293 class LForInCacheArray: public LTemplateInstruction<1, 1, 0> { 1310 class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1294 public: 1311 public:
1295 explicit LForInCacheArray(LOperand* map) { 1312 explicit LForInCacheArray(LOperand* map) {
1296 inputs_[0] = map; 1313 inputs_[0] = map;
1297 } 1314 }
1298 1315
1299 LOperand* map() { return inputs_[0]; } 1316 LOperand* map() { return inputs_[0]; }
1300 1317
1301 DECLARE_CONCRETE_INSTRUCTION(ForInCacheArray, "for-in-cache-array") 1318 DECLARE_CONCRETE_INSTRUCTION(ForInCacheArray, "for-in-cache-array")
1302 1319
1303 int idx() { 1320 int idx() {
1304 return HForInCacheArray::cast(this->hydrogen_value())->idx(); 1321 return HForInCacheArray::cast(this->hydrogen_value())->idx();
1305 } 1322 }
1306 }; 1323 };
1307 1324
1308 1325
1309 class LForInPrepareMap: public LTemplateInstruction<1, 1, 0> { 1326 class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1310 public: 1327 public:
1311 explicit LForInPrepareMap(LOperand* object) { 1328 explicit LForInPrepareMap(LOperand* object) {
1312 inputs_[0] = object; 1329 inputs_[0] = object;
1313 } 1330 }
1314 1331
1315 LOperand* object() { return inputs_[0]; } 1332 LOperand* object() { return inputs_[0]; }
1316 1333
1317 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map") 1334 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map")
1318 }; 1335 };
1319 1336
1320 1337
1321 class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { 1338 class LGetCachedArrayIndex V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1322 public: 1339 public:
1323 explicit LGetCachedArrayIndex(LOperand* value) { 1340 explicit LGetCachedArrayIndex(LOperand* value) {
1324 inputs_[0] = value; 1341 inputs_[0] = value;
1325 } 1342 }
1326 1343
1327 LOperand* value() { return inputs_[0]; } 1344 LOperand* value() { return inputs_[0]; }
1328 1345
1329 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") 1346 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index")
1330 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) 1347 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex)
1331 }; 1348 };
1332 1349
1333 1350
1334 class LGlobalObject: public LTemplateInstruction<1, 1, 0> { 1351 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1335 public: 1352 public:
1336 explicit LGlobalObject(LOperand* context) { 1353 explicit LGlobalObject(LOperand* context) {
1337 inputs_[0] = context; 1354 inputs_[0] = context;
1338 } 1355 }
1339 1356
1340 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") 1357 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object")
1341 1358
1342 LOperand* context() { return inputs_[0]; } 1359 LOperand* context() { return inputs_[0]; }
1343 }; 1360 };
1344 1361
1345 1362
1346 class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { 1363 class LGlobalReceiver V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1347 public: 1364 public:
1348 explicit LGlobalReceiver(LOperand* global_object) { 1365 explicit LGlobalReceiver(LOperand* global_object) {
1349 inputs_[0] = global_object; 1366 inputs_[0] = global_object;
1350 } 1367 }
1351 1368
1352 LOperand* global_object() { return inputs_[0]; } 1369 LOperand* global_object() { return inputs_[0]; }
1353 1370
1354 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") 1371 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver")
1355 }; 1372 };
1356 1373
1357 1374
1358 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 1> { 1375 class LHasCachedArrayIndexAndBranch V8_FINAL
1376 : public LControlInstruction<1, 1> {
1359 public: 1377 public:
1360 LHasCachedArrayIndexAndBranch(LOperand* value, LOperand* temp) { 1378 LHasCachedArrayIndexAndBranch(LOperand* value, LOperand* temp) {
1361 inputs_[0] = value; 1379 inputs_[0] = value;
1362 temps_[0] = temp; 1380 temps_[0] = temp;
1363 } 1381 }
1364 1382
1365 LOperand* value() { return inputs_[0]; } 1383 LOperand* value() { return inputs_[0]; }
1366 LOperand* temp() { return temps_[0]; } 1384 LOperand* temp() { return temps_[0]; }
1367 1385
1368 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, 1386 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch,
1369 "has-cached-array-index-and-branch") 1387 "has-cached-array-index-and-branch")
1370 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch) 1388 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
1371 1389
1372 virtual void PrintDataTo(StringStream* stream); 1390 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1373 }; 1391 };
1374 1392
1375 1393
1376 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 1> { 1394 class LHasInstanceTypeAndBranch V8_FINAL : public LControlInstruction<1, 1> {
1377 public: 1395 public:
1378 LHasInstanceTypeAndBranch(LOperand* value, LOperand* temp) { 1396 LHasInstanceTypeAndBranch(LOperand* value, LOperand* temp) {
1379 inputs_[0] = value; 1397 inputs_[0] = value;
1380 temps_[0] = temp; 1398 temps_[0] = temp;
1381 } 1399 }
1382 1400
1383 LOperand* value() { return inputs_[0]; } 1401 LOperand* value() { return inputs_[0]; }
1384 LOperand* temp() { return temps_[0]; } 1402 LOperand* temp() { return temps_[0]; }
1385 1403
1386 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, 1404 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch,
1387 "has-instance-type-and-branch") 1405 "has-instance-type-and-branch")
1388 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) 1406 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
1389 1407
1390 virtual void PrintDataTo(StringStream* stream); 1408 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1391 }; 1409 };
1392 1410
1393 1411
1394 class LInnerAllocatedObject: public LTemplateInstruction<1, 1, 0> { 1412 class LInnerAllocatedObject V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1395 public: 1413 public:
1396 explicit LInnerAllocatedObject(LOperand* base_object) { 1414 explicit LInnerAllocatedObject(LOperand* base_object) {
1397 inputs_[0] = base_object; 1415 inputs_[0] = base_object;
1398 } 1416 }
1399 1417
1400 LOperand* base_object() { return inputs_[0]; } 1418 LOperand* base_object() { return inputs_[0]; }
1401 int offset() { return hydrogen()->offset(); } 1419 int offset() { return hydrogen()->offset(); }
1402 1420
1403 virtual void PrintDataTo(StringStream* stream); 1421 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1404 1422
1405 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "sub-allocated-object") 1423 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "sub-allocated-object")
1406 DECLARE_HYDROGEN_ACCESSOR(InnerAllocatedObject) 1424 DECLARE_HYDROGEN_ACCESSOR(InnerAllocatedObject)
1407 }; 1425 };
1408 1426
1409 1427
1410 class LInstanceOf: public LTemplateInstruction<1, 2, 0> { 1428 class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1411 public: 1429 public:
1412 LInstanceOf(LOperand* left, LOperand* right) { 1430 LInstanceOf(LOperand* left, LOperand* right) {
1413 inputs_[0] = left; 1431 inputs_[0] = left;
1414 inputs_[1] = right; 1432 inputs_[1] = right;
1415 } 1433 }
1416 1434
1417 LOperand* left() { return inputs_[0]; } 1435 LOperand* left() { return inputs_[0]; }
1418 LOperand* right() { return inputs_[1]; } 1436 LOperand* right() { return inputs_[1]; }
1419 1437
1420 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") 1438 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of")
1421 }; 1439 };
1422 1440
1423 1441
1424 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 0> { 1442 class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1425 public: 1443 public:
1426 explicit LInstanceOfKnownGlobal(LOperand* value) { 1444 explicit LInstanceOfKnownGlobal(LOperand* value) {
1427 inputs_[0] = value; 1445 inputs_[0] = value;
1428 } 1446 }
1429 1447
1430 LOperand* value() { return inputs_[0]; } 1448 LOperand* value() { return inputs_[0]; }
1431 1449
1432 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, 1450 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
1433 "instance-of-known-global") 1451 "instance-of-known-global")
1434 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) 1452 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
1435 1453
1436 Handle<JSFunction> function() const { return hydrogen()->function(); } 1454 Handle<JSFunction> function() const { return hydrogen()->function(); }
1437 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { 1455 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() {
1438 return lazy_deopt_env_; 1456 return lazy_deopt_env_;
1439 } 1457 }
1440 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { 1458 virtual void SetDeferredLazyDeoptimizationEnvironment(
1459 LEnvironment* env) V8_OVERRIDE {
1441 lazy_deopt_env_ = env; 1460 lazy_deopt_env_ = env;
1442 } 1461 }
1443 1462
1444 private: 1463 private:
1445 LEnvironment* lazy_deopt_env_; 1464 LEnvironment* lazy_deopt_env_;
1446 }; 1465 };
1447 1466
1448 1467
1449 class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { 1468 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1450 public: 1469 public:
1451 explicit LInteger32ToDouble(LOperand* value) { 1470 explicit LInteger32ToDouble(LOperand* value) {
1452 inputs_[0] = value; 1471 inputs_[0] = value;
1453 } 1472 }
1454 1473
1455 LOperand* value() { return inputs_[0]; } 1474 LOperand* value() { return inputs_[0]; }
1456 1475
1457 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") 1476 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double")
1458 }; 1477 };
1459 1478
1460 1479
1461 class LInteger32ToSmi: public LTemplateInstruction<1, 1, 0> { 1480 class LInteger32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1462 public: 1481 public:
1463 explicit LInteger32ToSmi(LOperand* value) { 1482 explicit LInteger32ToSmi(LOperand* value) {
1464 inputs_[0] = value; 1483 inputs_[0] = value;
1465 } 1484 }
1466 1485
1467 LOperand* value() { return inputs_[0]; } 1486 LOperand* value() { return inputs_[0]; }
1468 1487
1469 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-smi") 1488 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-smi")
1470 DECLARE_HYDROGEN_ACCESSOR(Change) 1489 DECLARE_HYDROGEN_ACCESSOR(Change)
1471 }; 1490 };
1472 1491
1473 1492
1474 class LInvokeFunction: public LTemplateInstruction<1, 1, 0> { 1493 class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1475 public: 1494 public:
1476 explicit LInvokeFunction(LOperand* function) { 1495 explicit LInvokeFunction(LOperand* function) {
1477 inputs_[0] = function; 1496 inputs_[0] = function;
1478 } 1497 }
1479 1498
1480 LOperand* function() { return inputs_[0]; } 1499 LOperand* function() { return inputs_[0]; }
1481 1500
1482 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") 1501 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
1483 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) 1502 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
1484 1503
1485 virtual void PrintDataTo(StringStream* stream); 1504 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1486 1505
1487 int arity() const { return hydrogen()->argument_count() - 1; } 1506 int arity() const { return hydrogen()->argument_count() - 1; }
1488 }; 1507 };
1489 1508
1490 1509
1491 class LIsConstructCallAndBranch: public LControlInstruction<0, 2> { 1510 class LIsConstructCallAndBranch V8_FINAL : public LControlInstruction<0, 2> {
1492 public: 1511 public:
1493 LIsConstructCallAndBranch(LOperand* temp1, LOperand* temp2) { 1512 LIsConstructCallAndBranch(LOperand* temp1, LOperand* temp2) {
1494 temps_[0] = temp1; 1513 temps_[0] = temp1;
1495 temps_[1] = temp2; 1514 temps_[1] = temp2;
1496 } 1515 }
1497 1516
1498 LOperand* temp1() { return temps_[0]; } 1517 LOperand* temp1() { return temps_[0]; }
1499 LOperand* temp2() { return temps_[1]; } 1518 LOperand* temp2() { return temps_[1]; }
1500 1519
1501 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, 1520 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch,
1502 "is-construct-call-and-branch") 1521 "is-construct-call-and-branch")
1503 }; 1522 };
1504 1523
1505 1524
1506 class LIsNumberAndBranch: public LControlInstruction<1, 0> { 1525 class LIsNumberAndBranch V8_FINAL : public LControlInstruction<1, 0> {
1507 public: 1526 public:
1508 explicit LIsNumberAndBranch(LOperand* value) { 1527 explicit LIsNumberAndBranch(LOperand* value) {
1509 inputs_[0] = value; 1528 inputs_[0] = value;
1510 } 1529 }
1511 1530
1512 LOperand* value() { return inputs_[0]; } 1531 LOperand* value() { return inputs_[0]; }
1513 1532
1514 DECLARE_CONCRETE_INSTRUCTION(IsNumberAndBranch, "is-number-and-branch") 1533 DECLARE_CONCRETE_INSTRUCTION(IsNumberAndBranch, "is-number-and-branch")
1515 DECLARE_HYDROGEN_ACCESSOR(IsNumberAndBranch) 1534 DECLARE_HYDROGEN_ACCESSOR(IsNumberAndBranch)
1516 }; 1535 };
1517 1536
1518 1537
1519 class LIsObjectAndBranch: public LControlInstruction<1, 2> { 1538 class LIsObjectAndBranch V8_FINAL : public LControlInstruction<1, 2> {
1520 public: 1539 public:
1521 LIsObjectAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) { 1540 LIsObjectAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) {
1522 inputs_[0] = value; 1541 inputs_[0] = value;
1523 temps_[0] = temp1; 1542 temps_[0] = temp1;
1524 temps_[1] = temp2; 1543 temps_[1] = temp2;
1525 } 1544 }
1526 1545
1527 LOperand* value() { return inputs_[0]; } 1546 LOperand* value() { return inputs_[0]; }
1528 LOperand* temp1() { return temps_[0]; } 1547 LOperand* temp1() { return temps_[0]; }
1529 LOperand* temp2() { return temps_[1]; } 1548 LOperand* temp2() { return temps_[1]; }
1530 1549
1531 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") 1550 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
1532 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) 1551 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
1533 1552
1534 virtual void PrintDataTo(StringStream* stream); 1553 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1535 }; 1554 };
1536 1555
1537 1556
1538 class LIsStringAndBranch: public LControlInstruction<1, 1> { 1557 class LIsStringAndBranch V8_FINAL : public LControlInstruction<1, 1> {
1539 public: 1558 public:
1540 LIsStringAndBranch(LOperand* value, LOperand* temp) { 1559 LIsStringAndBranch(LOperand* value, LOperand* temp) {
1541 inputs_[0] = value; 1560 inputs_[0] = value;
1542 temps_[0] = temp; 1561 temps_[0] = temp;
1543 } 1562 }
1544 1563
1545 LOperand* value() { return inputs_[0]; } 1564 LOperand* value() { return inputs_[0]; }
1546 LOperand* temp() { return temps_[0]; } 1565 LOperand* temp() { return temps_[0]; }
1547 1566
1548 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") 1567 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
1549 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) 1568 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
1550 1569
1551 virtual void PrintDataTo(StringStream* stream); 1570 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1552 }; 1571 };
1553 1572
1554 1573
1555 class LIsSmiAndBranch: public LControlInstruction<1, 0> { 1574 class LIsSmiAndBranch V8_FINAL : public LControlInstruction<1, 0> {
1556 public: 1575 public:
1557 explicit LIsSmiAndBranch(LOperand* value) { 1576 explicit LIsSmiAndBranch(LOperand* value) {
1558 inputs_[0] = value; 1577 inputs_[0] = value;
1559 } 1578 }
1560 1579
1561 LOperand* value() { return inputs_[0]; } 1580 LOperand* value() { return inputs_[0]; }
1562 1581
1563 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") 1582 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
1564 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) 1583 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
1565 1584
1566 virtual void PrintDataTo(StringStream* stream); 1585 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1567 }; 1586 };
1568 1587
1569 1588
1570 class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { 1589 class LIsUndetectableAndBranch V8_FINAL : public LControlInstruction<1, 1> {
1571 public: 1590 public:
1572 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { 1591 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) {
1573 inputs_[0] = value; 1592 inputs_[0] = value;
1574 temps_[0] = temp; 1593 temps_[0] = temp;
1575 } 1594 }
1576 1595
1577 LOperand* value() { return inputs_[0]; } 1596 LOperand* value() { return inputs_[0]; }
1578 LOperand* temp() { return temps_[0]; } 1597 LOperand* temp() { return temps_[0]; }
1579 1598
1580 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, 1599 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch,
1581 "is-undetectable-and-branch") 1600 "is-undetectable-and-branch")
1582 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) 1601 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
1583 1602
1584 virtual void PrintDataTo(StringStream* stream); 1603 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1585 }; 1604 };
1586 1605
1587 1606
1588 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { 1607 class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1589 public: 1608 public:
1590 explicit LLoadContextSlot(LOperand* context) { 1609 explicit LLoadContextSlot(LOperand* context) {
1591 inputs_[0] = context; 1610 inputs_[0] = context;
1592 } 1611 }
1593 1612
1594 LOperand* context() { return inputs_[0]; } 1613 LOperand* context() { return inputs_[0]; }
1595 1614
1596 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") 1615 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot")
1597 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) 1616 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot)
1598 1617
1599 int slot_index() { return hydrogen()->slot_index(); } 1618 int slot_index() const { return hydrogen()->slot_index(); }
1600 1619
1601 virtual void PrintDataTo(StringStream* stream); 1620 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1602 }; 1621 };
1603 1622
1604 1623
1605 class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { 1624 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1606 public: 1625 public:
1607 explicit LLoadNamedField(LOperand* object) { 1626 explicit LLoadNamedField(LOperand* object) {
1608 inputs_[0] = object; 1627 inputs_[0] = object;
1609 } 1628 }
1610 1629
1611 LOperand* object() { return inputs_[0]; } 1630 LOperand* object() { return inputs_[0]; }
1612 1631
1613 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") 1632 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field")
1614 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) 1633 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField)
1615 }; 1634 };
1616 1635
1617 1636
1618 class LFunctionLiteral: public LTemplateInstruction<1, 0, 0> { 1637 class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1619 public: 1638 public:
1620 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") 1639 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal")
1621 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) 1640 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral)
1622 }; 1641 };
1623 1642
1624 1643
1625 class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> { 1644 class LLoadExternalArrayPointer V8_FINAL
1645 : public LTemplateInstruction<1, 1, 0> {
1626 public: 1646 public:
1627 explicit LLoadExternalArrayPointer(LOperand* object) { 1647 explicit LLoadExternalArrayPointer(LOperand* object) {
1628 inputs_[0] = object; 1648 inputs_[0] = object;
1629 } 1649 }
1630 1650
1631 LOperand* object() { return inputs_[0]; } 1651 LOperand* object() { return inputs_[0]; }
1632 1652
1633 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer, 1653 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer,
1634 "load-external-array-pointer") 1654 "load-external-array-pointer")
1635 }; 1655 };
1636 1656
1637 1657
1638 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 1> { 1658 class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 1> {
1639 public: 1659 public:
1640 LLoadFunctionPrototype(LOperand* function, LOperand* temp) { 1660 LLoadFunctionPrototype(LOperand* function, LOperand* temp) {
1641 inputs_[0] = function; 1661 inputs_[0] = function;
1642 temps_[0] = temp; 1662 temps_[0] = temp;
1643 } 1663 }
1644 1664
1645 LOperand* function() { return inputs_[0]; } 1665 LOperand* function() { return inputs_[0]; }
1646 LOperand* temp() { return temps_[0]; } 1666 LOperand* temp() { return temps_[0]; }
1647 1667
1648 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype") 1668 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype")
1649 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype) 1669 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype)
1650 }; 1670 };
1651 1671
1652 1672
1653 class LLoadGlobalCell: public LTemplateInstruction<1, 0, 0> { 1673 class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1654 public: 1674 public:
1655 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") 1675 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell")
1656 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) 1676 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell)
1657 }; 1677 };
1658 1678
1659 1679
1660 class LLoadGlobalGeneric: public LTemplateInstruction<1, 1, 0> { 1680 class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1661 public: 1681 public:
1662 explicit LLoadGlobalGeneric(LOperand* global_object) { 1682 explicit LLoadGlobalGeneric(LOperand* global_object) {
1663 inputs_[0] = global_object; 1683 inputs_[0] = global_object;
1664 } 1684 }
1665 1685
1666 LOperand* global_object() { return inputs_[0]; } 1686 LOperand* global_object() { return inputs_[0]; }
1667 1687
1668 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") 1688 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic")
1669 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) 1689 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric)
1670 1690
1671 Handle<Object> name() const { return hydrogen()->name(); } 1691 Handle<Object> name() const { return hydrogen()->name(); }
1672 bool for_typeof() const { return hydrogen()->for_typeof(); } 1692 bool for_typeof() const { return hydrogen()->for_typeof(); }
1673 }; 1693 };
1674 1694
1675 1695
1676 template<int T> 1696 template<int T>
1677 class LLoadKeyed: public LTemplateInstruction<1, 2, T> { 1697 class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, T> {
1678 public: 1698 public:
1679 LLoadKeyed(LOperand* elements, LOperand* key) { 1699 LLoadKeyed(LOperand* elements, LOperand* key) {
1680 this->inputs_[0] = elements; 1700 this->inputs_[0] = elements;
1681 this->inputs_[1] = key; 1701 this->inputs_[1] = key;
1682 } 1702 }
1683 1703
1684 LOperand* elements() { return this->inputs_[0]; } 1704 LOperand* elements() { return this->inputs_[0]; }
1685 LOperand* key() { return this->inputs_[1]; } 1705 LOperand* key() { return this->inputs_[1]; }
1686 ElementsKind elements_kind() const { 1706 ElementsKind elements_kind() const {
1687 return this->hydrogen()->elements_kind(); 1707 return this->hydrogen()->elements_kind();
1688 } 1708 }
1689 bool is_external() const { 1709 bool is_external() const {
1690 return this->hydrogen()->is_external(); 1710 return this->hydrogen()->is_external();
1691 } 1711 }
1692 uint32_t additional_index() const { 1712 uint32_t additional_index() const {
1693 return this->hydrogen()->index_offset(); 1713 return this->hydrogen()->index_offset();
1694 } 1714 }
1695 void PrintDataTo(StringStream* stream) { 1715 void PrintDataTo(StringStream* stream) V8_OVERRIDE {
1696 this->elements()->PrintTo(stream); 1716 this->elements()->PrintTo(stream);
1697 stream->Add("["); 1717 stream->Add("[");
1698 this->key()->PrintTo(stream); 1718 this->key()->PrintTo(stream);
1699 if (this->hydrogen()->IsDehoisted()) { 1719 if (this->hydrogen()->IsDehoisted()) {
1700 stream->Add(" + %d]", this->additional_index()); 1720 stream->Add(" + %d]", this->additional_index());
1701 } else { 1721 } else {
1702 stream->Add("]"); 1722 stream->Add("]");
1703 } 1723 }
1704 } 1724 }
1705 1725
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1739 LLoadKeyed<1>(elements, key) { 1759 LLoadKeyed<1>(elements, key) {
1740 temps_[0] = temp; 1760 temps_[0] = temp;
1741 } 1761 }
1742 1762
1743 LOperand* temp() { return temps_[0]; } 1763 LOperand* temp() { return temps_[0]; }
1744 1764
1745 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFixedDouble, "load-keyed-fixed-double"); 1765 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFixedDouble, "load-keyed-fixed-double");
1746 }; 1766 };
1747 1767
1748 1768
1749 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { 1769 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1750 public: 1770 public:
1751 LLoadKeyedGeneric(LOperand* object, LOperand* key) { 1771 LLoadKeyedGeneric(LOperand* object, LOperand* key) {
1752 inputs_[0] = object; 1772 inputs_[0] = object;
1753 inputs_[1] = key; 1773 inputs_[1] = key;
1754 } 1774 }
1755 1775
1756 LOperand* object() { return inputs_[0]; } 1776 LOperand* object() { return inputs_[0]; }
1757 LOperand* key() { return inputs_[1]; } 1777 LOperand* key() { return inputs_[1]; }
1758 1778
1759 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") 1779 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic")
1760 }; 1780 };
1761 1781
1762 1782
1763 class LLoadNamedGeneric: public LTemplateInstruction<1, 1, 0> { 1783 class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1764 public: 1784 public:
1765 explicit LLoadNamedGeneric(LOperand* object) { 1785 explicit LLoadNamedGeneric(LOperand* object) {
1766 inputs_[0] = object; 1786 inputs_[0] = object;
1767 } 1787 }
1768 1788
1769 LOperand* object() { return inputs_[0]; } 1789 LOperand* object() { return inputs_[0]; }
1770 1790
1771 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") 1791 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic")
1772 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) 1792 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric)
1773 1793
1774 Handle<Object> name() const { return hydrogen()->name(); } 1794 Handle<Object> name() const { return hydrogen()->name(); }
1775 }; 1795 };
1776 1796
1777 1797
1778 class LMapEnumLength: public LTemplateInstruction<1, 1, 0> { 1798 class LMapEnumLength V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1779 public: 1799 public:
1780 explicit LMapEnumLength(LOperand* value) { 1800 explicit LMapEnumLength(LOperand* value) {
1781 inputs_[0] = value; 1801 inputs_[0] = value;
1782 } 1802 }
1783 1803
1784 LOperand* value() { return inputs_[0]; } 1804 LOperand* value() { return inputs_[0]; }
1785 1805
1786 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") 1806 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length")
1787 }; 1807 };
1788 1808
1789 1809
1790 template<int T> 1810 template<int T>
1791 class LUnaryMathOperation: public LTemplateInstruction<1, 1, T> { 1811 class LUnaryMathOperation V8_FINAL : public LTemplateInstruction<1, 1, T> {
1792 public: 1812 public:
1793 explicit LUnaryMathOperation(LOperand* value) { 1813 explicit LUnaryMathOperation(LOperand* value) {
1794 this->inputs_[0] = value; 1814 this->inputs_[0] = value;
1795 } 1815 }
1796 1816
1797 LOperand* value() { return this->inputs_[0]; } 1817 LOperand* value() { return this->inputs_[0]; }
1798 BuiltinFunctionId op() const { return this->hydrogen()->op(); } 1818 BuiltinFunctionId op() const { return this->hydrogen()->op(); }
1799 1819
1800 void PrintDataTo(StringStream* stream); 1820 void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1801 1821
1802 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 1822 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
1803 }; 1823 };
1804 1824
1805 1825
1806 class LMathAbs: public LUnaryMathOperation<0> { 1826 class LMathAbs V8_FINAL : public LUnaryMathOperation<0> {
1807 public: 1827 public:
1808 explicit LMathAbs(LOperand* value) : LUnaryMathOperation<0>(value) { } 1828 explicit LMathAbs(LOperand* value) : LUnaryMathOperation<0>(value) { }
1809 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs") 1829 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs")
1810 }; 1830 };
1811 1831
1812 1832
1813 class LMathAbsTagged: public LUnaryMathOperation<3> { 1833 class LMathAbsTagged: public LUnaryMathOperation<3> {
1814 public: 1834 public:
1815 LMathAbsTagged(LOperand* value, 1835 LMathAbsTagged(LOperand* value,
1816 LOperand* temp1, LOperand* temp2, LOperand* temp3) 1836 LOperand* temp1, LOperand* temp2, LOperand* temp3)
1817 : LUnaryMathOperation<3>(value) { 1837 : LUnaryMathOperation<3>(value) {
1818 temps_[0] = temp1; 1838 temps_[0] = temp1;
1819 temps_[1] = temp2; 1839 temps_[1] = temp2;
1820 temps_[2] = temp3; 1840 temps_[2] = temp3;
1821 } 1841 }
1822 1842
1823 LOperand* temp1() { return temps_[0]; } 1843 LOperand* temp1() { return temps_[0]; }
1824 LOperand* temp2() { return temps_[1]; } 1844 LOperand* temp2() { return temps_[1]; }
1825 LOperand* temp3() { return temps_[2]; } 1845 LOperand* temp3() { return temps_[2]; }
1826 1846
1827 DECLARE_CONCRETE_INSTRUCTION(MathAbsTagged, "math-abs-tagged") 1847 DECLARE_CONCRETE_INSTRUCTION(MathAbsTagged, "math-abs-tagged")
1828 }; 1848 };
1829 1849
1830 1850
1831 class LMathCos: public LUnaryMathOperation<0> { 1851 class LMathCos V8_FINAL : public LUnaryMathOperation<0> {
1832 public: 1852 public:
1833 explicit LMathCos(LOperand* value) : LUnaryMathOperation<0>(value) { } 1853 explicit LMathCos(LOperand* value) : LUnaryMathOperation<0>(value) { }
1834 DECLARE_CONCRETE_INSTRUCTION(MathCos, "math-cos") 1854 DECLARE_CONCRETE_INSTRUCTION(MathCos, "math-cos")
1835 }; 1855 };
1836 1856
1837 1857
1838 class LMathExp: public LUnaryMathOperation<4> { 1858 class LMathExp V8_FINAL : public LUnaryMathOperation<4> {
1839 public: 1859 public:
1840 LMathExp(LOperand* value, 1860 LMathExp(LOperand* value,
1841 LOperand* double_temp1, 1861 LOperand* double_temp1,
1842 LOperand* temp1, 1862 LOperand* temp1,
1843 LOperand* temp2, 1863 LOperand* temp2,
1844 LOperand* temp3) 1864 LOperand* temp3)
1845 : LUnaryMathOperation<4>(value) { 1865 : LUnaryMathOperation<4>(value) {
1846 temps_[0] = double_temp1; 1866 temps_[0] = double_temp1;
1847 temps_[1] = temp1; 1867 temps_[1] = temp1;
1848 temps_[2] = temp2; 1868 temps_[2] = temp2;
1849 temps_[3] = temp3; 1869 temps_[3] = temp3;
1850 ExternalReference::InitializeMathExpData(); 1870 ExternalReference::InitializeMathExpData();
1851 } 1871 }
1852 1872
1853 LOperand* double_temp1() { return temps_[0]; } 1873 LOperand* double_temp1() { return temps_[0]; }
1854 LOperand* temp1() { return temps_[1]; } 1874 LOperand* temp1() { return temps_[1]; }
1855 LOperand* temp2() { return temps_[2]; } 1875 LOperand* temp2() { return temps_[2]; }
1856 LOperand* temp3() { return temps_[3]; } 1876 LOperand* temp3() { return temps_[3]; }
1857 1877
1858 DECLARE_CONCRETE_INSTRUCTION(MathExp, "math-exp") 1878 DECLARE_CONCRETE_INSTRUCTION(MathExp, "math-exp")
1859 }; 1879 };
1860 1880
1861 1881
1862 class LMathFloor: public LUnaryMathOperation<0> { 1882 class LMathFloor V8_FINAL : public LUnaryMathOperation<0> {
1863 public: 1883 public:
1864 explicit LMathFloor(LOperand* value) : LUnaryMathOperation<0>(value) { } 1884 explicit LMathFloor(LOperand* value) : LUnaryMathOperation<0>(value) { }
1865 DECLARE_CONCRETE_INSTRUCTION(MathFloor, "math-floor") 1885 DECLARE_CONCRETE_INSTRUCTION(MathFloor, "math-floor")
1866 }; 1886 };
1867 1887
1868 1888
1869 class LMathFloorOfDiv : public LTemplateInstruction<1, 2, 1> { 1889 class LMathFloorOfDiv V8_FINAL : public LTemplateInstruction<1, 2, 1> {
1870 public: 1890 public:
1871 LMathFloorOfDiv(LOperand* left, 1891 LMathFloorOfDiv(LOperand* left,
1872 LOperand* right, 1892 LOperand* right,
1873 LOperand* temp = NULL) { 1893 LOperand* temp = NULL) {
1874 inputs_[0] = left; 1894 inputs_[0] = left;
1875 inputs_[1] = right; 1895 inputs_[1] = right;
1876 temps_[0] = temp; 1896 temps_[0] = temp;
1877 } 1897 }
1878 1898
1879 LOperand* left() { return inputs_[0]; } 1899 LOperand* left() { return inputs_[0]; }
1880 LOperand* right() { return inputs_[1]; } 1900 LOperand* right() { return inputs_[1]; }
1881 LOperand* temp() { return temps_[0]; } 1901 LOperand* temp() { return temps_[0]; }
1882 1902
1883 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") 1903 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div")
1884 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) 1904 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
1885 }; 1905 };
1886 1906
1887 1907
1888 class LMathLog: public LUnaryMathOperation<0> { 1908 class LMathLog V8_FINAL : public LUnaryMathOperation<0> {
1889 public: 1909 public:
1890 explicit LMathLog(LOperand* value) : LUnaryMathOperation<0>(value) { } 1910 explicit LMathLog(LOperand* value) : LUnaryMathOperation<0>(value) { }
1891 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log") 1911 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log")
1892 }; 1912 };
1893 1913
1894 1914
1895 class LMathMinMax: public LTemplateInstruction<1, 2, 0> { 1915 class LMathMinMax V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1896 public: 1916 public:
1897 LMathMinMax(LOperand* left, LOperand* right) { 1917 LMathMinMax(LOperand* left, LOperand* right) {
1898 inputs_[0] = left; 1918 inputs_[0] = left;
1899 inputs_[1] = right; 1919 inputs_[1] = right;
1900 } 1920 }
1901 1921
1902 LOperand* left() { return inputs_[0]; } 1922 LOperand* left() { return inputs_[0]; }
1903 LOperand* right() { return inputs_[1]; } 1923 LOperand* right() { return inputs_[1]; }
1904 1924
1905 DECLARE_CONCRETE_INSTRUCTION(MathMinMax, "math-min-max") 1925 DECLARE_CONCRETE_INSTRUCTION(MathMinMax, "math-min-max")
1906 DECLARE_HYDROGEN_ACCESSOR(MathMinMax) 1926 DECLARE_HYDROGEN_ACCESSOR(MathMinMax)
1907 }; 1927 };
1908 1928
1909 1929
1910 class LMathPowHalf: public LUnaryMathOperation<0> { 1930 class LMathPowHalf V8_FINAL : public LUnaryMathOperation<0> {
1911 public: 1931 public:
1912 explicit LMathPowHalf(LOperand* value) : LUnaryMathOperation<0>(value) { } 1932 explicit LMathPowHalf(LOperand* value) : LUnaryMathOperation<0>(value) { }
1913 DECLARE_CONCRETE_INSTRUCTION(MathPowHalf, "math-pow-half") 1933 DECLARE_CONCRETE_INSTRUCTION(MathPowHalf, "math-pow-half")
1914 }; 1934 };
1915 1935
1916 1936
1917 class LMathRound: public LUnaryMathOperation<1> { 1937 class LMathRound V8_FINAL : public LUnaryMathOperation<1> {
1918 public: 1938 public:
1919 LMathRound(LOperand* value, LOperand* temp1) 1939 LMathRound(LOperand* value, LOperand* temp1)
1920 : LUnaryMathOperation<1>(value) { 1940 : LUnaryMathOperation<1>(value) {
1921 temps_[0] = temp1; 1941 temps_[0] = temp1;
1922 } 1942 }
1923 1943
1924 LOperand* temp1() { return temps_[0]; } 1944 LOperand* temp1() { return temps_[0]; }
1925 1945
1926 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round") 1946 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round")
1927 }; 1947 };
1928 1948
1929 1949
1930 class LMathSin: public LUnaryMathOperation<0> { 1950 class LMathSin V8_FINAL : public LUnaryMathOperation<0> {
1931 public: 1951 public:
1932 explicit LMathSin(LOperand* value) : LUnaryMathOperation<0>(value) { } 1952 explicit LMathSin(LOperand* value) : LUnaryMathOperation<0>(value) { }
1933 DECLARE_CONCRETE_INSTRUCTION(MathSin, "math-sin") 1953 DECLARE_CONCRETE_INSTRUCTION(MathSin, "math-sin")
1934 }; 1954 };
1935 1955
1936 1956
1937 class LMathSqrt: public LUnaryMathOperation<0> { 1957 class LMathSqrt V8_FINAL : public LUnaryMathOperation<0> {
1938 public: 1958 public:
1939 explicit LMathSqrt(LOperand* value) : LUnaryMathOperation<0>(value) { } 1959 explicit LMathSqrt(LOperand* value) : LUnaryMathOperation<0>(value) { }
1940 DECLARE_CONCRETE_INSTRUCTION(MathSqrt, "math-sqrt") 1960 DECLARE_CONCRETE_INSTRUCTION(MathSqrt, "math-sqrt")
1941 }; 1961 };
1942 1962
1943 1963
1944 class LMathTan: public LUnaryMathOperation<0> { 1964 class LMathTan V8_FINAL : public LUnaryMathOperation<0> {
1945 public: 1965 public:
1946 explicit LMathTan(LOperand* value) : LUnaryMathOperation<0>(value) { } 1966 explicit LMathTan(LOperand* value) : LUnaryMathOperation<0>(value) { }
1947 DECLARE_CONCRETE_INSTRUCTION(MathTan, "math-tan") 1967 DECLARE_CONCRETE_INSTRUCTION(MathTan, "math-tan")
1948 }; 1968 };
1949 1969
1950 1970
1951 class LModI: public LTemplateInstruction<1, 2, 0> { 1971 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1952 public: 1972 public:
1953 LModI(LOperand* left, LOperand* right) { 1973 LModI(LOperand* left, LOperand* right) {
1954 inputs_[0] = left; 1974 inputs_[0] = left;
1955 inputs_[1] = right; 1975 inputs_[1] = right;
1956 } 1976 }
1957 1977
1958 LOperand* left() { return inputs_[0]; } 1978 LOperand* left() { return inputs_[0]; }
1959 LOperand* right() { return inputs_[1]; } 1979 LOperand* right() { return inputs_[1]; }
1960 1980
1961 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") 1981 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i")
1962 DECLARE_HYDROGEN_ACCESSOR(Mod) 1982 DECLARE_HYDROGEN_ACCESSOR(Mod)
1963 }; 1983 };
1964 1984
1965 1985
1966 class LMulConstIS: public LTemplateInstruction<1, 2, 0> { 1986 class LMulConstIS V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1967 public: 1987 public:
1968 LMulConstIS(LOperand* left, LConstantOperand* right) { 1988 LMulConstIS(LOperand* left, LConstantOperand* right) {
1969 inputs_[0] = left; 1989 inputs_[0] = left;
1970 inputs_[1] = right; 1990 inputs_[1] = right;
1971 } 1991 }
1972 1992
1973 LOperand* left() { return inputs_[0]; } 1993 LOperand* left() { return inputs_[0]; }
1974 LConstantOperand* right() { return LConstantOperand::cast(inputs_[1]); } 1994 LConstantOperand* right() { return LConstantOperand::cast(inputs_[1]); }
1975 1995
1976 DECLARE_CONCRETE_INSTRUCTION(MulConstIS, "mul-const-i-s") 1996 DECLARE_CONCRETE_INSTRUCTION(MulConstIS, "mul-const-i-s")
1977 DECLARE_HYDROGEN_ACCESSOR(Mul) 1997 DECLARE_HYDROGEN_ACCESSOR(Mul)
1978 }; 1998 };
1979 1999
1980 2000
1981 class LMulI: public LTemplateInstruction<1, 2, 0> { 2001 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1982 public: 2002 public:
1983 LMulI(LOperand* left, LOperand* right) { 2003 LMulI(LOperand* left, LOperand* right) {
1984 inputs_[0] = left; 2004 inputs_[0] = left;
1985 inputs_[1] = right; 2005 inputs_[1] = right;
1986 } 2006 }
1987 2007
1988 LOperand* left() { return inputs_[0]; } 2008 LOperand* left() { return inputs_[0]; }
1989 LOperand* right() { return inputs_[1]; } 2009 LOperand* right() { return inputs_[1]; }
1990 2010
1991 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") 2011 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i")
1992 DECLARE_HYDROGEN_ACCESSOR(Mul) 2012 DECLARE_HYDROGEN_ACCESSOR(Mul)
1993 }; 2013 };
1994 2014
1995 2015
1996 class LMulS: public LTemplateInstruction<1, 2, 0> { 2016 class LMulS V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1997 public: 2017 public:
1998 LMulS(LOperand* left, LOperand* right) { 2018 LMulS(LOperand* left, LOperand* right) {
1999 inputs_[0] = left; 2019 inputs_[0] = left;
2000 inputs_[1] = right; 2020 inputs_[1] = right;
2001 } 2021 }
2002 2022
2003 LOperand* left() { return inputs_[0]; } 2023 LOperand* left() { return inputs_[0]; }
2004 LOperand* right() { return inputs_[1]; } 2024 LOperand* right() { return inputs_[1]; }
2005 2025
2006 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-s") 2026 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-s")
2007 DECLARE_HYDROGEN_ACCESSOR(Mul) 2027 DECLARE_HYDROGEN_ACCESSOR(Mul)
2008 }; 2028 };
2009 2029
2010 2030
2011 class LNumberTagD: public LTemplateInstruction<1, 1, 2> { 2031 class LNumberTagD V8_FINAL : public LTemplateInstruction<1, 1, 2> {
2012 public: 2032 public:
2013 LNumberTagD(LOperand* value, LOperand* temp1, LOperand* temp2) { 2033 LNumberTagD(LOperand* value, LOperand* temp1, LOperand* temp2) {
2014 inputs_[0] = value; 2034 inputs_[0] = value;
2015 temps_[0] = temp1; 2035 temps_[0] = temp1;
2016 temps_[1] = temp2; 2036 temps_[1] = temp2;
2017 } 2037 }
2018 2038
2019 LOperand* value() { return inputs_[0]; } 2039 LOperand* value() { return inputs_[0]; }
2020 LOperand* temp1() { return temps_[0]; } 2040 LOperand* temp1() { return temps_[0]; }
2021 LOperand* temp2() { return temps_[1]; } 2041 LOperand* temp2() { return temps_[1]; }
2022 2042
2023 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") 2043 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d")
2024 DECLARE_HYDROGEN_ACCESSOR(Change) 2044 DECLARE_HYDROGEN_ACCESSOR(Change)
2025 }; 2045 };
2026 2046
2027 2047
2028 class LNumberTagU: public LTemplateInstruction<1, 1, 2> { 2048 class LNumberTagU V8_FINAL : public LTemplateInstruction<1, 1, 2> {
2029 public: 2049 public:
2030 explicit LNumberTagU(LOperand* value, 2050 explicit LNumberTagU(LOperand* value,
2031 LOperand* temp1, 2051 LOperand* temp1,
2032 LOperand* temp2) { 2052 LOperand* temp2) {
2033 inputs_[0] = value; 2053 inputs_[0] = value;
2034 temps_[0] = temp1; 2054 temps_[0] = temp1;
2035 temps_[1] = temp2; 2055 temps_[1] = temp2;
2036 } 2056 }
2037 2057
2038 LOperand* value() { return inputs_[0]; } 2058 LOperand* value() { return inputs_[0]; }
2039 LOperand* temp1() { return temps_[0]; } 2059 LOperand* temp1() { return temps_[0]; }
2040 LOperand* temp2() { return temps_[1]; } 2060 LOperand* temp2() { return temps_[1]; }
2041 2061
2042 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u") 2062 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u")
2043 }; 2063 };
2044 2064
2045 2065
2046 class LNumberUntagD: public LTemplateInstruction<1, 1, 1> { 2066 class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 1> {
2047 public: 2067 public:
2048 LNumberUntagD(LOperand* value, LOperand* temp) { 2068 LNumberUntagD(LOperand* value, LOperand* temp) {
2049 inputs_[0] = value; 2069 inputs_[0] = value;
2050 temps_[0] = temp; 2070 temps_[0] = temp;
2051 } 2071 }
2052 2072
2053 LOperand* value() { return inputs_[0]; } 2073 LOperand* value() { return inputs_[0]; }
2054 2074
2055 LOperand* temp() { return temps_[0]; } 2075 LOperand* temp() { return temps_[0]; }
2056 2076
2057 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") 2077 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag")
2058 DECLARE_HYDROGEN_ACCESSOR(Change) 2078 DECLARE_HYDROGEN_ACCESSOR(Change)
2059 }; 2079 };
2060 2080
2061 2081
2062 class LParameter: public LTemplateInstruction<1, 0, 0> { 2082 class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> {
2063 public: 2083 public:
2064 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } 2084 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; }
2065 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") 2085 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
2066 }; 2086 };
2067 2087
2068 2088
2069 class LPower: public LTemplateInstruction<1, 2, 0> { 2089 class LPower V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2070 public: 2090 public:
2071 LPower(LOperand* left, LOperand* right) { 2091 LPower(LOperand* left, LOperand* right) {
2072 inputs_[0] = left; 2092 inputs_[0] = left;
2073 inputs_[1] = right; 2093 inputs_[1] = right;
2074 } 2094 }
2075 2095
2076 LOperand* left() { return inputs_[0]; } 2096 LOperand* left() { return inputs_[0]; }
2077 LOperand* right() { return inputs_[1]; } 2097 LOperand* right() { return inputs_[1]; }
2078 2098
2079 DECLARE_CONCRETE_INSTRUCTION(Power, "power") 2099 DECLARE_CONCRETE_INSTRUCTION(Power, "power")
2080 DECLARE_HYDROGEN_ACCESSOR(Power) 2100 DECLARE_HYDROGEN_ACCESSOR(Power)
2081 }; 2101 };
2082 2102
2083 2103
2084 class LPushArgument: public LTemplateInstruction<0, 1, 0> { 2104 class LPushArgument V8_FINAL : public LTemplateInstruction<0, 1, 0> {
2085 public: 2105 public:
2086 explicit LPushArgument(LOperand* value) { 2106 explicit LPushArgument(LOperand* value) {
2087 inputs_[0] = value; 2107 inputs_[0] = value;
2088 } 2108 }
2089 2109
2090 LOperand* value() { return inputs_[0]; } 2110 LOperand* value() { return inputs_[0]; }
2091 2111
2092 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") 2112 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument")
2093 }; 2113 };
2094 2114
2095 2115
2096 class LRandom: public LTemplateInstruction<1, 1, 0> { 2116 class LRandom V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2097 public: 2117 public:
2098 explicit LRandom(LOperand* global_object) { 2118 explicit LRandom(LOperand* global_object) {
2099 inputs_[0] = global_object; 2119 inputs_[0] = global_object;
2100 } 2120 }
2101 2121
2102 LOperand* global_object() { return inputs_[0]; } 2122 LOperand* global_object() { return inputs_[0]; }
2103 2123
2104 DECLARE_CONCRETE_INSTRUCTION(Random, "random") 2124 DECLARE_CONCRETE_INSTRUCTION(Random, "random")
2105 DECLARE_HYDROGEN_ACCESSOR(Random) 2125 DECLARE_HYDROGEN_ACCESSOR(Random)
2106 }; 2126 };
2107 2127
2108 2128
2109 class LRegExpLiteral: public LTemplateInstruction<1, 0, 0> { 2129 class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> {
2110 public: 2130 public:
2111 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") 2131 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal")
2112 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) 2132 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral)
2113 }; 2133 };
2114 2134
2115 2135
2116 class LReturn: public LTemplateInstruction<0, 2, 0> { 2136 class LReturn V8_FINAL : public LTemplateInstruction<0, 2, 0> {
2117 public: 2137 public:
2118 LReturn(LOperand* value, LOperand* parameter_count) { 2138 LReturn(LOperand* value, LOperand* parameter_count) {
2119 inputs_[0] = value; 2139 inputs_[0] = value;
2120 inputs_[1] = parameter_count; 2140 inputs_[1] = parameter_count;
2121 } 2141 }
2122 2142
2123 LOperand* value() { return inputs_[0]; } 2143 LOperand* value() { return inputs_[0]; }
2124 LOperand* parameter_count() { return inputs_[1]; } 2144 LOperand* parameter_count() { return inputs_[1]; }
2125 2145
2126 bool has_constant_parameter_count() { 2146 bool has_constant_parameter_count() {
2127 return parameter_count()->IsConstantOperand(); 2147 return parameter_count()->IsConstantOperand();
2128 } 2148 }
2129 LConstantOperand* constant_parameter_count() { 2149 LConstantOperand* constant_parameter_count() {
2130 ASSERT(has_constant_parameter_count()); 2150 ASSERT(has_constant_parameter_count());
2131 return LConstantOperand::cast(parameter_count()); 2151 return LConstantOperand::cast(parameter_count());
2132 } 2152 }
2133 2153
2134 DECLARE_CONCRETE_INSTRUCTION(Return, "return") 2154 DECLARE_CONCRETE_INSTRUCTION(Return, "return")
2135 }; 2155 };
2136 2156
2137 2157
2138 class LSeqStringSetChar: public LTemplateInstruction<1, 3, 1> { 2158 class LSeqStringSetChar V8_FINAL : public LTemplateInstruction<1, 3, 1> {
2139 public: 2159 public:
2140 LSeqStringSetChar(String::Encoding encoding, 2160 LSeqStringSetChar(String::Encoding encoding,
2141 LOperand* string, 2161 LOperand* string,
2142 LOperand* index, 2162 LOperand* index,
2143 LOperand* value, 2163 LOperand* value,
2144 LOperand* temp) : encoding_(encoding) { 2164 LOperand* temp) : encoding_(encoding) {
2145 inputs_[0] = string; 2165 inputs_[0] = string;
2146 inputs_[1] = index; 2166 inputs_[1] = index;
2147 inputs_[2] = value; 2167 inputs_[2] = value;
2148 temps_[0] = temp; 2168 temps_[0] = temp;
2149 } 2169 }
2150 2170
2151 String::Encoding encoding() { return encoding_; } 2171 String::Encoding encoding() { return encoding_; }
2152 LOperand* string() { return inputs_[0]; } 2172 LOperand* string() { return inputs_[0]; }
2153 LOperand* index() { return inputs_[1]; } 2173 LOperand* index() { return inputs_[1]; }
2154 LOperand* value() { return inputs_[2]; } 2174 LOperand* value() { return inputs_[2]; }
2155 LOperand* temp() { return temps_[0]; } 2175 LOperand* temp() { return temps_[0]; }
2156 2176
2157 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") 2177 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char")
2158 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) 2178 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar)
2159 2179
2160 private: 2180 private:
2161 String::Encoding encoding_; 2181 String::Encoding encoding_;
2162 }; 2182 };
2163 2183
2164 2184
2165 class LSmiTag: public LTemplateInstruction<1, 1, 0> { 2185 class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2166 public: 2186 public:
2167 explicit LSmiTag(LOperand* value) { 2187 explicit LSmiTag(LOperand* value) {
2168 inputs_[0] = value; 2188 inputs_[0] = value;
2169 } 2189 }
2170 2190
2171 LOperand* value() { return inputs_[0]; } 2191 LOperand* value() { return inputs_[0]; }
2172 2192
2173 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") 2193 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag")
2174 }; 2194 };
2175 2195
2176 2196
2177 class LSmiUntag: public LTemplateInstruction<1, 1, 0> { 2197 class LSmiUntag V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2178 public: 2198 public:
2179 LSmiUntag(LOperand* value, bool needs_check) 2199 LSmiUntag(LOperand* value, bool needs_check)
2180 : needs_check_(needs_check) { 2200 : needs_check_(needs_check) {
2181 inputs_[0] = value; 2201 inputs_[0] = value;
2182 } 2202 }
2183 2203
2184 LOperand* value() { return inputs_[0]; } 2204 LOperand* value() { return inputs_[0]; }
2185 bool needs_check() const { return needs_check_; } 2205 bool needs_check() const { return needs_check_; }
2186 2206
2187 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") 2207 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag")
2188 2208
2189 private: 2209 private:
2190 bool needs_check_; 2210 bool needs_check_;
2191 }; 2211 };
2192 2212
2193 2213
2194 class LStackCheck: public LTemplateInstruction<0, 0, 0> { 2214 class LStackCheck V8_FINAL : public LTemplateInstruction<0, 0, 0> {
2195 public: 2215 public:
2196 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") 2216 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check")
2197 DECLARE_HYDROGEN_ACCESSOR(StackCheck) 2217 DECLARE_HYDROGEN_ACCESSOR(StackCheck)
2198 2218
2199 Label* done_label() { return &done_label_; } 2219 Label* done_label() { return &done_label_; }
2200 2220
2201 private: 2221 private:
2202 Label done_label_; 2222 Label done_label_;
2203 }; 2223 };
2204 2224
2205 2225
2206 template<int T> 2226 template<int T>
2207 class LStoreKeyed: public LTemplateInstruction<0, 3, T> { 2227 class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, T> {
2208 public: 2228 public:
2209 LStoreKeyed(LOperand* elements, LOperand* key, LOperand* value) { 2229 LStoreKeyed(LOperand* elements, LOperand* key, LOperand* value) {
2210 this->inputs_[0] = elements; 2230 this->inputs_[0] = elements;
2211 this->inputs_[1] = key; 2231 this->inputs_[1] = key;
2212 this->inputs_[2] = value; 2232 this->inputs_[2] = value;
2213 } 2233 }
2214 2234
2215 bool is_external() const { return this->hydrogen()->is_external(); } 2235 bool is_external() const { return this->hydrogen()->is_external(); }
2216 LOperand* elements() { return this->inputs_[0]; } 2236 LOperand* elements() { return this->inputs_[0]; }
2217 LOperand* key() { return this->inputs_[1]; } 2237 LOperand* key() { return this->inputs_[1]; }
2218 LOperand* value() { return this->inputs_[2]; } 2238 LOperand* value() { return this->inputs_[2]; }
2219 ElementsKind elements_kind() const { 2239 ElementsKind elements_kind() const {
2220 return this->hydrogen()->elements_kind(); 2240 return this->hydrogen()->elements_kind();
2221 } 2241 }
2222 2242
2223 bool NeedsCanonicalization() { 2243 bool NeedsCanonicalization() {
2224 return this->hydrogen()->NeedsCanonicalization(); 2244 return this->hydrogen()->NeedsCanonicalization();
2225 } 2245 }
2226 uint32_t additional_index() const { return this->hydrogen()->index_offset(); } 2246 uint32_t additional_index() const { return this->hydrogen()->index_offset(); }
2227 2247
2228 void PrintDataTo(StringStream* stream) { 2248 void PrintDataTo(StringStream* stream) V8_OVERRIDE {
2229 this->elements()->PrintTo(stream); 2249 this->elements()->PrintTo(stream);
2230 stream->Add("["); 2250 stream->Add("[");
2231 this->key()->PrintTo(stream); 2251 this->key()->PrintTo(stream);
2232 if (this->hydrogen()->IsDehoisted()) { 2252 if (this->hydrogen()->IsDehoisted()) {
2233 stream->Add(" + %d] <-", this->additional_index()); 2253 stream->Add(" + %d] <-", this->additional_index());
2234 } else { 2254 } else {
2235 stream->Add("] <- "); 2255 stream->Add("] <- ");
2236 } 2256 }
2237 2257
2238 if (this->value() == NULL) { 2258 if (this->value() == NULL) {
2239 ASSERT(hydrogen()->IsConstantHoleStore() && 2259 ASSERT(hydrogen()->IsConstantHoleStore() &&
2240 hydrogen()->value()->representation().IsDouble()); 2260 hydrogen()->value()->representation().IsDouble());
2241 stream->Add("<the hole(nan)>"); 2261 stream->Add("<the hole(nan)>");
2242 } else { 2262 } else {
2243 this->value()->PrintTo(stream); 2263 this->value()->PrintTo(stream);
2244 } 2264 }
2245 } 2265 }
2246 2266
2247 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) 2267 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
2248 }; 2268 };
2249 2269
2250 2270
2251 class LStoreKeyedExternal: public LStoreKeyed<1> { 2271 class LStoreKeyedExternal V8_FINAL : public LStoreKeyed<1> {
2252 public: 2272 public:
2253 LStoreKeyedExternal(LOperand* elements, LOperand* key, LOperand* value, 2273 LStoreKeyedExternal(LOperand* elements, LOperand* key, LOperand* value,
2254 LOperand* temp) : 2274 LOperand* temp) :
2255 LStoreKeyed<1>(elements, key, value) { 2275 LStoreKeyed<1>(elements, key, value) {
2256 temps_[0] = temp; 2276 temps_[0] = temp;
2257 }; 2277 };
2258 2278
2259 LOperand* temp() { return temps_[0]; } 2279 LOperand* temp() { return temps_[0]; }
2260 2280
2261 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedExternal, "store-keyed-external") 2281 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedExternal, "store-keyed-external")
2262 }; 2282 };
2263 2283
2264 2284
2265 class LStoreKeyedFixed: public LStoreKeyed<1> { 2285 class LStoreKeyedFixed V8_FINAL : public LStoreKeyed<1> {
2266 public: 2286 public:
2267 LStoreKeyedFixed(LOperand* elements, LOperand* key, LOperand* value, 2287 LStoreKeyedFixed(LOperand* elements, LOperand* key, LOperand* value,
2268 LOperand* temp) : 2288 LOperand* temp) :
2269 LStoreKeyed<1>(elements, key, value) { 2289 LStoreKeyed<1>(elements, key, value) {
2270 temps_[0] = temp; 2290 temps_[0] = temp;
2271 }; 2291 };
2272 2292
2273 LOperand* temp() { return temps_[0]; } 2293 LOperand* temp() { return temps_[0]; }
2274 2294
2275 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFixed, "store-keyed-fixed") 2295 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFixed, "store-keyed-fixed")
2276 }; 2296 };
2277 2297
2278 2298
2279 class LStoreKeyedFixedDouble: public LStoreKeyed<1> { 2299 class LStoreKeyedFixedDouble V8_FINAL : public LStoreKeyed<1> {
2280 public: 2300 public:
2281 LStoreKeyedFixedDouble(LOperand* elements, LOperand* key, LOperand* value, 2301 LStoreKeyedFixedDouble(LOperand* elements, LOperand* key, LOperand* value,
2282 LOperand* temp) : 2302 LOperand* temp) :
2283 LStoreKeyed<1>(elements, key, value) { 2303 LStoreKeyed<1>(elements, key, value) {
2284 temps_[0] = temp; 2304 temps_[0] = temp;
2285 }; 2305 };
2286 2306
2287 LOperand* temp() { return temps_[0]; } 2307 LOperand* temp() { return temps_[0]; }
2288 2308
2289 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFixedDouble, 2309 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFixedDouble,
2290 "store-keyed-fixed-double") 2310 "store-keyed-fixed-double")
2291 }; 2311 };
2292 2312
2293 2313
2294 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { 2314 class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> {
2295 public: 2315 public:
2296 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* value) { 2316 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* value) {
2297 inputs_[0] = obj; 2317 inputs_[0] = obj;
2298 inputs_[1] = key; 2318 inputs_[1] = key;
2299 inputs_[2] = value; 2319 inputs_[2] = value;
2300 } 2320 }
2301 2321
2302 LOperand* object() { return inputs_[0]; } 2322 LOperand* object() { return inputs_[0]; }
2303 LOperand* key() { return inputs_[1]; } 2323 LOperand* key() { return inputs_[1]; }
2304 LOperand* value() { return inputs_[2]; } 2324 LOperand* value() { return inputs_[2]; }
2305 2325
2306 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 2326 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
2307 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) 2327 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
2308 2328
2309 virtual void PrintDataTo(StringStream* stream); 2329 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2310 2330
2311 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2331 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
2312 }; 2332 };
2313 2333
2314 2334
2315 class LStoreNamedField: public LTemplateInstruction<0, 2, 2> { 2335 class LStoreNamedField V8_FINAL : public LTemplateInstruction<0, 2, 2> {
2316 public: 2336 public:
2317 LStoreNamedField(LOperand* object, LOperand* value, 2337 LStoreNamedField(LOperand* object, LOperand* value,
2318 LOperand* temp0, LOperand* temp1) { 2338 LOperand* temp0, LOperand* temp1) {
2319 inputs_[0] = object; 2339 inputs_[0] = object;
2320 inputs_[1] = value; 2340 inputs_[1] = value;
2321 temps_[0] = temp0; 2341 temps_[0] = temp0;
2322 temps_[1] = temp1; 2342 temps_[1] = temp1;
2323 } 2343 }
2324 2344
2325 LOperand* object() { return inputs_[0]; } 2345 LOperand* object() { return inputs_[0]; }
2326 LOperand* value() { return inputs_[1]; } 2346 LOperand* value() { return inputs_[1]; }
2327 LOperand* temp0() { return temps_[0]; } 2347 LOperand* temp0() { return temps_[0]; }
2328 LOperand* temp1() { return temps_[1]; } 2348 LOperand* temp1() { return temps_[1]; }
2329 2349
2330 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") 2350 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
2331 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) 2351 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
2332 2352
2333 virtual void PrintDataTo(StringStream* stream); 2353 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2334 2354
2335 Handle<Map> transition() const { return hydrogen()->transition_map(); } 2355 Handle<Map> transition() const { return hydrogen()->transition_map(); }
2336 Representation representation() const { 2356 Representation representation() const {
2337 return hydrogen()->field_representation(); 2357 return hydrogen()->field_representation();
2338 } 2358 }
2339 }; 2359 };
2340 2360
2341 2361
2342 class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> { 2362 class LStoreNamedGeneric V8_FINAL: public LTemplateInstruction<0, 2, 0> {
2343 public: 2363 public:
2344 LStoreNamedGeneric(LOperand* object, LOperand* value) { 2364 LStoreNamedGeneric(LOperand* object, LOperand* value) {
2345 inputs_[0] = object; 2365 inputs_[0] = object;
2346 inputs_[1] = value; 2366 inputs_[1] = value;
2347 } 2367 }
2348 2368
2349 LOperand* object() { return inputs_[0]; } 2369 LOperand* object() { return inputs_[0]; }
2350 LOperand* value() { return inputs_[1]; } 2370 LOperand* value() { return inputs_[1]; }
2351 2371
2352 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 2372 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
2353 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 2373 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
2354 2374
2355 virtual void PrintDataTo(StringStream* stream); 2375 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2356 2376
2357 Handle<Object> name() const { return hydrogen()->name(); } 2377 Handle<Object> name() const { return hydrogen()->name(); }
2358 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2378 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
2359 }; 2379 };
2360 2380
2361 2381
2362 class LStringAdd: public LTemplateInstruction<1, 2, 0> { 2382 class LStringAdd V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2363 public: 2383 public:
2364 LStringAdd(LOperand* left, LOperand* right) { 2384 LStringAdd(LOperand* left, LOperand* right) {
2365 inputs_[0] = left; 2385 inputs_[0] = left;
2366 inputs_[1] = right; 2386 inputs_[1] = right;
2367 } 2387 }
2368 2388
2369 LOperand* left() { return inputs_[0]; } 2389 LOperand* left() { return inputs_[0]; }
2370 LOperand* right() { return inputs_[1]; } 2390 LOperand* right() { return inputs_[1]; }
2371 2391
2372 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") 2392 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add")
2373 DECLARE_HYDROGEN_ACCESSOR(StringAdd) 2393 DECLARE_HYDROGEN_ACCESSOR(StringAdd)
2374 }; 2394 };
2375 2395
2376 2396
2377 2397
2378 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { 2398 class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2379 public: 2399 public:
2380 LStringCharCodeAt(LOperand* string, LOperand* index) { 2400 LStringCharCodeAt(LOperand* string, LOperand* index) {
2381 inputs_[0] = string; 2401 inputs_[0] = string;
2382 inputs_[1] = index; 2402 inputs_[1] = index;
2383 } 2403 }
2384 2404
2385 LOperand* string() { return inputs_[0]; } 2405 LOperand* string() { return inputs_[0]; }
2386 LOperand* index() { return inputs_[1]; } 2406 LOperand* index() { return inputs_[1]; }
2387 2407
2388 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") 2408 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at")
2389 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) 2409 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt)
2390 }; 2410 };
2391 2411
2392 2412
2393 class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> { 2413 class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2394 public: 2414 public:
2395 explicit LStringCharFromCode(LOperand* char_code) { 2415 explicit LStringCharFromCode(LOperand* char_code) {
2396 inputs_[0] = char_code; 2416 inputs_[0] = char_code;
2397 } 2417 }
2398 2418
2399 LOperand* char_code() { return inputs_[0]; } 2419 LOperand* char_code() { return inputs_[0]; }
2400 2420
2401 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") 2421 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code")
2402 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) 2422 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode)
2403 }; 2423 };
2404 2424
2405 2425
2406 class LStringCompareAndBranch: public LControlInstruction<2, 0> { 2426 class LStringCompareAndBranch V8_FINAL : public LControlInstruction<2, 0> {
2407 public: 2427 public:
2408 LStringCompareAndBranch(LOperand* left, LOperand* right) { 2428 LStringCompareAndBranch(LOperand* left, LOperand* right) {
2409 inputs_[0] = left; 2429 inputs_[0] = left;
2410 inputs_[1] = right; 2430 inputs_[1] = right;
2411 } 2431 }
2412 2432
2413 LOperand* left() { return inputs_[0]; } 2433 LOperand* left() { return inputs_[0]; }
2414 LOperand* right() { return inputs_[1]; } 2434 LOperand* right() { return inputs_[1]; }
2415 2435
2416 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, 2436 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch,
2417 "string-compare-and-branch") 2437 "string-compare-and-branch")
2418 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) 2438 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch)
2419 2439
2420 Token::Value op() const { return hydrogen()->token(); } 2440 Token::Value op() const { return hydrogen()->token(); }
2421 2441
2422 virtual void PrintDataTo(StringStream* stream); 2442 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2423 }; 2443 };
2424 2444
2425 2445
2426 // Truncating conversion from a tagged value to an int32. 2446 // Truncating conversion from a tagged value to an int32.
2427 class LTaggedToI: public LTemplateInstruction<1, 1, 2> { 2447 class LTaggedToI V8_FINAL : public LTemplateInstruction<1, 1, 2> {
2428 public: 2448 public:
2429 explicit LTaggedToI(LOperand* value, LOperand* temp1, LOperand* temp2) { 2449 explicit LTaggedToI(LOperand* value, LOperand* temp1, LOperand* temp2) {
2430 inputs_[0] = value; 2450 inputs_[0] = value;
2431 temps_[0] = temp1; 2451 temps_[0] = temp1;
2432 temps_[1] = temp2; 2452 temps_[1] = temp2;
2433 } 2453 }
2434 2454
2435 LOperand* value() { return inputs_[0]; } 2455 LOperand* value() { return inputs_[0]; }
2436 LOperand* temp1() { return temps_[0]; } 2456 LOperand* temp1() { return temps_[0]; }
2437 LOperand* temp2() { return temps_[1]; } 2457 LOperand* temp2() { return temps_[1]; }
2438 2458
2439 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") 2459 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i")
2440 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) 2460 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
2441 2461
2442 bool truncating() { return hydrogen()->CanTruncateToInt32(); } 2462 bool truncating() { return hydrogen()->CanTruncateToInt32(); }
2443 }; 2463 };
2444 2464
2445 2465
2446 class LShiftI: public LTemplateInstruction<1, 2, 0> { 2466 class LShiftI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2447 public: 2467 public:
2448 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) 2468 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt)
2449 : op_(op), can_deopt_(can_deopt) { 2469 : op_(op), can_deopt_(can_deopt) {
2450 inputs_[0] = left; 2470 inputs_[0] = left;
2451 inputs_[1] = right; 2471 inputs_[1] = right;
2452 } 2472 }
2453 2473
2454 Token::Value op() const { return op_; } 2474 Token::Value op() const { return op_; }
2455 LOperand* left() { return inputs_[0]; } 2475 LOperand* left() { return inputs_[0]; }
2456 LOperand* right() { return inputs_[1]; } 2476 LOperand* right() { return inputs_[1]; }
(...skipping 20 matching lines...) Expand all
2477 LOperand* code_object() { return inputs_[1]; } 2497 LOperand* code_object() { return inputs_[1]; }
2478 LOperand* temp() { return temps_[0]; } 2498 LOperand* temp() { return temps_[0]; }
2479 2499
2480 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2500 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2481 2501
2482 DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry") 2502 DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry")
2483 DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry) 2503 DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry)
2484 }; 2504 };
2485 2505
2486 2506
2487 class LStoreContextSlot: public LTemplateInstruction<0, 2, 1> { 2507 class LStoreContextSlot V8_FINAL : public LTemplateInstruction<0, 2, 1> {
2488 public: 2508 public:
2489 LStoreContextSlot(LOperand* context, LOperand* value, LOperand* temp) { 2509 LStoreContextSlot(LOperand* context, LOperand* value, LOperand* temp) {
2490 inputs_[0] = context; 2510 inputs_[0] = context;
2491 inputs_[1] = value; 2511 inputs_[1] = value;
2492 temps_[0] = temp; 2512 temps_[0] = temp;
2493 } 2513 }
2494 2514
2495 LOperand* context() { return inputs_[0]; } 2515 LOperand* context() { return inputs_[0]; }
2496 LOperand* value() { return inputs_[1]; } 2516 LOperand* value() { return inputs_[1]; }
2497 LOperand* temp() { return temps_[0]; } 2517 LOperand* temp() { return temps_[0]; }
2498 2518
2499 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") 2519 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot")
2500 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) 2520 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot)
2501 2521
2502 int slot_index() { return hydrogen()->slot_index(); } 2522 int slot_index() { return hydrogen()->slot_index(); }
2503 2523
2504 virtual void PrintDataTo(StringStream* stream); 2524 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2505 }; 2525 };
2506 2526
2507 2527
2508 class LStoreGlobalCell: public LTemplateInstruction<0, 1, 2> { 2528 class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 2> {
2509 public: 2529 public:
2510 LStoreGlobalCell(LOperand* value, LOperand* temp1, LOperand* temp2) { 2530 LStoreGlobalCell(LOperand* value, LOperand* temp1, LOperand* temp2) {
2511 inputs_[0] = value; 2531 inputs_[0] = value;
2512 temps_[0] = temp1; 2532 temps_[0] = temp1;
2513 temps_[1] = temp2; 2533 temps_[1] = temp2;
2514 } 2534 }
2515 2535
2516 LOperand* value() { return inputs_[0]; } 2536 LOperand* value() { return inputs_[0]; }
2517 LOperand* temp1() { return temps_[0]; } 2537 LOperand* temp1() { return temps_[0]; }
2518 LOperand* temp2() { return temps_[1]; } 2538 LOperand* temp2() { return temps_[1]; }
2519 2539
2520 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") 2540 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell")
2521 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) 2541 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell)
2522 }; 2542 };
2523 2543
2524 2544
2525 class LStoreGlobalGeneric: public LTemplateInstruction<0, 2, 0> { 2545 class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> {
2526 public: 2546 public:
2527 LStoreGlobalGeneric(LOperand* global_object, LOperand* value) { 2547 LStoreGlobalGeneric(LOperand* global_object, LOperand* value) {
2528 inputs_[0] = global_object; 2548 inputs_[0] = global_object;
2529 inputs_[1] = value; 2549 inputs_[1] = value;
2530 } 2550 }
2531 2551
2532 LOperand* global_object() { return inputs_[0]; } 2552 LOperand* global_object() { return inputs_[0]; }
2533 LOperand* value() { return inputs_[1]; } 2553 LOperand* value() { return inputs_[1]; }
2534 2554
2535 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") 2555 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic")
2536 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) 2556 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric)
2537 2557
2538 Handle<Object> name() const { return hydrogen()->name(); } 2558 Handle<Object> name() const { return hydrogen()->name(); }
2539 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2559 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
2540 }; 2560 };
2541 2561
2542 2562
2543 class LSubI: public LTemplateInstruction<1, 2, 0> { 2563 class LSubI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2544 public: 2564 public:
2545 LSubI(LOperand* left, LOperand* right) { 2565 LSubI(LOperand* left, LOperand* right) {
2546 inputs_[0] = left; 2566 inputs_[0] = left;
2547 inputs_[1] = right; 2567 inputs_[1] = right;
2548 } 2568 }
2549 2569
2550 LOperand* left() { return inputs_[0]; } 2570 LOperand* left() { return inputs_[0]; }
2551 LOperand* right() { return inputs_[1]; } 2571 LOperand* right() { return inputs_[1]; }
2552 2572
2553 DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i") 2573 DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i")
2554 DECLARE_HYDROGEN_ACCESSOR(Sub) 2574 DECLARE_HYDROGEN_ACCESSOR(Sub)
2555 }; 2575 };
2556 2576
2557 2577
2558 class LSubS: public LTemplateInstruction<1, 2, 0> { 2578 class LSubS: public LTemplateInstruction<1, 2, 0> {
2559 public: 2579 public:
2560 LSubS(LOperand* left, LOperand* right) { 2580 LSubS(LOperand* left, LOperand* right) {
2561 inputs_[0] = left; 2581 inputs_[0] = left;
2562 inputs_[1] = right; 2582 inputs_[1] = right;
2563 } 2583 }
2564 2584
2565 LOperand* left() { return inputs_[0]; } 2585 LOperand* left() { return inputs_[0]; }
2566 LOperand* right() { return inputs_[1]; } 2586 LOperand* right() { return inputs_[1]; }
2567 2587
2568 DECLARE_CONCRETE_INSTRUCTION(SubS, "sub-s") 2588 DECLARE_CONCRETE_INSTRUCTION(SubS, "sub-s")
2569 DECLARE_HYDROGEN_ACCESSOR(Sub) 2589 DECLARE_HYDROGEN_ACCESSOR(Sub)
2570 }; 2590 };
2571 2591
2572 2592
2573 class LThisFunction: public LTemplateInstruction<1, 0, 0> { 2593 class LThisFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> {
2574 public: 2594 public:
2575 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") 2595 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function")
2576 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) 2596 DECLARE_HYDROGEN_ACCESSOR(ThisFunction)
2577 }; 2597 };
2578 2598
2579 2599
2580 class LThrow: public LTemplateInstruction<0, 1, 0> { 2600 class LThrow V8_FINAL : public LTemplateInstruction<0, 1, 0> {
2581 public: 2601 public:
2582 explicit LThrow(LOperand* value) { 2602 explicit LThrow(LOperand* value) {
2583 inputs_[0] = value; 2603 inputs_[0] = value;
2584 } 2604 }
2585 2605
2586 LOperand* value() { return inputs_[0]; } 2606 LOperand* value() { return inputs_[0]; }
2587 2607
2588 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") 2608 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw")
2589 }; 2609 };
2590 2610
2591 2611
2592 class LToFastProperties: public LTemplateInstruction<1, 1, 0> { 2612 class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2593 public: 2613 public:
2594 explicit LToFastProperties(LOperand* value) { 2614 explicit LToFastProperties(LOperand* value) {
2595 inputs_[0] = value; 2615 inputs_[0] = value;
2596 } 2616 }
2597 2617
2598 LOperand* value() { return inputs_[0]; } 2618 LOperand* value() { return inputs_[0]; }
2599 2619
2600 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") 2620 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties")
2601 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) 2621 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties)
2602 }; 2622 };
2603 2623
2604 2624
2605 class LTransitionElementsKind: public LTemplateInstruction<0, 1, 2> { 2625 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 1, 2> {
2606 public: 2626 public:
2607 LTransitionElementsKind(LOperand* object, 2627 LTransitionElementsKind(LOperand* object,
2608 LOperand* temp1, 2628 LOperand* temp1,
2609 LOperand* temp2 = NULL) { 2629 LOperand* temp2 = NULL) {
2610 inputs_[0] = object; 2630 inputs_[0] = object;
2611 temps_[0] = temp1; 2631 temps_[0] = temp1;
2612 temps_[1] = temp2; 2632 temps_[1] = temp2;
2613 } 2633 }
2614 2634
2615 LOperand* object() { return inputs_[0]; } 2635 LOperand* object() { return inputs_[0]; }
2616 LOperand* temp1() { return temps_[0]; } 2636 LOperand* temp1() { return temps_[0]; }
2617 LOperand* temp2() { return temps_[1]; } 2637 LOperand* temp2() { return temps_[1]; }
2618 2638
2619 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, 2639 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind,
2620 "transition-elements-kind") 2640 "transition-elements-kind")
2621 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) 2641 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
2622 2642
2623 virtual void PrintDataTo(StringStream* stream); 2643 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2624 2644
2625 Handle<Map> original_map() { return hydrogen()->original_map(); } 2645 Handle<Map> original_map() const { return hydrogen()->original_map(); }
2626 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); } 2646 Handle<Map> transitioned_map() const {
2627 ElementsKind from_kind() { return hydrogen()->from_kind(); } 2647 return hydrogen()->transitioned_map();
2628 ElementsKind to_kind() { return hydrogen()->to_kind(); } 2648 }
2649 ElementsKind from_kind() const { return hydrogen()->from_kind(); }
2650 ElementsKind to_kind() const { return hydrogen()->to_kind(); }
2629 }; 2651 };
2630 2652
2631 2653
2632 class LTrapAllocationMemento : public LTemplateInstruction<0, 1, 2> { 2654 class LTrapAllocationMemento V8_FINAL : public LTemplateInstruction<0, 1, 2> {
2633 public: 2655 public:
2634 LTrapAllocationMemento(LOperand* object, LOperand* temp1, LOperand* temp2) { 2656 LTrapAllocationMemento(LOperand* object, LOperand* temp1, LOperand* temp2) {
2635 inputs_[0] = object; 2657 inputs_[0] = object;
2636 temps_[0] = temp1; 2658 temps_[0] = temp1;
2637 temps_[1] = temp2; 2659 temps_[1] = temp2;
2638 } 2660 }
2639 2661
2640 LOperand* object() { return inputs_[0]; } 2662 LOperand* object() { return inputs_[0]; }
2641 LOperand* temp1() { return temps_[0]; } 2663 LOperand* temp1() { return temps_[0]; }
2642 LOperand* temp2() { return temps_[1]; } 2664 LOperand* temp2() { return temps_[1]; }
2643 2665
2644 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento, "trap-allocation-memento") 2666 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento, "trap-allocation-memento")
2645 }; 2667 };
2646 2668
2647 2669
2648 class LTruncateDoubleToIntOrSmi: public LTemplateInstruction<1, 1, 2> { 2670 class LTruncateDoubleToIntOrSmi V8_FINAL
2671 : public LTemplateInstruction<1, 1, 2> {
2649 public: 2672 public:
2650 LTruncateDoubleToIntOrSmi(LOperand* value, LOperand* temp1, LOperand* temp2) { 2673 LTruncateDoubleToIntOrSmi(LOperand* value, LOperand* temp1, LOperand* temp2) {
2651 inputs_[0] = value; 2674 inputs_[0] = value;
2652 temps_[0] = temp1; 2675 temps_[0] = temp1;
2653 temps_[1] = temp2; 2676 temps_[1] = temp2;
2654 } 2677 }
2655 2678
2656 LOperand* value() { return inputs_[0]; } 2679 LOperand* value() { return inputs_[0]; }
2657 LOperand* temp1() { return temps_[0]; } 2680 LOperand* temp1() { return temps_[0]; }
2658 LOperand* temp2() { return temps_[1]; } 2681 LOperand* temp2() { return temps_[1]; }
2659 2682
2660 DECLARE_CONCRETE_INSTRUCTION(TruncateDoubleToIntOrSmi, 2683 DECLARE_CONCRETE_INSTRUCTION(TruncateDoubleToIntOrSmi,
2661 "truncate-double-to-int-or-smi") 2684 "truncate-double-to-int-or-smi")
2662 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) 2685 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
2663 2686
2664 bool tag_result() { return hydrogen()->representation().IsSmi(); } 2687 bool tag_result() { return hydrogen()->representation().IsSmi(); }
2665 }; 2688 };
2666 2689
2667 2690
2668 class LTypeof: public LTemplateInstruction<1, 1, 0> { 2691 class LTypeof V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2669 public: 2692 public:
2670 explicit LTypeof(LOperand* value) { 2693 explicit LTypeof(LOperand* value) {
2671 inputs_[0] = value; 2694 inputs_[0] = value;
2672 } 2695 }
2673 2696
2674 LOperand* value() { return inputs_[0]; } 2697 LOperand* value() { return inputs_[0]; }
2675 2698
2676 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") 2699 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof")
2677 }; 2700 };
2678 2701
2679 2702
2680 class LTypeofIsAndBranch: public LControlInstruction<1, 2> { 2703 class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 2> {
2681 public: 2704 public:
2682 LTypeofIsAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) { 2705 LTypeofIsAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) {
2683 inputs_[0] = value; 2706 inputs_[0] = value;
2684 temps_[0] = temp1; 2707 temps_[0] = temp1;
2685 temps_[1] = temp2; 2708 temps_[1] = temp2;
2686 } 2709 }
2687 2710
2688 LOperand* value() { return inputs_[0]; } 2711 LOperand* value() { return inputs_[0]; }
2689 LOperand* temp1() { return temps_[0]; } 2712 LOperand* temp1() { return temps_[0]; }
2690 LOperand* temp2() { return temps_[1]; } 2713 LOperand* temp2() { return temps_[1]; }
2691 2714
2692 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") 2715 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch")
2693 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch) 2716 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch)
2694 2717
2695 Handle<String> type_literal() { return hydrogen()->type_literal(); } 2718 Handle<String> type_literal() const { return hydrogen()->type_literal(); }
2696 2719
2697 virtual void PrintDataTo(StringStream* stream); 2720 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2698 }; 2721 };
2699 2722
2700 2723
2701 class LUint32ToDouble: public LTemplateInstruction<1, 1, 0> { 2724 class LUint32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2702 public: 2725 public:
2703 explicit LUint32ToDouble(LOperand* value) { 2726 explicit LUint32ToDouble(LOperand* value) {
2704 inputs_[0] = value; 2727 inputs_[0] = value;
2705 } 2728 }
2706 2729
2707 LOperand* value() { return inputs_[0]; } 2730 LOperand* value() { return inputs_[0]; }
2708 2731
2709 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double") 2732 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double")
2710 }; 2733 };
2711 2734
2712 2735
2713 class LValueOf: public LTemplateInstruction<1, 1, 1> { 2736 class LValueOf V8_FINAL : public LTemplateInstruction<1, 1, 1> {
2714 public: 2737 public:
2715 LValueOf(LOperand* value, LOperand* temp) { 2738 LValueOf(LOperand* value, LOperand* temp) {
2716 inputs_[0] = value; 2739 inputs_[0] = value;
2717 temps_[0] = temp; 2740 temps_[0] = temp;
2718 } 2741 }
2719 2742
2720 LOperand* value() { return inputs_[0]; } 2743 LOperand* value() { return inputs_[0]; }
2721 LOperand* temp() { return temps_[0]; } 2744 LOperand* temp() { return temps_[0]; }
2722 2745
2723 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") 2746 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of")
2724 DECLARE_HYDROGEN_ACCESSOR(ValueOf) 2747 DECLARE_HYDROGEN_ACCESSOR(ValueOf)
2725 }; 2748 };
2726 2749
2727 2750
2728 class LCheckMapValue: public LTemplateInstruction<0, 2, 1> { 2751 class LCheckMapValue V8_FINAL : public LTemplateInstruction<0, 2, 1> {
2729 public: 2752 public:
2730 LCheckMapValue(LOperand* value, LOperand* map, LOperand* temp) { 2753 LCheckMapValue(LOperand* value, LOperand* map, LOperand* temp) {
2731 inputs_[0] = value; 2754 inputs_[0] = value;
2732 inputs_[1] = map; 2755 inputs_[1] = map;
2733 temps_[0] = temp; 2756 temps_[0] = temp;
2734 } 2757 }
2735 2758
2736 LOperand* value() { return inputs_[0]; } 2759 LOperand* value() { return inputs_[0]; }
2737 LOperand* map() { return inputs_[1]; } 2760 LOperand* map() { return inputs_[1]; }
2738 LOperand* temp() { return temps_[0]; } 2761 LOperand* temp() { return temps_[0]; }
2739 2762
2740 DECLARE_CONCRETE_INSTRUCTION(CheckMapValue, "check-map-value") 2763 DECLARE_CONCRETE_INSTRUCTION(CheckMapValue, "check-map-value")
2741 }; 2764 };
2742 2765
2743 2766
2744 class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> { 2767 class LLoadFieldByIndex V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2745 public: 2768 public:
2746 LLoadFieldByIndex(LOperand* object, LOperand* index) { 2769 LLoadFieldByIndex(LOperand* object, LOperand* index) {
2747 inputs_[0] = object; 2770 inputs_[0] = object;
2748 inputs_[1] = index; 2771 inputs_[1] = index;
2749 } 2772 }
2750 2773
2751 LOperand* object() { return inputs_[0]; } 2774 LOperand* object() { return inputs_[0]; }
2752 LOperand* index() { return inputs_[1]; } 2775 LOperand* index() { return inputs_[1]; }
2753 2776
2754 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") 2777 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index")
2755 }; 2778 };
2756 2779
2757 2780
2758 class LWrapReceiver: public LTemplateInstruction<1, 2, 1> { 2781 class LWrapReceiver V8_FINAL : public LTemplateInstruction<1, 2, 1> {
2759 public: 2782 public:
2760 LWrapReceiver(LOperand* receiver, LOperand* function, LOperand* temp) { 2783 LWrapReceiver(LOperand* receiver, LOperand* function, LOperand* temp) {
2761 inputs_[0] = receiver; 2784 inputs_[0] = receiver;
2762 inputs_[1] = function; 2785 inputs_[1] = function;
2763 temps_[0] = temp; 2786 temps_[0] = temp;
2764 } 2787 }
2765 2788
2766 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") 2789 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver")
2767 2790
2768 LOperand* receiver() { return inputs_[0]; } 2791 LOperand* receiver() { return inputs_[0]; }
2769 LOperand* function() { return inputs_[1]; } 2792 LOperand* function() { return inputs_[1]; }
2770 LOperand* temp() { return temps_[0]; } 2793 LOperand* temp() { return temps_[0]; }
2771 }; 2794 };
2772 2795
2773 2796
2774 class LChunkBuilder; 2797 class LChunkBuilder;
2775 class LPlatformChunk: public LChunk { 2798 class LPlatformChunk V8_FINAL : public LChunk {
2776 public: 2799 public:
2777 LPlatformChunk(CompilationInfo* info, HGraph* graph) 2800 LPlatformChunk(CompilationInfo* info, HGraph* graph)
2778 : LChunk(info, graph) { } 2801 : LChunk(info, graph) { }
2779 2802
2780 int GetNextSpillIndex(); 2803 int GetNextSpillIndex();
2781 LOperand* GetNextSpillSlot(bool is_double); 2804 LOperand* GetNextSpillSlot(bool is_double);
2782 }; 2805 };
2783 2806
2784 2807
2785 class LChunkBuilder BASE_EMBEDDED { 2808 class LChunkBuilder V8_FINAL BASE_EMBEDDED {
2786 public: 2809 public:
2787 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) 2810 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
2788 : chunk_(NULL), 2811 : chunk_(NULL),
2789 info_(info), 2812 info_(info),
2790 graph_(graph), 2813 graph_(graph),
2791 zone_(graph->zone()), 2814 zone_(graph->zone()),
2792 status_(UNUSED), 2815 status_(UNUSED),
2793 current_instruction_(NULL), 2816 current_instruction_(NULL),
2794 current_block_(NULL), 2817 current_block_(NULL),
2795 argument_count_(0), 2818 argument_count_(0),
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2942 2965
2943 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2966 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2944 }; 2967 };
2945 2968
2946 #undef DECLARE_HYDROGEN_ACCESSOR 2969 #undef DECLARE_HYDROGEN_ACCESSOR
2947 #undef DECLARE_CONCRETE_INSTRUCTION 2970 #undef DECLARE_CONCRETE_INSTRUCTION
2948 2971
2949 } } // namespace v8::internal 2972 } } // namespace v8::internal
2950 2973
2951 #endif // V8_A64_LITHIUM_A64_H_ 2974 #endif // V8_A64_LITHIUM_A64_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698