OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } | 250 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } |
251 | 251 |
252 void MarkAsCall() { is_call_ = true; } | 252 void MarkAsCall() { is_call_ = true; } |
253 | 253 |
254 // Interface to the register allocator and iterators. | 254 // Interface to the register allocator and iterators. |
255 bool IsMarkedAsCall() const { return is_call_; } | 255 bool IsMarkedAsCall() const { return is_call_; } |
256 | 256 |
257 virtual bool HasResult() const = 0; | 257 virtual bool HasResult() const = 0; |
258 virtual LOperand* result() = 0; | 258 virtual LOperand* result() = 0; |
259 | 259 |
| 260 virtual int TempCount() = 0; |
| 261 virtual LOperand* TempAt(int i) = 0; |
| 262 |
260 LOperand* FirstInput() { return InputAt(0); } | 263 LOperand* FirstInput() { return InputAt(0); } |
261 LOperand* Output() { return HasResult() ? result() : NULL; } | 264 LOperand* Output() { return HasResult() ? result() : NULL; } |
262 | 265 |
263 #ifdef DEBUG | 266 #ifdef DEBUG |
264 void VerifyCall(); | 267 void VerifyCall(); |
265 #endif | 268 #endif |
266 | 269 |
267 private: | 270 private: |
268 // Iterator support. | 271 // Iterator support. |
269 friend class InputIterator; | 272 friend class InputIterator; |
270 virtual int InputCount() = 0; | 273 virtual int InputCount() = 0; |
271 virtual LOperand* InputAt(int i) = 0; | 274 virtual LOperand* InputAt(int i) = 0; |
272 | 275 |
273 friend class TempIterator; | |
274 virtual int TempCount() = 0; | |
275 virtual LOperand* TempAt(int i) = 0; | |
276 | |
277 LEnvironment* environment_; | 276 LEnvironment* environment_; |
278 SetOncePointer<LPointerMap> pointer_map_; | 277 SetOncePointer<LPointerMap> pointer_map_; |
279 HValue* hydrogen_value_; | 278 HValue* hydrogen_value_; |
280 bool is_call_; | 279 bool is_call_; |
281 }; | 280 }; |
282 | 281 |
283 | 282 |
284 // R = number of result operands (0 or 1). | 283 // R = number of result operands (0 or 1). |
285 // I = number of input operands. | 284 // I = number of input operands. |
286 // T = number of temporary operands. | 285 // T = number of temporary operands. |
287 template<int R, int I, int T> | 286 template<int R, int I, int T> |
288 class LTemplateInstruction: public LInstruction { | 287 class LTemplateInstruction: public LInstruction { |
289 public: | 288 public: |
290 // Allow 0 or 1 output operands. | 289 // Allow 0 or 1 output operands. |
291 STATIC_ASSERT(R == 0 || R == 1); | 290 STATIC_ASSERT(R == 0 || R == 1); |
292 virtual bool HasResult() const { return R != 0; } | 291 virtual bool HasResult() const { return R != 0; } |
293 void set_result(LOperand* operand) { results_[0] = operand; } | 292 void set_result(LOperand* operand) { results_[0] = operand; } |
294 LOperand* result() { return results_[0]; } | 293 LOperand* result() { return results_[0]; } |
295 | 294 |
| 295 LOperand* InputAt(int i) { return inputs_[i]; } |
| 296 |
| 297 int TempCount() { return T; } |
| 298 LOperand* TempAt(int i) { return temps_[i]; } |
| 299 |
296 protected: | 300 protected: |
297 EmbeddedContainer<LOperand*, R> results_; | 301 EmbeddedContainer<LOperand*, R> results_; |
298 EmbeddedContainer<LOperand*, I> inputs_; | 302 EmbeddedContainer<LOperand*, I> inputs_; |
299 EmbeddedContainer<LOperand*, T> temps_; | 303 EmbeddedContainer<LOperand*, T> temps_; |
300 | 304 |
301 private: | 305 private: |
302 // Iterator support. | |
303 virtual int InputCount() { return I; } | 306 virtual int InputCount() { return I; } |
304 virtual LOperand* InputAt(int i) { return inputs_[i]; } | |
305 | |
306 virtual int TempCount() { return T; } | |
307 virtual LOperand* TempAt(int i) { return temps_[i]; } | |
308 }; | 307 }; |
309 | 308 |
310 | 309 |
311 class LGap: public LTemplateInstruction<0, 0, 0> { | 310 class LGap: public LTemplateInstruction<0, 0, 0> { |
312 public: | 311 public: |
313 explicit LGap(HBasicBlock* block) : block_(block) { | 312 explicit LGap(HBasicBlock* block) : block_(block) { |
314 parallel_moves_[BEFORE] = NULL; | 313 parallel_moves_[BEFORE] = NULL; |
315 parallel_moves_[START] = NULL; | 314 parallel_moves_[START] = NULL; |
316 parallel_moves_[END] = NULL; | 315 parallel_moves_[END] = NULL; |
317 parallel_moves_[AFTER] = NULL; | 316 parallel_moves_[AFTER] = NULL; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") | 416 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") |
418 }; | 417 }; |
419 | 418 |
420 | 419 |
421 class LCallStub: public LTemplateInstruction<1, 1, 0> { | 420 class LCallStub: public LTemplateInstruction<1, 1, 0> { |
422 public: | 421 public: |
423 explicit LCallStub(LOperand* context) { | 422 explicit LCallStub(LOperand* context) { |
424 inputs_[0] = context; | 423 inputs_[0] = context; |
425 } | 424 } |
426 | 425 |
427 LOperand* context() { return inputs_[0]; } | |
428 | |
429 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") | 426 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") |
430 DECLARE_HYDROGEN_ACCESSOR(CallStub) | 427 DECLARE_HYDROGEN_ACCESSOR(CallStub) |
431 | 428 |
| 429 LOperand* context() { return inputs_[0]; } |
| 430 |
432 TranscendentalCache::Type transcendental_type() { | 431 TranscendentalCache::Type transcendental_type() { |
433 return hydrogen()->transcendental_type(); | 432 return hydrogen()->transcendental_type(); |
434 } | 433 } |
435 }; | 434 }; |
436 | 435 |
437 | 436 |
438 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> { | 437 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> { |
439 public: | 438 public: |
440 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") | 439 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") |
441 }; | 440 }; |
(...skipping 19 matching lines...) Expand all Loading... |
461 class LWrapReceiver: public LTemplateInstruction<1, 2, 1> { | 460 class LWrapReceiver: public LTemplateInstruction<1, 2, 1> { |
462 public: | 461 public: |
463 LWrapReceiver(LOperand* receiver, | 462 LWrapReceiver(LOperand* receiver, |
464 LOperand* function, | 463 LOperand* function, |
465 LOperand* temp) { | 464 LOperand* temp) { |
466 inputs_[0] = receiver; | 465 inputs_[0] = receiver; |
467 inputs_[1] = function; | 466 inputs_[1] = function; |
468 temps_[0] = temp; | 467 temps_[0] = temp; |
469 } | 468 } |
470 | 469 |
| 470 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") |
| 471 |
471 LOperand* receiver() { return inputs_[0]; } | 472 LOperand* receiver() { return inputs_[0]; } |
472 LOperand* function() { return inputs_[1]; } | 473 LOperand* function() { return inputs_[1]; } |
473 LOperand* temp() { return temps_[0]; } | |
474 | |
475 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") | |
476 }; | 474 }; |
477 | 475 |
478 | 476 |
479 class LApplyArguments: public LTemplateInstruction<1, 4, 0> { | 477 class LApplyArguments: public LTemplateInstruction<1, 4, 0> { |
480 public: | 478 public: |
481 LApplyArguments(LOperand* function, | 479 LApplyArguments(LOperand* function, |
482 LOperand* receiver, | 480 LOperand* receiver, |
483 LOperand* length, | 481 LOperand* length, |
484 LOperand* elements) { | 482 LOperand* elements) { |
485 inputs_[0] = function; | 483 inputs_[0] = function; |
486 inputs_[1] = receiver; | 484 inputs_[1] = receiver; |
487 inputs_[2] = length; | 485 inputs_[2] = length; |
488 inputs_[3] = elements; | 486 inputs_[3] = elements; |
489 } | 487 } |
490 | 488 |
| 489 DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply-arguments") |
| 490 |
491 LOperand* function() { return inputs_[0]; } | 491 LOperand* function() { return inputs_[0]; } |
492 LOperand* receiver() { return inputs_[1]; } | 492 LOperand* receiver() { return inputs_[1]; } |
493 LOperand* length() { return inputs_[2]; } | 493 LOperand* length() { return inputs_[2]; } |
494 LOperand* elements() { return inputs_[3]; } | 494 LOperand* elements() { return inputs_[3]; } |
495 | |
496 DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply-arguments") | |
497 }; | 495 }; |
498 | 496 |
499 | 497 |
500 class LAccessArgumentsAt: public LTemplateInstruction<1, 3, 0> { | 498 class LAccessArgumentsAt: public LTemplateInstruction<1, 3, 0> { |
501 public: | 499 public: |
502 LAccessArgumentsAt(LOperand* arguments, LOperand* length, LOperand* index) { | 500 LAccessArgumentsAt(LOperand* arguments, LOperand* length, LOperand* index) { |
503 inputs_[0] = arguments; | 501 inputs_[0] = arguments; |
504 inputs_[1] = length; | 502 inputs_[1] = length; |
505 inputs_[2] = index; | 503 inputs_[2] = index; |
506 } | 504 } |
507 | 505 |
| 506 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") |
| 507 |
508 LOperand* arguments() { return inputs_[0]; } | 508 LOperand* arguments() { return inputs_[0]; } |
509 LOperand* length() { return inputs_[1]; } | 509 LOperand* length() { return inputs_[1]; } |
510 LOperand* index() { return inputs_[2]; } | 510 LOperand* index() { return inputs_[2]; } |
511 | 511 |
512 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") | |
513 | |
514 virtual void PrintDataTo(StringStream* stream); | 512 virtual void PrintDataTo(StringStream* stream); |
515 }; | 513 }; |
516 | 514 |
517 | 515 |
518 class LArgumentsLength: public LTemplateInstruction<1, 1, 0> { | 516 class LArgumentsLength: public LTemplateInstruction<1, 1, 0> { |
519 public: | 517 public: |
520 explicit LArgumentsLength(LOperand* elements) { | 518 explicit LArgumentsLength(LOperand* elements) { |
521 inputs_[0] = elements; | 519 inputs_[0] = elements; |
522 } | 520 } |
523 | 521 |
524 LOperand* elements() { return inputs_[0]; } | |
525 | |
526 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") | 522 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") |
527 }; | 523 }; |
528 | 524 |
529 | 525 |
530 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { | 526 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { |
531 public: | 527 public: |
532 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") | 528 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") |
533 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) | 529 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) |
534 }; | 530 }; |
535 | 531 |
536 | 532 |
537 class LModI: public LTemplateInstruction<1, 2, 1> { | 533 class LModI: public LTemplateInstruction<1, 2, 1> { |
538 public: | 534 public: |
539 LModI(LOperand* left, LOperand* right, LOperand* temp) { | 535 LModI(LOperand* left, LOperand* right, LOperand* temp) { |
540 inputs_[0] = left; | 536 inputs_[0] = left; |
541 inputs_[1] = right; | 537 inputs_[1] = right; |
542 temps_[0] = temp; | 538 temps_[0] = temp; |
543 } | 539 } |
544 | 540 |
545 LOperand* left() { return inputs_[0]; } | |
546 LOperand* right() { return inputs_[1]; } | |
547 LOperand* temp() { return temps_[0]; } | |
548 | |
549 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") | 541 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") |
550 DECLARE_HYDROGEN_ACCESSOR(Mod) | 542 DECLARE_HYDROGEN_ACCESSOR(Mod) |
551 }; | 543 }; |
552 | 544 |
553 | 545 |
554 class LDivI: public LTemplateInstruction<1, 2, 1> { | 546 class LDivI: public LTemplateInstruction<1, 2, 1> { |
555 public: | 547 public: |
556 LDivI(LOperand* left, LOperand* right, LOperand* temp) { | 548 LDivI(LOperand* left, LOperand* right, LOperand* temp) { |
557 inputs_[0] = left; | 549 inputs_[0] = left; |
558 inputs_[1] = right; | 550 inputs_[1] = right; |
559 temps_[0] = temp; | 551 temps_[0] = temp; |
560 } | 552 } |
561 | 553 |
562 LOperand* left() { return inputs_[0]; } | |
563 LOperand* right() { return inputs_[1]; } | |
564 | |
565 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") | 554 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") |
566 DECLARE_HYDROGEN_ACCESSOR(Div) | 555 DECLARE_HYDROGEN_ACCESSOR(Div) |
567 }; | 556 }; |
568 | 557 |
569 | 558 |
570 class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { | 559 class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { |
571 public: | 560 public: |
572 LMathFloorOfDiv(LOperand* left, | 561 LMathFloorOfDiv(LOperand* left, |
573 LOperand* right, | 562 LOperand* right, |
574 LOperand* temp = NULL) { | 563 LOperand* temp = NULL) { |
575 inputs_[0] = left; | 564 inputs_[0] = left; |
576 inputs_[1] = right; | 565 inputs_[1] = right; |
577 temps_[0] = temp; | 566 temps_[0] = temp; |
578 } | 567 } |
579 | 568 |
580 LOperand* left() { return inputs_[0]; } | |
581 LOperand* right() { return inputs_[1]; } | |
582 LOperand* temp() { return temps_[0]; } | |
583 | |
584 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") | 569 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") |
585 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 570 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
586 }; | 571 }; |
587 | 572 |
588 | 573 |
589 class LMulI: public LTemplateInstruction<1, 2, 1> { | 574 class LMulI: public LTemplateInstruction<1, 2, 1> { |
590 public: | 575 public: |
591 LMulI(LOperand* left, LOperand* right, LOperand* temp) { | 576 LMulI(LOperand* left, LOperand* right, LOperand* temp) { |
592 inputs_[0] = left; | 577 inputs_[0] = left; |
593 inputs_[1] = right; | 578 inputs_[1] = right; |
594 temps_[0] = temp; | 579 temps_[0] = temp; |
595 } | 580 } |
596 | 581 |
597 LOperand* left() { return inputs_[0]; } | |
598 LOperand* right() { return inputs_[1]; } | |
599 LOperand* temp() { return temps_[0]; } | |
600 | |
601 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") | 582 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") |
602 DECLARE_HYDROGEN_ACCESSOR(Mul) | 583 DECLARE_HYDROGEN_ACCESSOR(Mul) |
603 }; | 584 }; |
604 | 585 |
605 | 586 |
606 class LCmpIDAndBranch: public LControlInstruction<2, 0> { | 587 class LCmpIDAndBranch: public LControlInstruction<2, 0> { |
607 public: | 588 public: |
608 LCmpIDAndBranch(LOperand* left, LOperand* right) { | 589 LCmpIDAndBranch(LOperand* left, LOperand* right) { |
609 inputs_[0] = left; | 590 inputs_[0] = left; |
610 inputs_[1] = right; | 591 inputs_[1] = right; |
611 } | 592 } |
612 | 593 |
613 LOperand* left() { return inputs_[0]; } | |
614 LOperand* right() { return inputs_[1]; } | |
615 | |
616 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch") | 594 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch") |
617 DECLARE_HYDROGEN_ACCESSOR(CompareIDAndBranch) | 595 DECLARE_HYDROGEN_ACCESSOR(CompareIDAndBranch) |
618 | 596 |
619 Token::Value op() const { return hydrogen()->token(); } | 597 Token::Value op() const { return hydrogen()->token(); } |
620 bool is_double() const { | 598 bool is_double() const { |
621 return hydrogen()->GetInputRepresentation().IsDouble(); | 599 return hydrogen()->GetInputRepresentation().IsDouble(); |
622 } | 600 } |
623 | 601 |
624 virtual void PrintDataTo(StringStream* stream); | 602 virtual void PrintDataTo(StringStream* stream); |
625 }; | 603 }; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 }; | 639 }; |
662 | 640 |
663 | 641 |
664 class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { | 642 class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { |
665 public: | 643 public: |
666 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) { | 644 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) { |
667 inputs_[0] = left; | 645 inputs_[0] = left; |
668 inputs_[1] = right; | 646 inputs_[1] = right; |
669 } | 647 } |
670 | 648 |
671 LOperand* left() { return inputs_[0]; } | |
672 LOperand* right() { return inputs_[1]; } | |
673 | |
674 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, | 649 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, |
675 "cmp-object-eq-and-branch") | 650 "cmp-object-eq-and-branch") |
676 }; | 651 }; |
677 | 652 |
678 | 653 |
679 class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> { | 654 class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> { |
680 public: | 655 public: |
681 explicit LCmpConstantEqAndBranch(LOperand* left) { | 656 explicit LCmpConstantEqAndBranch(LOperand* left) { |
682 inputs_[0] = left; | 657 inputs_[0] = left; |
683 } | 658 } |
684 | 659 |
685 LOperand* left() { return inputs_[0]; } | |
686 | |
687 DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch, | 660 DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch, |
688 "cmp-constant-eq-and-branch") | 661 "cmp-constant-eq-and-branch") |
689 DECLARE_HYDROGEN_ACCESSOR(CompareConstantEqAndBranch) | 662 DECLARE_HYDROGEN_ACCESSOR(CompareConstantEqAndBranch) |
690 }; | 663 }; |
691 | 664 |
692 | 665 |
693 class LIsNilAndBranch: public LControlInstruction<1, 1> { | 666 class LIsNilAndBranch: public LControlInstruction<1, 1> { |
694 public: | 667 public: |
695 LIsNilAndBranch(LOperand* value, LOperand* temp) { | 668 LIsNilAndBranch(LOperand* value, LOperand* temp) { |
696 inputs_[0] = value; | 669 inputs_[0] = value; |
697 temps_[0] = temp; | 670 temps_[0] = temp; |
698 } | 671 } |
699 | 672 |
700 LOperand* value() { return inputs_[0]; } | |
701 LOperand* temp() { return temps_[0]; } | |
702 | |
703 DECLARE_CONCRETE_INSTRUCTION(IsNilAndBranch, "is-nil-and-branch") | 673 DECLARE_CONCRETE_INSTRUCTION(IsNilAndBranch, "is-nil-and-branch") |
704 DECLARE_HYDROGEN_ACCESSOR(IsNilAndBranch) | 674 DECLARE_HYDROGEN_ACCESSOR(IsNilAndBranch) |
705 | 675 |
706 EqualityKind kind() const { return hydrogen()->kind(); } | 676 EqualityKind kind() const { return hydrogen()->kind(); } |
707 NilValue nil() const { return hydrogen()->nil(); } | 677 NilValue nil() const { return hydrogen()->nil(); } |
708 | 678 |
709 virtual void PrintDataTo(StringStream* stream); | 679 virtual void PrintDataTo(StringStream* stream); |
710 }; | 680 }; |
711 | 681 |
712 | 682 |
713 class LIsObjectAndBranch: public LControlInstruction<1, 1> { | 683 class LIsObjectAndBranch: public LControlInstruction<1, 1> { |
714 public: | 684 public: |
715 LIsObjectAndBranch(LOperand* value, LOperand* temp) { | 685 LIsObjectAndBranch(LOperand* value, LOperand* temp) { |
716 inputs_[0] = value; | 686 inputs_[0] = value; |
717 temps_[0] = temp; | 687 temps_[0] = temp; |
718 } | 688 } |
719 | 689 |
720 LOperand* value() { return inputs_[0]; } | |
721 LOperand* temp() { return temps_[0]; } | |
722 | |
723 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") | 690 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") |
724 | 691 |
725 virtual void PrintDataTo(StringStream* stream); | 692 virtual void PrintDataTo(StringStream* stream); |
726 }; | 693 }; |
727 | 694 |
728 | 695 |
729 class LIsStringAndBranch: public LControlInstruction<1, 1> { | 696 class LIsStringAndBranch: public LControlInstruction<1, 1> { |
730 public: | 697 public: |
731 LIsStringAndBranch(LOperand* value, LOperand* temp) { | 698 LIsStringAndBranch(LOperand* value, LOperand* temp) { |
732 inputs_[0] = value; | 699 inputs_[0] = value; |
733 temps_[0] = temp; | 700 temps_[0] = temp; |
734 } | 701 } |
735 | 702 |
736 LOperand* value() { return inputs_[0]; } | |
737 LOperand* temp() { return temps_[0]; } | |
738 | |
739 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") | 703 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") |
740 | 704 |
741 virtual void PrintDataTo(StringStream* stream); | 705 virtual void PrintDataTo(StringStream* stream); |
742 }; | 706 }; |
743 | 707 |
744 | 708 |
745 class LIsSmiAndBranch: public LControlInstruction<1, 0> { | 709 class LIsSmiAndBranch: public LControlInstruction<1, 0> { |
746 public: | 710 public: |
747 explicit LIsSmiAndBranch(LOperand* value) { | 711 explicit LIsSmiAndBranch(LOperand* value) { |
748 inputs_[0] = value; | 712 inputs_[0] = value; |
749 } | 713 } |
750 | 714 |
751 LOperand* value() { return inputs_[0]; } | |
752 | |
753 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") | 715 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") |
754 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) | 716 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) |
755 | 717 |
756 virtual void PrintDataTo(StringStream* stream); | 718 virtual void PrintDataTo(StringStream* stream); |
757 }; | 719 }; |
758 | 720 |
759 | 721 |
760 class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { | 722 class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { |
761 public: | 723 public: |
762 LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { | 724 LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { |
763 inputs_[0] = value; | 725 inputs_[0] = value; |
764 temps_[0] = temp; | 726 temps_[0] = temp; |
765 } | 727 } |
766 | 728 |
767 LOperand* value() { return inputs_[0]; } | |
768 LOperand* temp() { return temps_[0]; } | |
769 | |
770 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, | 729 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, |
771 "is-undetectable-and-branch") | 730 "is-undetectable-and-branch") |
772 | 731 |
773 virtual void PrintDataTo(StringStream* stream); | 732 virtual void PrintDataTo(StringStream* stream); |
774 }; | 733 }; |
775 | 734 |
776 | 735 |
777 class LStringCompareAndBranch: public LControlInstruction<3, 0> { | 736 class LStringCompareAndBranch: public LControlInstruction<3, 0> { |
778 public: | 737 public: |
779 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) { | 738 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) { |
780 inputs_[0] = context; | 739 inputs_[0] = context; |
781 inputs_[1] = left; | 740 inputs_[1] = left; |
782 inputs_[2] = right; | 741 inputs_[2] = right; |
783 } | 742 } |
784 | 743 |
785 LOperand* left() { return inputs_[1]; } | |
786 LOperand* right() { return inputs_[2]; } | |
787 | |
788 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, | 744 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, |
789 "string-compare-and-branch") | 745 "string-compare-and-branch") |
790 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) | 746 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) |
791 | 747 |
792 virtual void PrintDataTo(StringStream* stream); | 748 virtual void PrintDataTo(StringStream* stream); |
793 | 749 |
794 Token::Value op() const { return hydrogen()->token(); } | 750 Token::Value op() const { return hydrogen()->token(); } |
795 }; | 751 }; |
796 | 752 |
797 | 753 |
798 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 1> { | 754 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 1> { |
799 public: | 755 public: |
800 LHasInstanceTypeAndBranch(LOperand* value, LOperand* temp) { | 756 LHasInstanceTypeAndBranch(LOperand* value, LOperand* temp) { |
801 inputs_[0] = value; | 757 inputs_[0] = value; |
802 temps_[0] = temp; | 758 temps_[0] = temp; |
803 } | 759 } |
804 | 760 |
805 LOperand* value() { return inputs_[0]; } | |
806 LOperand* temp() { return temps_[0]; } | |
807 | |
808 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, | 761 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, |
809 "has-instance-type-and-branch") | 762 "has-instance-type-and-branch") |
810 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) | 763 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) |
811 | 764 |
812 virtual void PrintDataTo(StringStream* stream); | 765 virtual void PrintDataTo(StringStream* stream); |
813 }; | 766 }; |
814 | 767 |
815 | 768 |
816 class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { | 769 class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { |
817 public: | 770 public: |
818 explicit LGetCachedArrayIndex(LOperand* value) { | 771 explicit LGetCachedArrayIndex(LOperand* value) { |
819 inputs_[0] = value; | 772 inputs_[0] = value; |
820 } | 773 } |
821 | 774 |
822 LOperand* value() { return inputs_[0]; } | |
823 | |
824 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") | 775 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") |
825 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) | 776 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) |
826 }; | 777 }; |
827 | 778 |
828 | 779 |
829 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { | 780 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { |
830 public: | 781 public: |
831 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { | 782 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { |
832 inputs_[0] = value; | 783 inputs_[0] = value; |
833 } | 784 } |
834 | 785 |
835 LOperand* value() { return inputs_[0]; } | |
836 | |
837 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, | 786 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, |
838 "has-cached-array-index-and-branch") | 787 "has-cached-array-index-and-branch") |
839 | |
840 virtual void PrintDataTo(StringStream* stream); | 788 virtual void PrintDataTo(StringStream* stream); |
841 }; | 789 }; |
842 | 790 |
843 | 791 |
844 class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { | 792 class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { |
845 public: | 793 public: |
846 explicit LIsConstructCallAndBranch(LOperand* temp) { | 794 explicit LIsConstructCallAndBranch(LOperand* temp) { |
847 temps_[0] = temp; | 795 temps_[0] = temp; |
848 } | 796 } |
849 | 797 |
850 LOperand* temp() { return temps_[0]; } | |
851 | |
852 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, | 798 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, |
853 "is-construct-call-and-branch") | 799 "is-construct-call-and-branch") |
854 }; | 800 }; |
855 | 801 |
856 | 802 |
857 class LClassOfTestAndBranch: public LControlInstruction<1, 2> { | 803 class LClassOfTestAndBranch: public LControlInstruction<1, 2> { |
858 public: | 804 public: |
859 LClassOfTestAndBranch(LOperand* value, LOperand* temp, LOperand* temp2) { | 805 LClassOfTestAndBranch(LOperand* value, LOperand* temp, LOperand* temp2) { |
860 inputs_[0] = value; | 806 inputs_[0] = value; |
861 temps_[0] = temp; | 807 temps_[0] = temp; |
862 temps_[1] = temp2; | 808 temps_[1] = temp2; |
863 } | 809 } |
864 | 810 |
865 LOperand* value() { return inputs_[0]; } | |
866 LOperand* temp() { return temps_[0]; } | |
867 LOperand* temp2() { return temps_[1]; } | |
868 | |
869 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, | 811 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, |
870 "class-of-test-and-branch") | 812 "class-of-test-and-branch") |
871 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) | 813 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) |
872 | 814 |
873 virtual void PrintDataTo(StringStream* stream); | 815 virtual void PrintDataTo(StringStream* stream); |
874 }; | 816 }; |
875 | 817 |
876 | 818 |
877 class LCmpT: public LTemplateInstruction<1, 3, 0> { | 819 class LCmpT: public LTemplateInstruction<1, 3, 0> { |
878 public: | 820 public: |
(...skipping 11 matching lines...) Expand all Loading... |
890 | 832 |
891 | 833 |
892 class LInstanceOf: public LTemplateInstruction<1, 3, 0> { | 834 class LInstanceOf: public LTemplateInstruction<1, 3, 0> { |
893 public: | 835 public: |
894 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { | 836 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { |
895 inputs_[0] = context; | 837 inputs_[0] = context; |
896 inputs_[1] = left; | 838 inputs_[1] = left; |
897 inputs_[2] = right; | 839 inputs_[2] = right; |
898 } | 840 } |
899 | 841 |
| 842 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") |
| 843 |
900 LOperand* context() { return inputs_[0]; } | 844 LOperand* context() { return inputs_[0]; } |
901 | |
902 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") | |
903 }; | 845 }; |
904 | 846 |
905 | 847 |
906 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 2, 1> { | 848 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 2, 1> { |
907 public: | 849 public: |
908 LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) { | 850 LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) { |
909 inputs_[0] = context; | 851 inputs_[0] = context; |
910 inputs_[1] = value; | 852 inputs_[1] = value; |
911 temps_[0] = temp; | 853 temps_[0] = temp; |
912 } | 854 } |
913 | 855 |
914 LOperand* value() { return inputs_[1]; } | |
915 LOperand* temp() { return temps_[0]; } | |
916 | |
917 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, | 856 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, |
918 "instance-of-known-global") | 857 "instance-of-known-global") |
919 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) | 858 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) |
920 | 859 |
921 Handle<JSFunction> function() const { return hydrogen()->function(); } | 860 Handle<JSFunction> function() const { return hydrogen()->function(); } |
922 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { | 861 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { |
923 return lazy_deopt_env_; | 862 return lazy_deopt_env_; |
924 } | 863 } |
925 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { | 864 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { |
926 lazy_deopt_env_ = env; | 865 lazy_deopt_env_ = env; |
(...skipping 19 matching lines...) Expand all Loading... |
946 }; | 885 }; |
947 | 886 |
948 | 887 |
949 class LBitI: public LTemplateInstruction<1, 2, 0> { | 888 class LBitI: public LTemplateInstruction<1, 2, 0> { |
950 public: | 889 public: |
951 LBitI(LOperand* left, LOperand* right) { | 890 LBitI(LOperand* left, LOperand* right) { |
952 inputs_[0] = left; | 891 inputs_[0] = left; |
953 inputs_[1] = right; | 892 inputs_[1] = right; |
954 } | 893 } |
955 | 894 |
956 LOperand* left() { return inputs_[0]; } | 895 Token::Value op() const { return hydrogen()->op(); } |
957 LOperand* right() { return inputs_[1]; } | |
958 | 896 |
959 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i") | 897 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i") |
960 DECLARE_HYDROGEN_ACCESSOR(Bitwise) | 898 DECLARE_HYDROGEN_ACCESSOR(Bitwise) |
961 | |
962 Token::Value op() const { return hydrogen()->op(); } | |
963 }; | 899 }; |
964 | 900 |
965 | 901 |
966 class LShiftI: public LTemplateInstruction<1, 2, 0> { | 902 class LShiftI: public LTemplateInstruction<1, 2, 0> { |
967 public: | 903 public: |
968 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) | 904 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) |
969 : op_(op), can_deopt_(can_deopt) { | 905 : op_(op), can_deopt_(can_deopt) { |
970 inputs_[0] = left; | 906 inputs_[0] = left; |
971 inputs_[1] = right; | 907 inputs_[1] = right; |
972 } | 908 } |
973 | 909 |
974 LOperand* left() { return inputs_[0]; } | 910 Token::Value op() const { return op_; } |
975 LOperand* right() { return inputs_[1]; } | 911 |
| 912 bool can_deopt() const { return can_deopt_; } |
976 | 913 |
977 DECLARE_CONCRETE_INSTRUCTION(ShiftI, "shift-i") | 914 DECLARE_CONCRETE_INSTRUCTION(ShiftI, "shift-i") |
978 | 915 |
979 Token::Value op() const { return op_; } | |
980 bool can_deopt() const { return can_deopt_; } | |
981 | |
982 private: | 916 private: |
983 Token::Value op_; | 917 Token::Value op_; |
984 bool can_deopt_; | 918 bool can_deopt_; |
985 }; | 919 }; |
986 | 920 |
987 | 921 |
988 class LSubI: public LTemplateInstruction<1, 2, 0> { | 922 class LSubI: public LTemplateInstruction<1, 2, 0> { |
989 public: | 923 public: |
990 LSubI(LOperand* left, LOperand* right) { | 924 LSubI(LOperand* left, LOperand* right) { |
991 inputs_[0] = left; | 925 inputs_[0] = left; |
992 inputs_[1] = right; | 926 inputs_[1] = right; |
993 } | 927 } |
994 | 928 |
995 LOperand* left() { return inputs_[0]; } | |
996 LOperand* right() { return inputs_[1]; } | |
997 | |
998 DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i") | 929 DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i") |
999 DECLARE_HYDROGEN_ACCESSOR(Sub) | 930 DECLARE_HYDROGEN_ACCESSOR(Sub) |
1000 }; | 931 }; |
1001 | 932 |
1002 | 933 |
1003 class LConstantI: public LTemplateInstruction<1, 0, 0> { | 934 class LConstantI: public LTemplateInstruction<1, 0, 0> { |
1004 public: | 935 public: |
1005 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") | 936 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") |
1006 DECLARE_HYDROGEN_ACCESSOR(Constant) | 937 DECLARE_HYDROGEN_ACCESSOR(Constant) |
1007 | 938 |
1008 int32_t value() const { return hydrogen()->Integer32Value(); } | 939 int32_t value() const { return hydrogen()->Integer32Value(); } |
1009 }; | 940 }; |
1010 | 941 |
1011 | 942 |
1012 class LConstantD: public LTemplateInstruction<1, 0, 1> { | 943 class LConstantD: public LTemplateInstruction<1, 0, 1> { |
1013 public: | 944 public: |
1014 explicit LConstantD(LOperand* temp) { | 945 explicit LConstantD(LOperand* temp) { |
1015 temps_[0] = temp; | 946 temps_[0] = temp; |
1016 } | 947 } |
1017 | 948 |
1018 LOperand* temp() { return temps_[0]; } | |
1019 | |
1020 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d") | 949 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d") |
1021 DECLARE_HYDROGEN_ACCESSOR(Constant) | 950 DECLARE_HYDROGEN_ACCESSOR(Constant) |
1022 | 951 |
1023 double value() const { return hydrogen()->DoubleValue(); } | 952 double value() const { return hydrogen()->DoubleValue(); } |
1024 }; | 953 }; |
1025 | 954 |
1026 | 955 |
1027 class LConstantT: public LTemplateInstruction<1, 0, 0> { | 956 class LConstantT: public LTemplateInstruction<1, 0, 0> { |
1028 public: | 957 public: |
1029 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") | 958 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") |
1030 DECLARE_HYDROGEN_ACCESSOR(Constant) | 959 DECLARE_HYDROGEN_ACCESSOR(Constant) |
1031 | 960 |
1032 Handle<Object> value() const { return hydrogen()->handle(); } | 961 Handle<Object> value() const { return hydrogen()->handle(); } |
1033 }; | 962 }; |
1034 | 963 |
1035 | 964 |
1036 class LBranch: public LControlInstruction<1, 1> { | 965 class LBranch: public LControlInstruction<1, 1> { |
1037 public: | 966 public: |
1038 LBranch(LOperand* value, LOperand* temp) { | 967 explicit LBranch(LOperand* value, LOperand* temp) { |
1039 inputs_[0] = value; | 968 inputs_[0] = value; |
1040 temps_[0] = temp; | 969 temps_[0] = temp; |
1041 } | 970 } |
1042 | 971 |
1043 LOperand* value() { return inputs_[0]; } | |
1044 LOperand* temp() { return temps_[0]; } | |
1045 | |
1046 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") | 972 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") |
1047 DECLARE_HYDROGEN_ACCESSOR(Branch) | 973 DECLARE_HYDROGEN_ACCESSOR(Branch) |
1048 | 974 |
1049 virtual void PrintDataTo(StringStream* stream); | 975 virtual void PrintDataTo(StringStream* stream); |
1050 }; | 976 }; |
1051 | 977 |
1052 | 978 |
1053 class LCmpMapAndBranch: public LTemplateInstruction<0, 1, 0> { | 979 class LCmpMapAndBranch: public LTemplateInstruction<0, 1, 0> { |
1054 public: | 980 public: |
1055 explicit LCmpMapAndBranch(LOperand* value) { | 981 explicit LCmpMapAndBranch(LOperand* value) { |
1056 inputs_[0] = value; | 982 inputs_[0] = value; |
1057 } | 983 } |
1058 | 984 |
1059 LOperand* value() { return inputs_[0]; } | |
1060 | |
1061 DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch") | 985 DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch") |
1062 DECLARE_HYDROGEN_ACCESSOR(CompareMap) | 986 DECLARE_HYDROGEN_ACCESSOR(CompareMap) |
1063 | 987 |
1064 virtual bool IsControl() const { return true; } | 988 virtual bool IsControl() const { return true; } |
1065 | 989 |
1066 Handle<Map> map() const { return hydrogen()->map(); } | 990 Handle<Map> map() const { return hydrogen()->map(); } |
1067 int true_block_id() const { | 991 int true_block_id() const { |
1068 return hydrogen()->FirstSuccessor()->block_id(); | 992 return hydrogen()->FirstSuccessor()->block_id(); |
1069 } | 993 } |
1070 int false_block_id() const { | 994 int false_block_id() const { |
1071 return hydrogen()->SecondSuccessor()->block_id(); | 995 return hydrogen()->SecondSuccessor()->block_id(); |
1072 } | 996 } |
1073 }; | 997 }; |
1074 | 998 |
1075 | 999 |
1076 class LJSArrayLength: public LTemplateInstruction<1, 1, 0> { | 1000 class LJSArrayLength: public LTemplateInstruction<1, 1, 0> { |
1077 public: | 1001 public: |
1078 explicit LJSArrayLength(LOperand* value) { | 1002 explicit LJSArrayLength(LOperand* value) { |
1079 inputs_[0] = value; | 1003 inputs_[0] = value; |
1080 } | 1004 } |
1081 | 1005 |
1082 LOperand* value() { return inputs_[0]; } | |
1083 | |
1084 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js-array-length") | 1006 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js-array-length") |
1085 DECLARE_HYDROGEN_ACCESSOR(JSArrayLength) | 1007 DECLARE_HYDROGEN_ACCESSOR(JSArrayLength) |
1086 }; | 1008 }; |
1087 | 1009 |
1088 | 1010 |
1089 class LFixedArrayBaseLength: public LTemplateInstruction<1, 1, 0> { | 1011 class LFixedArrayBaseLength: public LTemplateInstruction<1, 1, 0> { |
1090 public: | 1012 public: |
1091 explicit LFixedArrayBaseLength(LOperand* value) { | 1013 explicit LFixedArrayBaseLength(LOperand* value) { |
1092 inputs_[0] = value; | 1014 inputs_[0] = value; |
1093 } | 1015 } |
1094 | 1016 |
1095 LOperand* value() { return inputs_[0]; } | |
1096 | |
1097 DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength, | 1017 DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength, |
1098 "fixed-array-base-length") | 1018 "fixed-array-base-length") |
1099 DECLARE_HYDROGEN_ACCESSOR(FixedArrayBaseLength) | 1019 DECLARE_HYDROGEN_ACCESSOR(FixedArrayBaseLength) |
1100 }; | 1020 }; |
1101 | 1021 |
1102 | 1022 |
1103 class LMapEnumLength: public LTemplateInstruction<1, 1, 0> { | 1023 class LMapEnumLength: public LTemplateInstruction<1, 1, 0> { |
1104 public: | 1024 public: |
1105 explicit LMapEnumLength(LOperand* value) { | 1025 explicit LMapEnumLength(LOperand* value) { |
1106 inputs_[0] = value; | 1026 inputs_[0] = value; |
1107 } | 1027 } |
1108 | 1028 |
1109 LOperand* value() { return inputs_[0]; } | |
1110 | |
1111 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") | 1029 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") |
1112 }; | 1030 }; |
1113 | 1031 |
1114 | 1032 |
1115 class LElementsKind: public LTemplateInstruction<1, 1, 0> { | 1033 class LElementsKind: public LTemplateInstruction<1, 1, 0> { |
1116 public: | 1034 public: |
1117 explicit LElementsKind(LOperand* value) { | 1035 explicit LElementsKind(LOperand* value) { |
1118 inputs_[0] = value; | 1036 inputs_[0] = value; |
1119 } | 1037 } |
1120 | 1038 |
1121 LOperand* value() { return inputs_[0]; } | |
1122 | |
1123 DECLARE_CONCRETE_INSTRUCTION(ElementsKind, "elements-kind") | 1039 DECLARE_CONCRETE_INSTRUCTION(ElementsKind, "elements-kind") |
1124 DECLARE_HYDROGEN_ACCESSOR(ElementsKind) | 1040 DECLARE_HYDROGEN_ACCESSOR(ElementsKind) |
1125 }; | 1041 }; |
1126 | 1042 |
1127 | 1043 |
1128 class LValueOf: public LTemplateInstruction<1, 1, 1> { | 1044 class LValueOf: public LTemplateInstruction<1, 1, 1> { |
1129 public: | 1045 public: |
1130 LValueOf(LOperand* value, LOperand* temp) { | 1046 LValueOf(LOperand* value, LOperand* temp) { |
1131 inputs_[0] = value; | 1047 inputs_[0] = value; |
1132 temps_[0] = temp; | 1048 temps_[0] = temp; |
1133 } | 1049 } |
1134 | 1050 |
1135 LOperand* value() { return inputs_[0]; } | |
1136 LOperand* temp() { return temps_[0]; } | |
1137 | |
1138 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") | 1051 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") |
1139 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | 1052 DECLARE_HYDROGEN_ACCESSOR(ValueOf) |
1140 }; | 1053 }; |
1141 | 1054 |
1142 | 1055 |
1143 class LDateField: public LTemplateInstruction<1, 1, 1> { | 1056 class LDateField: public LTemplateInstruction<1, 1, 1> { |
1144 public: | 1057 public: |
1145 LDateField(LOperand* date, LOperand* temp, Smi* index) | 1058 LDateField(LOperand* date, LOperand* temp, Smi* index) |
1146 : index_(index) { | 1059 : index_(index) { |
1147 inputs_[0] = date; | 1060 inputs_[0] = date; |
1148 temps_[0] = temp; | 1061 temps_[0] = temp; |
1149 } | 1062 } |
1150 | 1063 |
1151 LOperand* date() { return inputs_[0]; } | |
1152 LOperand* temp() { return temps_[0]; } | |
1153 | |
1154 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field") | 1064 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field") |
1155 DECLARE_HYDROGEN_ACCESSOR(DateField) | 1065 DECLARE_HYDROGEN_ACCESSOR(DateField) |
1156 | 1066 |
1157 Smi* index() const { return index_; } | 1067 Smi* index() const { return index_; } |
1158 | 1068 |
1159 private: | 1069 private: |
1160 Smi* index_; | 1070 Smi* index_; |
1161 }; | 1071 }; |
1162 | 1072 |
1163 | 1073 |
(...skipping 10 matching lines...) Expand all Loading... |
1174 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") | 1084 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") |
1175 }; | 1085 }; |
1176 | 1086 |
1177 | 1087 |
1178 class LBitNotI: public LTemplateInstruction<1, 1, 0> { | 1088 class LBitNotI: public LTemplateInstruction<1, 1, 0> { |
1179 public: | 1089 public: |
1180 explicit LBitNotI(LOperand* value) { | 1090 explicit LBitNotI(LOperand* value) { |
1181 inputs_[0] = value; | 1091 inputs_[0] = value; |
1182 } | 1092 } |
1183 | 1093 |
1184 LOperand* value() { return inputs_[0]; } | |
1185 | |
1186 DECLARE_CONCRETE_INSTRUCTION(BitNotI, "bit-not-i") | 1094 DECLARE_CONCRETE_INSTRUCTION(BitNotI, "bit-not-i") |
1187 }; | 1095 }; |
1188 | 1096 |
1189 | 1097 |
1190 class LAddI: public LTemplateInstruction<1, 2, 0> { | 1098 class LAddI: public LTemplateInstruction<1, 2, 0> { |
1191 public: | 1099 public: |
1192 LAddI(LOperand* left, LOperand* right) { | 1100 LAddI(LOperand* left, LOperand* right) { |
1193 inputs_[0] = left; | 1101 inputs_[0] = left; |
1194 inputs_[1] = right; | 1102 inputs_[1] = right; |
1195 } | 1103 } |
1196 | 1104 |
1197 LOperand* left() { return inputs_[0]; } | |
1198 LOperand* right() { return inputs_[1]; } | |
1199 | |
1200 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") | 1105 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") |
1201 DECLARE_HYDROGEN_ACCESSOR(Add) | 1106 DECLARE_HYDROGEN_ACCESSOR(Add) |
1202 }; | 1107 }; |
1203 | 1108 |
1204 | 1109 |
1205 class LMathMinMax: public LTemplateInstruction<1, 2, 0> { | 1110 class LMathMinMax: public LTemplateInstruction<1, 2, 0> { |
1206 public: | 1111 public: |
1207 LMathMinMax(LOperand* left, LOperand* right) { | 1112 LMathMinMax(LOperand* left, LOperand* right) { |
1208 inputs_[0] = left; | 1113 inputs_[0] = left; |
1209 inputs_[1] = right; | 1114 inputs_[1] = right; |
1210 } | 1115 } |
1211 | 1116 |
1212 LOperand* left() { return inputs_[0]; } | |
1213 LOperand* right() { return inputs_[1]; } | |
1214 | |
1215 DECLARE_CONCRETE_INSTRUCTION(MathMinMax, "min-max") | 1117 DECLARE_CONCRETE_INSTRUCTION(MathMinMax, "min-max") |
1216 DECLARE_HYDROGEN_ACCESSOR(MathMinMax) | 1118 DECLARE_HYDROGEN_ACCESSOR(MathMinMax) |
1217 }; | 1119 }; |
1218 | 1120 |
1219 | 1121 |
1220 class LPower: public LTemplateInstruction<1, 2, 0> { | 1122 class LPower: public LTemplateInstruction<1, 2, 0> { |
1221 public: | 1123 public: |
1222 LPower(LOperand* left, LOperand* right) { | 1124 LPower(LOperand* left, LOperand* right) { |
1223 inputs_[0] = left; | 1125 inputs_[0] = left; |
1224 inputs_[1] = right; | 1126 inputs_[1] = right; |
1225 } | 1127 } |
1226 | 1128 |
1227 LOperand* left() { return inputs_[0]; } | |
1228 LOperand* right() { return inputs_[1]; } | |
1229 | |
1230 DECLARE_CONCRETE_INSTRUCTION(Power, "power") | 1129 DECLARE_CONCRETE_INSTRUCTION(Power, "power") |
1231 DECLARE_HYDROGEN_ACCESSOR(Power) | 1130 DECLARE_HYDROGEN_ACCESSOR(Power) |
1232 }; | 1131 }; |
1233 | 1132 |
1234 | 1133 |
1235 class LRandom: public LTemplateInstruction<1, 1, 0> { | 1134 class LRandom: public LTemplateInstruction<1, 1, 0> { |
1236 public: | 1135 public: |
1237 explicit LRandom(LOperand* global_object) { | 1136 explicit LRandom(LOperand* global_object) { |
1238 inputs_[0] = global_object; | 1137 inputs_[0] = global_object; |
1239 } | 1138 } |
1240 | 1139 |
1241 LOperand* global_object() { return inputs_[0]; } | |
1242 | |
1243 DECLARE_CONCRETE_INSTRUCTION(Random, "random") | 1140 DECLARE_CONCRETE_INSTRUCTION(Random, "random") |
1244 DECLARE_HYDROGEN_ACCESSOR(Random) | 1141 DECLARE_HYDROGEN_ACCESSOR(Random) |
1245 }; | 1142 }; |
1246 | 1143 |
1247 | 1144 |
1248 class LArithmeticD: public LTemplateInstruction<1, 2, 0> { | 1145 class LArithmeticD: public LTemplateInstruction<1, 2, 0> { |
1249 public: | 1146 public: |
1250 LArithmeticD(Token::Value op, LOperand* left, LOperand* right) | 1147 LArithmeticD(Token::Value op, LOperand* left, LOperand* right) |
1251 : op_(op) { | 1148 : op_(op) { |
1252 inputs_[0] = left; | 1149 inputs_[0] = left; |
1253 inputs_[1] = right; | 1150 inputs_[1] = right; |
1254 } | 1151 } |
1255 | 1152 |
1256 LOperand* left() { return inputs_[0]; } | |
1257 LOperand* right() { return inputs_[1]; } | |
1258 | |
1259 Token::Value op() const { return op_; } | 1153 Token::Value op() const { return op_; } |
1260 | 1154 |
1261 virtual Opcode opcode() const { return LInstruction::kArithmeticD; } | 1155 virtual Opcode opcode() const { return LInstruction::kArithmeticD; } |
1262 virtual void CompileToNative(LCodeGen* generator); | 1156 virtual void CompileToNative(LCodeGen* generator); |
1263 virtual const char* Mnemonic() const; | 1157 virtual const char* Mnemonic() const; |
1264 | 1158 |
1265 private: | 1159 private: |
1266 Token::Value op_; | 1160 Token::Value op_; |
1267 }; | 1161 }; |
1268 | 1162 |
1269 | 1163 |
1270 class LArithmeticT: public LTemplateInstruction<1, 3, 0> { | 1164 class LArithmeticT: public LTemplateInstruction<1, 3, 0> { |
1271 public: | 1165 public: |
1272 LArithmeticT(Token::Value op, | 1166 LArithmeticT(Token::Value op, |
1273 LOperand* context, | 1167 LOperand* context, |
1274 LOperand* left, | 1168 LOperand* left, |
1275 LOperand* right) | 1169 LOperand* right) |
1276 : op_(op) { | 1170 : op_(op) { |
1277 inputs_[0] = context; | 1171 inputs_[0] = context; |
1278 inputs_[1] = left; | 1172 inputs_[1] = left; |
1279 inputs_[2] = right; | 1173 inputs_[2] = right; |
1280 } | 1174 } |
1281 | 1175 |
1282 LOperand* context() { return inputs_[0]; } | |
1283 LOperand* left() { return inputs_[1]; } | |
1284 LOperand* right() { return inputs_[2]; } | |
1285 | |
1286 virtual Opcode opcode() const { return LInstruction::kArithmeticT; } | 1176 virtual Opcode opcode() const { return LInstruction::kArithmeticT; } |
1287 virtual void CompileToNative(LCodeGen* generator); | 1177 virtual void CompileToNative(LCodeGen* generator); |
1288 virtual const char* Mnemonic() const; | 1178 virtual const char* Mnemonic() const; |
1289 | 1179 |
1290 Token::Value op() const { return op_; } | 1180 Token::Value op() const { return op_; } |
| 1181 LOperand* context() { return inputs_[0]; } |
| 1182 LOperand* left() { return inputs_[1]; } |
| 1183 LOperand* right() { return inputs_[2]; } |
1291 | 1184 |
1292 private: | 1185 private: |
1293 Token::Value op_; | 1186 Token::Value op_; |
1294 }; | 1187 }; |
1295 | 1188 |
1296 | 1189 |
1297 class LReturn: public LTemplateInstruction<0, 1, 0> { | 1190 class LReturn: public LTemplateInstruction<0, 1, 0> { |
1298 public: | 1191 public: |
1299 explicit LReturn(LOperand* value) { | 1192 explicit LReturn(LOperand* value) { |
1300 inputs_[0] = value; | 1193 inputs_[0] = value; |
1301 } | 1194 } |
1302 | 1195 |
1303 DECLARE_CONCRETE_INSTRUCTION(Return, "return") | 1196 DECLARE_CONCRETE_INSTRUCTION(Return, "return") |
1304 }; | 1197 }; |
1305 | 1198 |
1306 | 1199 |
1307 class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { | 1200 class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { |
1308 public: | 1201 public: |
1309 explicit LLoadNamedField(LOperand* object) { | 1202 explicit LLoadNamedField(LOperand* object) { |
1310 inputs_[0] = object; | 1203 inputs_[0] = object; |
1311 } | 1204 } |
1312 | 1205 |
1313 LOperand* object() { return inputs_[0]; } | |
1314 | |
1315 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") | 1206 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") |
1316 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) | 1207 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) |
| 1208 |
| 1209 LOperand* object() { return inputs_[0]; } |
1317 }; | 1210 }; |
1318 | 1211 |
1319 | 1212 |
1320 class LLoadNamedFieldPolymorphic: public LTemplateInstruction<1, 2, 0> { | 1213 class LLoadNamedFieldPolymorphic: public LTemplateInstruction<1, 2, 0> { |
1321 public: | 1214 public: |
1322 LLoadNamedFieldPolymorphic(LOperand* context, LOperand* object) { | 1215 LLoadNamedFieldPolymorphic(LOperand* context, LOperand* object) { |
1323 inputs_[0] = context; | 1216 inputs_[0] = context; |
1324 inputs_[1] = object; | 1217 inputs_[1] = object; |
1325 } | 1218 } |
1326 | 1219 |
| 1220 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field-polymorphic") |
| 1221 DECLARE_HYDROGEN_ACCESSOR(LoadNamedFieldPolymorphic) |
| 1222 |
1327 LOperand* context() { return inputs_[0]; } | 1223 LOperand* context() { return inputs_[0]; } |
1328 LOperand* object() { return inputs_[1]; } | 1224 LOperand* object() { return inputs_[1]; } |
1329 | |
1330 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field-polymorphic") | |
1331 DECLARE_HYDROGEN_ACCESSOR(LoadNamedFieldPolymorphic) | |
1332 }; | 1225 }; |
1333 | 1226 |
1334 | 1227 |
1335 class LLoadNamedGeneric: public LTemplateInstruction<1, 2, 0> { | 1228 class LLoadNamedGeneric: public LTemplateInstruction<1, 2, 0> { |
1336 public: | 1229 public: |
1337 LLoadNamedGeneric(LOperand* context, LOperand* object) { | 1230 LLoadNamedGeneric(LOperand* context, LOperand* object) { |
1338 inputs_[0] = context; | 1231 inputs_[0] = context; |
1339 inputs_[1] = object; | 1232 inputs_[1] = object; |
1340 } | 1233 } |
1341 | 1234 |
1342 LOperand* context() { return inputs_[0]; } | |
1343 LOperand* object() { return inputs_[1]; } | |
1344 | |
1345 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") | 1235 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") |
1346 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) | 1236 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) |
1347 | 1237 |
| 1238 LOperand* context() { return inputs_[0]; } |
| 1239 LOperand* object() { return inputs_[1]; } |
1348 Handle<Object> name() const { return hydrogen()->name(); } | 1240 Handle<Object> name() const { return hydrogen()->name(); } |
1349 }; | 1241 }; |
1350 | 1242 |
1351 | 1243 |
1352 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 1> { | 1244 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 1> { |
1353 public: | 1245 public: |
1354 LLoadFunctionPrototype(LOperand* function, LOperand* temp) { | 1246 LLoadFunctionPrototype(LOperand* function, LOperand* temp) { |
1355 inputs_[0] = function; | 1247 inputs_[0] = function; |
1356 temps_[0] = temp; | 1248 temps_[0] = temp; |
1357 } | 1249 } |
1358 | 1250 |
1359 LOperand* function() { return inputs_[0]; } | |
1360 LOperand* temp() { return temps_[0]; } | |
1361 | |
1362 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype") | 1251 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype") |
1363 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype) | 1252 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype) |
| 1253 |
| 1254 LOperand* function() { return inputs_[0]; } |
1364 }; | 1255 }; |
1365 | 1256 |
1366 | 1257 |
1367 class LLoadElements: public LTemplateInstruction<1, 1, 0> { | 1258 class LLoadElements: public LTemplateInstruction<1, 1, 0> { |
1368 public: | 1259 public: |
1369 explicit LLoadElements(LOperand* object) { | 1260 explicit LLoadElements(LOperand* object) { |
1370 inputs_[0] = object; | 1261 inputs_[0] = object; |
1371 } | 1262 } |
1372 | 1263 |
1373 LOperand* object() { return inputs_[0]; } | |
1374 | |
1375 DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements") | 1264 DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements") |
1376 }; | 1265 }; |
1377 | 1266 |
1378 | 1267 |
1379 class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> { | 1268 class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> { |
1380 public: | 1269 public: |
1381 explicit LLoadExternalArrayPointer(LOperand* object) { | 1270 explicit LLoadExternalArrayPointer(LOperand* object) { |
1382 inputs_[0] = object; | 1271 inputs_[0] = object; |
1383 } | 1272 } |
1384 | 1273 |
1385 LOperand* object() { return inputs_[0]; } | |
1386 | |
1387 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer, | 1274 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer, |
1388 "load-external-array-pointer") | 1275 "load-external-array-pointer") |
1389 }; | 1276 }; |
1390 | 1277 |
1391 | 1278 |
1392 class LLoadKeyedFastElement: public LTemplateInstruction<1, 2, 0> { | 1279 class LLoadKeyedFastElement: public LTemplateInstruction<1, 2, 0> { |
1393 public: | 1280 public: |
1394 LLoadKeyedFastElement(LOperand* elements, LOperand* key) { | 1281 LLoadKeyedFastElement(LOperand* elements, LOperand* key) { |
1395 inputs_[0] = elements; | 1282 inputs_[0] = elements; |
1396 inputs_[1] = key; | 1283 inputs_[1] = key; |
1397 } | 1284 } |
1398 | 1285 |
1399 LOperand* elements() { return inputs_[0]; } | |
1400 LOperand* key() { return inputs_[1]; } | |
1401 | |
1402 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") | 1286 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") |
1403 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) | 1287 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) |
1404 | 1288 |
| 1289 LOperand* elements() { return inputs_[0]; } |
| 1290 LOperand* key() { return inputs_[1]; } |
1405 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 1291 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
1406 }; | 1292 }; |
1407 | 1293 |
1408 | 1294 |
1409 class LLoadKeyedFastDoubleElement: public LTemplateInstruction<1, 2, 0> { | 1295 class LLoadKeyedFastDoubleElement: public LTemplateInstruction<1, 2, 0> { |
1410 public: | 1296 public: |
1411 LLoadKeyedFastDoubleElement(LOperand* elements, LOperand* key) { | 1297 LLoadKeyedFastDoubleElement(LOperand* elements, LOperand* key) { |
1412 inputs_[0] = elements; | 1298 inputs_[0] = elements; |
1413 inputs_[1] = key; | 1299 inputs_[1] = key; |
1414 } | 1300 } |
1415 | 1301 |
1416 LOperand* elements() { return inputs_[0]; } | |
1417 LOperand* key() { return inputs_[1]; } | |
1418 | |
1419 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement, | 1302 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement, |
1420 "load-keyed-fast-double-element") | 1303 "load-keyed-fast-double-element") |
1421 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastDoubleElement) | 1304 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastDoubleElement) |
1422 | 1305 |
| 1306 LOperand* elements() { return inputs_[0]; } |
| 1307 LOperand* key() { return inputs_[1]; } |
1423 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 1308 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
1424 }; | 1309 }; |
1425 | 1310 |
1426 | 1311 |
1427 inline static bool ExternalArrayOpRequiresTemp( | 1312 inline static bool ExternalArrayOpRequiresTemp( |
1428 Representation key_representation, | 1313 Representation key_representation, |
1429 ElementsKind elements_kind) { | 1314 ElementsKind elements_kind) { |
1430 // Operations that require the key to be divided by two to be converted into | 1315 // Operations that require the key to be divided by two to be converted into |
1431 // an index cannot fold the scale operation into a load and need an extra | 1316 // an index cannot fold the scale operation into a load and need an extra |
1432 // temp register to do the work. | 1317 // temp register to do the work. |
1433 return key_representation.IsTagged() && | 1318 return key_representation.IsTagged() && |
1434 (elements_kind == EXTERNAL_BYTE_ELEMENTS || | 1319 (elements_kind == EXTERNAL_BYTE_ELEMENTS || |
1435 elements_kind == EXTERNAL_UNSIGNED_BYTE_ELEMENTS || | 1320 elements_kind == EXTERNAL_UNSIGNED_BYTE_ELEMENTS || |
1436 elements_kind == EXTERNAL_PIXEL_ELEMENTS); | 1321 elements_kind == EXTERNAL_PIXEL_ELEMENTS); |
1437 } | 1322 } |
1438 | 1323 |
1439 | 1324 |
1440 class LLoadKeyedSpecializedArrayElement: public LTemplateInstruction<1, 2, 0> { | 1325 class LLoadKeyedSpecializedArrayElement: public LTemplateInstruction<1, 2, 0> { |
1441 public: | 1326 public: |
1442 LLoadKeyedSpecializedArrayElement(LOperand* external_pointer, LOperand* key) { | 1327 LLoadKeyedSpecializedArrayElement(LOperand* external_pointer, LOperand* key) { |
1443 inputs_[0] = external_pointer; | 1328 inputs_[0] = external_pointer; |
1444 inputs_[1] = key; | 1329 inputs_[1] = key; |
1445 } | 1330 } |
1446 | 1331 |
1447 LOperand* external_pointer() { return inputs_[0]; } | |
1448 LOperand* key() { return inputs_[1]; } | |
1449 | |
1450 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement, | 1332 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement, |
1451 "load-keyed-specialized-array-element") | 1333 "load-keyed-specialized-array-element") |
1452 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement) | 1334 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement) |
1453 | 1335 |
| 1336 LOperand* external_pointer() { return inputs_[0]; } |
| 1337 LOperand* key() { return inputs_[1]; } |
1454 ElementsKind elements_kind() const { | 1338 ElementsKind elements_kind() const { |
1455 return hydrogen()->elements_kind(); | 1339 return hydrogen()->elements_kind(); |
1456 } | 1340 } |
1457 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 1341 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
1458 }; | 1342 }; |
1459 | 1343 |
1460 | 1344 |
1461 class LLoadKeyedGeneric: public LTemplateInstruction<1, 3, 0> { | 1345 class LLoadKeyedGeneric: public LTemplateInstruction<1, 3, 0> { |
1462 public: | 1346 public: |
1463 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key) { | 1347 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key) { |
1464 inputs_[0] = context; | 1348 inputs_[0] = context; |
1465 inputs_[1] = obj; | 1349 inputs_[1] = obj; |
1466 inputs_[2] = key; | 1350 inputs_[2] = key; |
1467 } | 1351 } |
1468 | 1352 |
| 1353 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") |
| 1354 |
1469 LOperand* context() { return inputs_[0]; } | 1355 LOperand* context() { return inputs_[0]; } |
1470 LOperand* object() { return inputs_[1]; } | 1356 LOperand* object() { return inputs_[1]; } |
1471 LOperand* key() { return inputs_[2]; } | 1357 LOperand* key() { return inputs_[2]; } |
1472 | |
1473 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") | |
1474 }; | 1358 }; |
1475 | 1359 |
1476 | 1360 |
1477 class LLoadGlobalCell: public LTemplateInstruction<1, 0, 0> { | 1361 class LLoadGlobalCell: public LTemplateInstruction<1, 0, 0> { |
1478 public: | 1362 public: |
1479 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") | 1363 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") |
1480 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) | 1364 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) |
1481 }; | 1365 }; |
1482 | 1366 |
1483 | 1367 |
1484 class LLoadGlobalGeneric: public LTemplateInstruction<1, 2, 0> { | 1368 class LLoadGlobalGeneric: public LTemplateInstruction<1, 2, 0> { |
1485 public: | 1369 public: |
1486 LLoadGlobalGeneric(LOperand* context, LOperand* global_object) { | 1370 LLoadGlobalGeneric(LOperand* context, LOperand* global_object) { |
1487 inputs_[0] = context; | 1371 inputs_[0] = context; |
1488 inputs_[1] = global_object; | 1372 inputs_[1] = global_object; |
1489 } | 1373 } |
1490 | 1374 |
1491 LOperand* context() { return inputs_[0]; } | |
1492 LOperand* global_object() { return inputs_[1]; } | |
1493 | |
1494 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") | 1375 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") |
1495 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) | 1376 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) |
1496 | 1377 |
| 1378 LOperand* context() { return inputs_[0]; } |
| 1379 LOperand* global_object() { return inputs_[1]; } |
1497 Handle<Object> name() const { return hydrogen()->name(); } | 1380 Handle<Object> name() const { return hydrogen()->name(); } |
1498 bool for_typeof() const { return hydrogen()->for_typeof(); } | 1381 bool for_typeof() const { return hydrogen()->for_typeof(); } |
1499 }; | 1382 }; |
1500 | 1383 |
1501 | 1384 |
1502 class LStoreGlobalCell: public LTemplateInstruction<0, 1, 0> { | 1385 class LStoreGlobalCell: public LTemplateInstruction<0, 1, 0> { |
1503 public: | 1386 public: |
1504 explicit LStoreGlobalCell(LOperand* value) { | 1387 explicit LStoreGlobalCell(LOperand* value) { |
1505 inputs_[0] = value; | 1388 inputs_[0] = value; |
1506 } | 1389 } |
1507 | 1390 |
1508 LOperand* value() { return inputs_[0]; } | |
1509 | |
1510 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") | 1391 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") |
1511 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) | 1392 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) |
| 1393 |
| 1394 LOperand* value() { return inputs_[0]; } |
1512 }; | 1395 }; |
1513 | 1396 |
1514 | 1397 |
1515 class LStoreGlobalGeneric: public LTemplateInstruction<0, 3, 0> { | 1398 class LStoreGlobalGeneric: public LTemplateInstruction<0, 3, 0> { |
1516 public: | 1399 public: |
1517 LStoreGlobalGeneric(LOperand* context, | 1400 LStoreGlobalGeneric(LOperand* context, |
1518 LOperand* global_object, | 1401 LOperand* global_object, |
1519 LOperand* value) { | 1402 LOperand* value) { |
1520 inputs_[0] = context; | 1403 inputs_[0] = context; |
1521 inputs_[1] = global_object; | 1404 inputs_[1] = global_object; |
1522 inputs_[2] = value; | 1405 inputs_[2] = value; |
1523 } | 1406 } |
1524 | 1407 |
1525 LOperand* context() { return inputs_[0]; } | |
1526 LOperand* global_object() { return inputs_[1]; } | |
1527 LOperand* value() { return inputs_[2]; } | |
1528 | |
1529 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") | 1408 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") |
1530 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) | 1409 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) |
1531 | 1410 |
| 1411 LOperand* context() { return InputAt(0); } |
| 1412 LOperand* global_object() { return InputAt(1); } |
1532 Handle<Object> name() const { return hydrogen()->name(); } | 1413 Handle<Object> name() const { return hydrogen()->name(); } |
| 1414 LOperand* value() { return InputAt(2); } |
1533 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 1415 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
1534 }; | 1416 }; |
1535 | 1417 |
1536 | 1418 |
1537 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { | 1419 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { |
1538 public: | 1420 public: |
1539 explicit LLoadContextSlot(LOperand* context) { | 1421 explicit LLoadContextSlot(LOperand* context) { |
1540 inputs_[0] = context; | 1422 inputs_[0] = context; |
1541 } | 1423 } |
1542 | 1424 |
1543 LOperand* context() { return inputs_[0]; } | |
1544 | |
1545 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") | 1425 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") |
1546 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) | 1426 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) |
1547 | 1427 |
| 1428 LOperand* context() { return InputAt(0); } |
1548 int slot_index() { return hydrogen()->slot_index(); } | 1429 int slot_index() { return hydrogen()->slot_index(); } |
1549 | 1430 |
1550 virtual void PrintDataTo(StringStream* stream); | 1431 virtual void PrintDataTo(StringStream* stream); |
1551 }; | 1432 }; |
1552 | 1433 |
1553 | 1434 |
1554 class LStoreContextSlot: public LTemplateInstruction<0, 2, 1> { | 1435 class LStoreContextSlot: public LTemplateInstruction<0, 2, 1> { |
1555 public: | 1436 public: |
1556 LStoreContextSlot(LOperand* context, LOperand* value, LOperand* temp) { | 1437 LStoreContextSlot(LOperand* context, LOperand* value, LOperand* temp) { |
1557 inputs_[0] = context; | 1438 inputs_[0] = context; |
1558 inputs_[1] = value; | 1439 inputs_[1] = value; |
1559 temps_[0] = temp; | 1440 temps_[0] = temp; |
1560 } | 1441 } |
1561 | 1442 |
1562 LOperand* context() { return inputs_[0]; } | |
1563 LOperand* value() { return inputs_[1]; } | |
1564 LOperand* temp() { return temps_[0]; } | |
1565 | |
1566 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") | 1443 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") |
1567 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) | 1444 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) |
1568 | 1445 |
| 1446 LOperand* context() { return InputAt(0); } |
| 1447 LOperand* value() { return InputAt(1); } |
1569 int slot_index() { return hydrogen()->slot_index(); } | 1448 int slot_index() { return hydrogen()->slot_index(); } |
1570 | 1449 |
1571 virtual void PrintDataTo(StringStream* stream); | 1450 virtual void PrintDataTo(StringStream* stream); |
1572 }; | 1451 }; |
1573 | 1452 |
1574 | 1453 |
1575 class LPushArgument: public LTemplateInstruction<0, 1, 0> { | 1454 class LPushArgument: public LTemplateInstruction<0, 1, 0> { |
1576 public: | 1455 public: |
1577 explicit LPushArgument(LOperand* value) { | 1456 explicit LPushArgument(LOperand* value) { |
1578 inputs_[0] = value; | 1457 inputs_[0] = value; |
1579 } | 1458 } |
1580 | 1459 |
1581 LOperand* value() { return inputs_[0]; } | |
1582 | |
1583 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") | 1460 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") |
1584 }; | 1461 }; |
1585 | 1462 |
1586 | 1463 |
1587 class LDrop: public LTemplateInstruction<0, 0, 0> { | 1464 class LDrop: public LTemplateInstruction<0, 0, 0> { |
1588 public: | 1465 public: |
1589 explicit LDrop(int count) : count_(count) { } | 1466 explicit LDrop(int count) : count_(count) { } |
1590 | 1467 |
1591 int count() const { return count_; } | 1468 int count() const { return count_; } |
1592 | 1469 |
(...skipping 16 matching lines...) Expand all Loading... |
1609 DECLARE_CONCRETE_INSTRUCTION(Context, "context") | 1486 DECLARE_CONCRETE_INSTRUCTION(Context, "context") |
1610 }; | 1487 }; |
1611 | 1488 |
1612 | 1489 |
1613 class LOuterContext: public LTemplateInstruction<1, 1, 0> { | 1490 class LOuterContext: public LTemplateInstruction<1, 1, 0> { |
1614 public: | 1491 public: |
1615 explicit LOuterContext(LOperand* context) { | 1492 explicit LOuterContext(LOperand* context) { |
1616 inputs_[0] = context; | 1493 inputs_[0] = context; |
1617 } | 1494 } |
1618 | 1495 |
1619 LOperand* context() { return inputs_[0]; } | 1496 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") |
1620 | 1497 |
1621 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") | 1498 LOperand* context() { return InputAt(0); } |
1622 }; | 1499 }; |
1623 | 1500 |
1624 | 1501 |
1625 class LDeclareGlobals: public LTemplateInstruction<0, 1, 0> { | 1502 class LDeclareGlobals: public LTemplateInstruction<0, 1, 0> { |
1626 public: | 1503 public: |
1627 explicit LDeclareGlobals(LOperand* context) { | 1504 explicit LDeclareGlobals(LOperand* context) { |
1628 inputs_[0] = context; | 1505 inputs_[0] = context; |
1629 } | 1506 } |
1630 | 1507 |
1631 LOperand* context() { return inputs_[0]; } | |
1632 | |
1633 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") | 1508 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") |
1634 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) | 1509 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) |
1635 }; | 1510 }; |
1636 | 1511 |
1637 | 1512 |
1638 class LGlobalObject: public LTemplateInstruction<1, 1, 0> { | 1513 class LGlobalObject: public LTemplateInstruction<1, 1, 0> { |
1639 public: | 1514 public: |
1640 explicit LGlobalObject(LOperand* context) { | 1515 explicit LGlobalObject(LOperand* context) { |
1641 inputs_[0] = context; | 1516 inputs_[0] = context; |
1642 } | 1517 } |
1643 | 1518 |
1644 LOperand* context() { return inputs_[0]; } | 1519 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") |
1645 | 1520 |
1646 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") | 1521 LOperand* context() { return InputAt(0); } |
1647 }; | 1522 }; |
1648 | 1523 |
1649 | 1524 |
1650 class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { | 1525 class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { |
1651 public: | 1526 public: |
1652 explicit LGlobalReceiver(LOperand* global_object) { | 1527 explicit LGlobalReceiver(LOperand* global_object) { |
1653 inputs_[0] = global_object; | 1528 inputs_[0] = global_object; |
1654 } | 1529 } |
1655 | 1530 |
1656 LOperand* global() { return inputs_[0]; } | 1531 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") |
1657 | 1532 |
1658 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") | 1533 LOperand* global() { return InputAt(0); } |
1659 }; | 1534 }; |
1660 | 1535 |
1661 | 1536 |
1662 class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> { | 1537 class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> { |
1663 public: | 1538 public: |
1664 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") | 1539 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") |
1665 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) | 1540 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) |
1666 | 1541 |
1667 virtual void PrintDataTo(StringStream* stream); | 1542 virtual void PrintDataTo(StringStream* stream); |
1668 | 1543 |
1669 Handle<JSFunction> function() { return hydrogen()->function(); } | 1544 Handle<JSFunction> function() { return hydrogen()->function(); } |
1670 int arity() const { return hydrogen()->argument_count() - 1; } | 1545 int arity() const { return hydrogen()->argument_count() - 1; } |
1671 }; | 1546 }; |
1672 | 1547 |
1673 | 1548 |
1674 class LInvokeFunction: public LTemplateInstruction<1, 2, 0> { | 1549 class LInvokeFunction: public LTemplateInstruction<1, 2, 0> { |
1675 public: | 1550 public: |
1676 LInvokeFunction(LOperand* context, LOperand* function) { | 1551 LInvokeFunction(LOperand* context, LOperand* function) { |
1677 inputs_[0] = context; | 1552 inputs_[0] = context; |
1678 inputs_[1] = function; | 1553 inputs_[1] = function; |
1679 } | 1554 } |
1680 | 1555 |
| 1556 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") |
| 1557 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) |
| 1558 |
1681 LOperand* context() { return inputs_[0]; } | 1559 LOperand* context() { return inputs_[0]; } |
1682 LOperand* function() { return inputs_[1]; } | 1560 LOperand* function() { return inputs_[1]; } |
1683 | 1561 |
1684 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") | |
1685 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) | |
1686 | |
1687 virtual void PrintDataTo(StringStream* stream); | 1562 virtual void PrintDataTo(StringStream* stream); |
1688 | 1563 |
1689 int arity() const { return hydrogen()->argument_count() - 1; } | 1564 int arity() const { return hydrogen()->argument_count() - 1; } |
1690 Handle<JSFunction> known_function() { return hydrogen()->known_function(); } | 1565 Handle<JSFunction> known_function() { return hydrogen()->known_function(); } |
1691 }; | 1566 }; |
1692 | 1567 |
1693 | 1568 |
1694 class LCallKeyed: public LTemplateInstruction<1, 2, 0> { | 1569 class LCallKeyed: public LTemplateInstruction<1, 2, 0> { |
1695 public: | 1570 public: |
1696 LCallKeyed(LOperand* context, LOperand* key) { | 1571 LCallKeyed(LOperand* context, LOperand* key) { |
1697 inputs_[0] = context; | 1572 inputs_[0] = context; |
1698 inputs_[1] = key; | 1573 inputs_[1] = key; |
1699 } | 1574 } |
1700 | 1575 |
| 1576 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") |
| 1577 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) |
| 1578 |
1701 LOperand* context() { return inputs_[0]; } | 1579 LOperand* context() { return inputs_[0]; } |
1702 LOperand* key() { return inputs_[1]; } | 1580 LOperand* key() { return inputs_[1]; } |
1703 | 1581 |
1704 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") | |
1705 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) | |
1706 | |
1707 virtual void PrintDataTo(StringStream* stream); | 1582 virtual void PrintDataTo(StringStream* stream); |
1708 | 1583 |
1709 int arity() const { return hydrogen()->argument_count() - 1; } | 1584 int arity() const { return hydrogen()->argument_count() - 1; } |
1710 }; | 1585 }; |
1711 | 1586 |
1712 | 1587 |
1713 class LCallNamed: public LTemplateInstruction<1, 1, 0> { | 1588 class LCallNamed: public LTemplateInstruction<1, 1, 0> { |
1714 public: | 1589 public: |
1715 explicit LCallNamed(LOperand* context) { | 1590 explicit LCallNamed(LOperand* context) { |
1716 inputs_[0] = context; | 1591 inputs_[0] = context; |
1717 } | 1592 } |
1718 | 1593 |
1719 LOperand* context() { return inputs_[0]; } | |
1720 | |
1721 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") | 1594 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") |
1722 DECLARE_HYDROGEN_ACCESSOR(CallNamed) | 1595 DECLARE_HYDROGEN_ACCESSOR(CallNamed) |
1723 | 1596 |
1724 virtual void PrintDataTo(StringStream* stream); | 1597 virtual void PrintDataTo(StringStream* stream); |
1725 | 1598 |
| 1599 LOperand* context() { return inputs_[0]; } |
1726 Handle<String> name() const { return hydrogen()->name(); } | 1600 Handle<String> name() const { return hydrogen()->name(); } |
1727 int arity() const { return hydrogen()->argument_count() - 1; } | 1601 int arity() const { return hydrogen()->argument_count() - 1; } |
1728 }; | 1602 }; |
1729 | 1603 |
1730 | 1604 |
1731 class LCallFunction: public LTemplateInstruction<1, 2, 0> { | 1605 class LCallFunction: public LTemplateInstruction<1, 2, 0> { |
1732 public: | 1606 public: |
1733 explicit LCallFunction(LOperand* context, LOperand* function) { | 1607 explicit LCallFunction(LOperand* context, LOperand* function) { |
1734 inputs_[0] = context; | 1608 inputs_[0] = context; |
1735 inputs_[1] = function; | 1609 inputs_[1] = function; |
1736 } | 1610 } |
1737 | 1611 |
1738 LOperand* context() { return inputs_[0]; } | |
1739 LOperand* function() { return inputs_[1]; } | |
1740 | |
1741 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") | 1612 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") |
1742 DECLARE_HYDROGEN_ACCESSOR(CallFunction) | 1613 DECLARE_HYDROGEN_ACCESSOR(CallFunction) |
1743 | 1614 |
| 1615 LOperand* context() { return inputs_[0]; } |
| 1616 LOperand* function() { return inputs_[1]; } |
1744 int arity() const { return hydrogen()->argument_count() - 1; } | 1617 int arity() const { return hydrogen()->argument_count() - 1; } |
1745 }; | 1618 }; |
1746 | 1619 |
1747 | 1620 |
1748 class LCallGlobal: public LTemplateInstruction<1, 1, 0> { | 1621 class LCallGlobal: public LTemplateInstruction<1, 1, 0> { |
1749 public: | 1622 public: |
1750 explicit LCallGlobal(LOperand* context) { | 1623 explicit LCallGlobal(LOperand* context) { |
1751 inputs_[0] = context; | 1624 inputs_[0] = context; |
1752 } | 1625 } |
1753 | 1626 |
1754 LOperand* context() { return inputs_[0]; } | |
1755 | |
1756 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") | 1627 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") |
1757 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) | 1628 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) |
1758 | 1629 |
1759 virtual void PrintDataTo(StringStream* stream); | 1630 virtual void PrintDataTo(StringStream* stream); |
1760 | 1631 |
| 1632 LOperand* context() { return inputs_[0]; } |
1761 Handle<String> name() const {return hydrogen()->name(); } | 1633 Handle<String> name() const {return hydrogen()->name(); } |
1762 int arity() const { return hydrogen()->argument_count() - 1; } | 1634 int arity() const { return hydrogen()->argument_count() - 1; } |
1763 }; | 1635 }; |
1764 | 1636 |
1765 | 1637 |
1766 class LCallKnownGlobal: public LTemplateInstruction<1, 0, 0> { | 1638 class LCallKnownGlobal: public LTemplateInstruction<1, 0, 0> { |
1767 public: | 1639 public: |
1768 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") | 1640 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") |
1769 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) | 1641 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) |
1770 | 1642 |
1771 virtual void PrintDataTo(StringStream* stream); | 1643 virtual void PrintDataTo(StringStream* stream); |
1772 | 1644 |
1773 Handle<JSFunction> target() const { return hydrogen()->target(); } | 1645 Handle<JSFunction> target() const { return hydrogen()->target(); } |
1774 int arity() const { return hydrogen()->argument_count() - 1; } | 1646 int arity() const { return hydrogen()->argument_count() - 1; } |
1775 }; | 1647 }; |
1776 | 1648 |
1777 | 1649 |
1778 class LCallNew: public LTemplateInstruction<1, 2, 0> { | 1650 class LCallNew: public LTemplateInstruction<1, 2, 0> { |
1779 public: | 1651 public: |
1780 LCallNew(LOperand* context, LOperand* constructor) { | 1652 LCallNew(LOperand* context, LOperand* constructor) { |
1781 inputs_[0] = context; | 1653 inputs_[0] = context; |
1782 inputs_[1] = constructor; | 1654 inputs_[1] = constructor; |
1783 } | 1655 } |
1784 | 1656 |
1785 LOperand* context() { return inputs_[0]; } | |
1786 LOperand* constructor() { return inputs_[1]; } | |
1787 | |
1788 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") | 1657 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") |
1789 DECLARE_HYDROGEN_ACCESSOR(CallNew) | 1658 DECLARE_HYDROGEN_ACCESSOR(CallNew) |
1790 | 1659 |
1791 virtual void PrintDataTo(StringStream* stream); | 1660 virtual void PrintDataTo(StringStream* stream); |
1792 | 1661 |
| 1662 LOperand* context() { return inputs_[0]; } |
| 1663 LOperand* constructor() { return inputs_[1]; } |
1793 int arity() const { return hydrogen()->argument_count() - 1; } | 1664 int arity() const { return hydrogen()->argument_count() - 1; } |
1794 }; | 1665 }; |
1795 | 1666 |
1796 | 1667 |
1797 class LCallRuntime: public LTemplateInstruction<1, 1, 0> { | 1668 class LCallRuntime: public LTemplateInstruction<1, 1, 0> { |
1798 public: | 1669 public: |
1799 explicit LCallRuntime(LOperand* context) { | 1670 explicit LCallRuntime(LOperand* context) { |
1800 inputs_[0] = context; | 1671 inputs_[0] = context; |
1801 } | 1672 } |
1802 | |
1803 LOperand* context() { return inputs_[0]; } | |
1804 | |
1805 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") | 1673 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") |
1806 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) | 1674 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) |
1807 | 1675 |
| 1676 LOperand* context() { return inputs_[0]; } |
1808 const Runtime::Function* function() const { return hydrogen()->function(); } | 1677 const Runtime::Function* function() const { return hydrogen()->function(); } |
1809 int arity() const { return hydrogen()->argument_count(); } | 1678 int arity() const { return hydrogen()->argument_count(); } |
1810 }; | 1679 }; |
1811 | 1680 |
1812 | 1681 |
1813 class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { | 1682 class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { |
1814 public: | 1683 public: |
1815 explicit LInteger32ToDouble(LOperand* value) { | 1684 explicit LInteger32ToDouble(LOperand* value) { |
1816 inputs_[0] = value; | 1685 inputs_[0] = value; |
1817 } | 1686 } |
1818 | 1687 |
1819 LOperand* value() { return inputs_[0]; } | |
1820 | |
1821 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") | 1688 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") |
1822 }; | 1689 }; |
1823 | 1690 |
1824 | 1691 |
1825 class LUint32ToDouble: public LTemplateInstruction<1, 1, 1> { | 1692 class LUint32ToDouble: public LTemplateInstruction<1, 1, 1> { |
1826 public: | 1693 public: |
1827 explicit LUint32ToDouble(LOperand* value, LOperand* temp) { | 1694 explicit LUint32ToDouble(LOperand* value, LOperand* temp) { |
1828 inputs_[0] = value; | 1695 inputs_[0] = value; |
1829 temps_[0] = temp; | 1696 temps_[0] = temp; |
1830 } | 1697 } |
1831 | 1698 |
1832 LOperand* value() { return inputs_[0]; } | |
1833 LOperand* temp() { return temps_[0]; } | |
1834 | |
1835 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double") | 1699 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double") |
1836 }; | 1700 }; |
1837 | 1701 |
1838 | 1702 |
1839 class LNumberTagI: public LTemplateInstruction<1, 1, 0> { | 1703 class LNumberTagI: public LTemplateInstruction<1, 1, 0> { |
1840 public: | 1704 public: |
1841 explicit LNumberTagI(LOperand* value) { | 1705 explicit LNumberTagI(LOperand* value) { |
1842 inputs_[0] = value; | 1706 inputs_[0] = value; |
1843 } | 1707 } |
1844 | 1708 |
1845 LOperand* value() { return inputs_[0]; } | |
1846 | |
1847 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") | 1709 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") |
1848 }; | 1710 }; |
1849 | 1711 |
1850 | 1712 |
1851 class LNumberTagU: public LTemplateInstruction<1, 1, 1> { | 1713 class LNumberTagU: public LTemplateInstruction<1, 1, 1> { |
1852 public: | 1714 public: |
1853 explicit LNumberTagU(LOperand* value, LOperand* temp) { | 1715 explicit LNumberTagU(LOperand* value, LOperand* temp) { |
1854 inputs_[0] = value; | 1716 inputs_[0] = value; |
1855 temps_[0] = temp; | 1717 temps_[0] = temp; |
1856 } | 1718 } |
1857 | 1719 |
1858 LOperand* value() { return inputs_[0]; } | |
1859 | |
1860 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u") | 1720 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u") |
1861 }; | 1721 }; |
1862 | 1722 |
1863 | 1723 |
1864 class LNumberTagD: public LTemplateInstruction<1, 1, 1> { | 1724 class LNumberTagD: public LTemplateInstruction<1, 1, 1> { |
1865 public: | 1725 public: |
1866 LNumberTagD(LOperand* value, LOperand* temp) { | 1726 LNumberTagD(LOperand* value, LOperand* temp) { |
1867 inputs_[0] = value; | 1727 inputs_[0] = value; |
1868 temps_[0] = temp; | 1728 temps_[0] = temp; |
1869 } | 1729 } |
1870 | 1730 |
1871 LOperand* value() { return inputs_[0]; } | |
1872 LOperand* temp() { return temps_[0]; } | |
1873 | |
1874 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") | 1731 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") |
1875 }; | 1732 }; |
1876 | 1733 |
1877 | 1734 |
1878 // Sometimes truncating conversion from a tagged value to an int32. | 1735 // Sometimes truncating conversion from a tagged value to an int32. |
1879 class LDoubleToI: public LTemplateInstruction<1, 1, 1> { | 1736 class LDoubleToI: public LTemplateInstruction<1, 1, 1> { |
1880 public: | 1737 public: |
1881 LDoubleToI(LOperand* value, LOperand* temp) { | 1738 LDoubleToI(LOperand* value, LOperand* temp) { |
1882 inputs_[0] = value; | 1739 inputs_[0] = value; |
1883 temps_[0] = temp; | 1740 temps_[0] = temp; |
1884 } | 1741 } |
1885 | 1742 |
1886 LOperand* value() { return inputs_[0]; } | |
1887 LOperand* temp() { return temps_[0]; } | |
1888 | |
1889 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i") | 1743 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i") |
1890 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) | 1744 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) |
1891 | 1745 |
1892 bool truncating() { return hydrogen()->CanTruncateToInt32(); } | 1746 bool truncating() { return hydrogen()->CanTruncateToInt32(); } |
1893 }; | 1747 }; |
1894 | 1748 |
1895 | 1749 |
1896 // Truncating conversion from a tagged value to an int32. | 1750 // Truncating conversion from a tagged value to an int32. |
1897 class LTaggedToI: public LTemplateInstruction<1, 1, 1> { | 1751 class LTaggedToI: public LTemplateInstruction<1, 1, 1> { |
1898 public: | 1752 public: |
1899 LTaggedToI(LOperand* value, LOperand* temp) { | 1753 LTaggedToI(LOperand* value, LOperand* temp) { |
1900 inputs_[0] = value; | 1754 inputs_[0] = value; |
1901 temps_[0] = temp; | 1755 temps_[0] = temp; |
1902 } | 1756 } |
1903 | 1757 |
1904 LOperand* value() { return inputs_[0]; } | |
1905 LOperand* temp() { return temps_[0]; } | |
1906 | |
1907 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") | 1758 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") |
1908 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) | 1759 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) |
1909 | 1760 |
1910 bool truncating() { return hydrogen()->CanTruncateToInt32(); } | 1761 bool truncating() { return hydrogen()->CanTruncateToInt32(); } |
1911 }; | 1762 }; |
1912 | 1763 |
1913 | 1764 |
1914 class LSmiTag: public LTemplateInstruction<1, 1, 0> { | 1765 class LSmiTag: public LTemplateInstruction<1, 1, 0> { |
1915 public: | 1766 public: |
1916 explicit LSmiTag(LOperand* value) { | 1767 explicit LSmiTag(LOperand* value) { |
1917 inputs_[0] = value; | 1768 inputs_[0] = value; |
1918 } | 1769 } |
1919 | 1770 |
1920 LOperand* value() { return inputs_[0]; } | |
1921 | |
1922 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") | 1771 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") |
1923 }; | 1772 }; |
1924 | 1773 |
1925 | 1774 |
1926 class LNumberUntagD: public LTemplateInstruction<1, 1, 1> { | 1775 class LNumberUntagD: public LTemplateInstruction<1, 1, 1> { |
1927 public: | 1776 public: |
1928 explicit LNumberUntagD(LOperand* value, LOperand* temp) { | 1777 explicit LNumberUntagD(LOperand* value, LOperand* temp) { |
1929 inputs_[0] = value; | 1778 inputs_[0] = value; |
1930 temps_[0] = temp; | 1779 temps_[0] = temp; |
1931 } | 1780 } |
1932 | 1781 |
1933 LOperand* value() { return inputs_[0]; } | |
1934 LOperand* temp() { return temps_[0]; } | |
1935 | |
1936 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") | 1782 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") |
1937 DECLARE_HYDROGEN_ACCESSOR(Change); | 1783 DECLARE_HYDROGEN_ACCESSOR(Change); |
1938 }; | 1784 }; |
1939 | 1785 |
1940 | 1786 |
1941 class LSmiUntag: public LTemplateInstruction<1, 1, 0> { | 1787 class LSmiUntag: public LTemplateInstruction<1, 1, 0> { |
1942 public: | 1788 public: |
1943 LSmiUntag(LOperand* value, bool needs_check) | 1789 LSmiUntag(LOperand* value, bool needs_check) |
1944 : needs_check_(needs_check) { | 1790 : needs_check_(needs_check) { |
1945 inputs_[0] = value; | 1791 inputs_[0] = value; |
1946 } | 1792 } |
1947 | 1793 |
1948 LOperand* value() { return inputs_[0]; } | |
1949 | |
1950 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") | 1794 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") |
1951 | 1795 |
1952 bool needs_check() const { return needs_check_; } | 1796 bool needs_check() const { return needs_check_; } |
1953 | 1797 |
1954 private: | 1798 private: |
1955 bool needs_check_; | 1799 bool needs_check_; |
1956 }; | 1800 }; |
1957 | 1801 |
1958 | 1802 |
1959 class LStoreNamedField: public LTemplateInstruction<0, 2, 2> { | 1803 class LStoreNamedField: public LTemplateInstruction<0, 2, 2> { |
1960 public: | 1804 public: |
1961 LStoreNamedField(LOperand* obj, | 1805 LStoreNamedField(LOperand* obj, |
1962 LOperand* val, | 1806 LOperand* val, |
1963 LOperand* temp, | 1807 LOperand* temp, |
1964 LOperand* temp_map) { | 1808 LOperand* temp_map) { |
1965 inputs_[0] = obj; | 1809 inputs_[0] = obj; |
1966 inputs_[1] = val; | 1810 inputs_[1] = val; |
1967 temps_[0] = temp; | 1811 temps_[0] = temp; |
1968 temps_[1] = temp_map; | 1812 temps_[1] = temp_map; |
1969 } | 1813 } |
1970 | 1814 |
1971 LOperand* object() { return inputs_[0]; } | |
1972 LOperand* value() { return inputs_[1]; } | |
1973 LOperand* temp() { return temps_[0]; } | |
1974 LOperand* temp_map() { return temps_[1]; } | |
1975 | |
1976 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") | 1815 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") |
1977 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) | 1816 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) |
1978 | 1817 |
1979 virtual void PrintDataTo(StringStream* stream); | 1818 virtual void PrintDataTo(StringStream* stream); |
1980 | 1819 |
| 1820 LOperand* object() { return inputs_[0]; } |
| 1821 LOperand* value() { return inputs_[1]; } |
| 1822 |
1981 Handle<Object> name() const { return hydrogen()->name(); } | 1823 Handle<Object> name() const { return hydrogen()->name(); } |
1982 bool is_in_object() { return hydrogen()->is_in_object(); } | 1824 bool is_in_object() { return hydrogen()->is_in_object(); } |
1983 int offset() { return hydrogen()->offset(); } | 1825 int offset() { return hydrogen()->offset(); } |
1984 Handle<Map> transition() const { return hydrogen()->transition(); } | 1826 Handle<Map> transition() const { return hydrogen()->transition(); } |
1985 }; | 1827 }; |
1986 | 1828 |
1987 | 1829 |
1988 class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> { | 1830 class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> { |
1989 public: | 1831 public: |
1990 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { | 1832 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { |
1991 inputs_[0] = context; | 1833 inputs_[0] = context; |
1992 inputs_[1] = object; | 1834 inputs_[1] = object; |
1993 inputs_[2] = value; | 1835 inputs_[2] = value; |
1994 } | 1836 } |
1995 | 1837 |
1996 LOperand* context() { return inputs_[0]; } | |
1997 LOperand* object() { return inputs_[1]; } | |
1998 LOperand* value() { return inputs_[2]; } | |
1999 | |
2000 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 1838 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |
2001 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 1839 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |
2002 | 1840 |
2003 virtual void PrintDataTo(StringStream* stream); | 1841 virtual void PrintDataTo(StringStream* stream); |
| 1842 |
| 1843 LOperand* context() { return inputs_[0]; } |
| 1844 LOperand* object() { return inputs_[1]; } |
| 1845 LOperand* value() { return inputs_[2]; } |
2004 Handle<Object> name() const { return hydrogen()->name(); } | 1846 Handle<Object> name() const { return hydrogen()->name(); } |
2005 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 1847 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
2006 }; | 1848 }; |
2007 | 1849 |
2008 | 1850 |
2009 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> { | 1851 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> { |
2010 public: | 1852 public: |
2011 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) { | 1853 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) { |
2012 inputs_[0] = obj; | 1854 inputs_[0] = obj; |
2013 inputs_[1] = key; | 1855 inputs_[1] = key; |
2014 inputs_[2] = val; | 1856 inputs_[2] = val; |
2015 } | 1857 } |
2016 | 1858 |
2017 LOperand* object() { return inputs_[0]; } | |
2018 LOperand* key() { return inputs_[1]; } | |
2019 LOperand* value() { return inputs_[2]; } | |
2020 | |
2021 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, | 1859 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, |
2022 "store-keyed-fast-element") | 1860 "store-keyed-fast-element") |
2023 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) | 1861 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) |
2024 | 1862 |
2025 virtual void PrintDataTo(StringStream* stream); | 1863 virtual void PrintDataTo(StringStream* stream); |
| 1864 |
| 1865 LOperand* object() { return inputs_[0]; } |
| 1866 LOperand* key() { return inputs_[1]; } |
| 1867 LOperand* value() { return inputs_[2]; } |
2026 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 1868 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
2027 }; | 1869 }; |
2028 | 1870 |
2029 | 1871 |
2030 class LStoreKeyedFastDoubleElement: public LTemplateInstruction<0, 3, 0> { | 1872 class LStoreKeyedFastDoubleElement: public LTemplateInstruction<0, 3, 0> { |
2031 public: | 1873 public: |
2032 LStoreKeyedFastDoubleElement(LOperand* elements, | 1874 LStoreKeyedFastDoubleElement(LOperand* elements, |
2033 LOperand* key, | 1875 LOperand* key, |
2034 LOperand* val) { | 1876 LOperand* val) { |
2035 inputs_[0] = elements; | 1877 inputs_[0] = elements; |
2036 inputs_[1] = key; | 1878 inputs_[1] = key; |
2037 inputs_[2] = val; | 1879 inputs_[2] = val; |
2038 } | 1880 } |
2039 | 1881 |
2040 LOperand* elements() { return inputs_[0]; } | |
2041 LOperand* key() { return inputs_[1]; } | |
2042 LOperand* value() { return inputs_[2]; } | |
2043 | |
2044 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement, | 1882 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement, |
2045 "store-keyed-fast-double-element") | 1883 "store-keyed-fast-double-element") |
2046 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastDoubleElement) | 1884 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastDoubleElement) |
2047 | 1885 |
2048 virtual void PrintDataTo(StringStream* stream); | 1886 virtual void PrintDataTo(StringStream* stream); |
2049 | 1887 |
| 1888 LOperand* elements() { return inputs_[0]; } |
| 1889 LOperand* key() { return inputs_[1]; } |
| 1890 LOperand* value() { return inputs_[2]; } |
2050 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 1891 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
2051 | 1892 |
2052 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } | 1893 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } |
2053 }; | 1894 }; |
2054 | 1895 |
2055 | 1896 |
2056 class LStoreKeyedSpecializedArrayElement: public LTemplateInstruction<0, 3, 0> { | 1897 class LStoreKeyedSpecializedArrayElement: public LTemplateInstruction<0, 3, 0> { |
2057 public: | 1898 public: |
2058 LStoreKeyedSpecializedArrayElement(LOperand* external_pointer, | 1899 LStoreKeyedSpecializedArrayElement(LOperand* external_pointer, |
2059 LOperand* key, | 1900 LOperand* key, |
2060 LOperand* val) { | 1901 LOperand* val) { |
2061 inputs_[0] = external_pointer; | 1902 inputs_[0] = external_pointer; |
2062 inputs_[1] = key; | 1903 inputs_[1] = key; |
2063 inputs_[2] = val; | 1904 inputs_[2] = val; |
2064 } | 1905 } |
2065 | 1906 |
2066 LOperand* external_pointer() { return inputs_[0]; } | |
2067 LOperand* key() { return inputs_[1]; } | |
2068 LOperand* value() { return inputs_[2]; } | |
2069 | |
2070 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement, | 1907 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement, |
2071 "store-keyed-specialized-array-element") | 1908 "store-keyed-specialized-array-element") |
2072 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement) | 1909 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement) |
2073 | 1910 |
| 1911 LOperand* external_pointer() { return inputs_[0]; } |
| 1912 LOperand* key() { return inputs_[1]; } |
| 1913 LOperand* value() { return inputs_[2]; } |
2074 ElementsKind elements_kind() const { | 1914 ElementsKind elements_kind() const { |
2075 return hydrogen()->elements_kind(); | 1915 return hydrogen()->elements_kind(); |
2076 } | 1916 } |
2077 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 1917 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
2078 }; | 1918 }; |
2079 | 1919 |
2080 | 1920 |
2081 class LStoreKeyedGeneric: public LTemplateInstruction<0, 4, 0> { | 1921 class LStoreKeyedGeneric: public LTemplateInstruction<0, 4, 0> { |
2082 public: | 1922 public: |
2083 LStoreKeyedGeneric(LOperand* context, | 1923 LStoreKeyedGeneric(LOperand* context, |
2084 LOperand* object, | 1924 LOperand* object, |
2085 LOperand* key, | 1925 LOperand* key, |
2086 LOperand* value) { | 1926 LOperand* value) { |
2087 inputs_[0] = context; | 1927 inputs_[0] = context; |
2088 inputs_[1] = object; | 1928 inputs_[1] = object; |
2089 inputs_[2] = key; | 1929 inputs_[2] = key; |
2090 inputs_[3] = value; | 1930 inputs_[3] = value; |
2091 } | 1931 } |
2092 | 1932 |
2093 LOperand* context() { return inputs_[0]; } | |
2094 LOperand* object() { return inputs_[1]; } | |
2095 LOperand* key() { return inputs_[2]; } | |
2096 LOperand* value() { return inputs_[3]; } | |
2097 | |
2098 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") | 1933 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") |
2099 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) | 1934 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) |
2100 | 1935 |
2101 virtual void PrintDataTo(StringStream* stream); | 1936 virtual void PrintDataTo(StringStream* stream); |
2102 | 1937 |
| 1938 LOperand* context() { return inputs_[0]; } |
| 1939 LOperand* object() { return inputs_[1]; } |
| 1940 LOperand* key() { return inputs_[2]; } |
| 1941 LOperand* value() { return inputs_[3]; } |
2103 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 1942 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
2104 }; | 1943 }; |
2105 | 1944 |
2106 | 1945 |
2107 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> { | 1946 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> { |
2108 public: | 1947 public: |
2109 LTransitionElementsKind(LOperand* object, | 1948 LTransitionElementsKind(LOperand* object, |
2110 LOperand* new_map_temp, | 1949 LOperand* new_map_temp, |
2111 LOperand* temp) { | 1950 LOperand* temp_reg) { |
2112 inputs_[0] = object; | 1951 inputs_[0] = object; |
2113 temps_[0] = new_map_temp; | 1952 temps_[0] = new_map_temp; |
2114 temps_[1] = temp; | 1953 temps_[1] = temp_reg; |
2115 } | 1954 } |
2116 | 1955 |
2117 LOperand* object() { return inputs_[0]; } | |
2118 LOperand* new_map_temp() { return temps_[0]; } | |
2119 LOperand* temp() { return temps_[1]; } | |
2120 | |
2121 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, | 1956 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, |
2122 "transition-elements-kind") | 1957 "transition-elements-kind") |
2123 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) | 1958 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) |
2124 | 1959 |
2125 virtual void PrintDataTo(StringStream* stream); | 1960 virtual void PrintDataTo(StringStream* stream); |
2126 | 1961 |
| 1962 LOperand* object() { return inputs_[0]; } |
| 1963 LOperand* new_map_reg() { return temps_[0]; } |
| 1964 LOperand* temp_reg() { return temps_[1]; } |
2127 Handle<Map> original_map() { return hydrogen()->original_map(); } | 1965 Handle<Map> original_map() { return hydrogen()->original_map(); } |
2128 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); } | 1966 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); } |
2129 }; | 1967 }; |
2130 | 1968 |
2131 | 1969 |
2132 class LStringAdd: public LTemplateInstruction<1, 3, 0> { | 1970 class LStringAdd: public LTemplateInstruction<1, 3, 0> { |
2133 public: | 1971 public: |
2134 LStringAdd(LOperand* context, LOperand* left, LOperand* right) { | 1972 LStringAdd(LOperand* context, LOperand* left, LOperand* right) { |
2135 inputs_[0] = context; | 1973 inputs_[0] = context; |
2136 inputs_[1] = left; | 1974 inputs_[1] = left; |
2137 inputs_[2] = right; | 1975 inputs_[2] = right; |
2138 } | 1976 } |
2139 | 1977 |
| 1978 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") |
| 1979 DECLARE_HYDROGEN_ACCESSOR(StringAdd) |
| 1980 |
2140 LOperand* context() { return inputs_[0]; } | 1981 LOperand* context() { return inputs_[0]; } |
2141 LOperand* left() { return inputs_[1]; } | 1982 LOperand* left() { return inputs_[1]; } |
2142 LOperand* right() { return inputs_[2]; } | 1983 LOperand* right() { return inputs_[2]; } |
2143 | |
2144 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") | |
2145 DECLARE_HYDROGEN_ACCESSOR(StringAdd) | |
2146 }; | 1984 }; |
2147 | 1985 |
2148 | 1986 |
2149 class LStringCharCodeAt: public LTemplateInstruction<1, 3, 0> { | 1987 class LStringCharCodeAt: public LTemplateInstruction<1, 3, 0> { |
2150 public: | 1988 public: |
2151 LStringCharCodeAt(LOperand* context, LOperand* string, LOperand* index) { | 1989 LStringCharCodeAt(LOperand* context, LOperand* string, LOperand* index) { |
2152 inputs_[0] = context; | 1990 inputs_[0] = context; |
2153 inputs_[1] = string; | 1991 inputs_[1] = string; |
2154 inputs_[2] = index; | 1992 inputs_[2] = index; |
2155 } | 1993 } |
2156 | 1994 |
| 1995 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") |
| 1996 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) |
| 1997 |
2157 LOperand* context() { return inputs_[0]; } | 1998 LOperand* context() { return inputs_[0]; } |
2158 LOperand* string() { return inputs_[1]; } | 1999 LOperand* string() { return inputs_[1]; } |
2159 LOperand* index() { return inputs_[2]; } | 2000 LOperand* index() { return inputs_[2]; } |
2160 | |
2161 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") | |
2162 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) | |
2163 }; | 2001 }; |
2164 | 2002 |
2165 | 2003 |
2166 class LStringCharFromCode: public LTemplateInstruction<1, 2, 0> { | 2004 class LStringCharFromCode: public LTemplateInstruction<1, 2, 0> { |
2167 public: | 2005 public: |
2168 LStringCharFromCode(LOperand* context, LOperand* char_code) { | 2006 LStringCharFromCode(LOperand* context, LOperand* char_code) { |
2169 inputs_[0] = context; | 2007 inputs_[0] = context; |
2170 inputs_[1] = char_code; | 2008 inputs_[1] = char_code; |
2171 } | 2009 } |
2172 | 2010 |
| 2011 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") |
| 2012 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) |
| 2013 |
2173 LOperand* context() { return inputs_[0]; } | 2014 LOperand* context() { return inputs_[0]; } |
2174 LOperand* char_code() { return inputs_[1]; } | 2015 LOperand* char_code() { return inputs_[1]; } |
2175 | |
2176 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") | |
2177 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) | |
2178 }; | 2016 }; |
2179 | 2017 |
2180 | 2018 |
2181 class LStringLength: public LTemplateInstruction<1, 1, 0> { | 2019 class LStringLength: public LTemplateInstruction<1, 1, 0> { |
2182 public: | 2020 public: |
2183 explicit LStringLength(LOperand* string) { | 2021 explicit LStringLength(LOperand* string) { |
2184 inputs_[0] = string; | 2022 inputs_[0] = string; |
2185 } | 2023 } |
2186 | 2024 |
2187 LOperand* string() { return inputs_[0]; } | |
2188 | |
2189 DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length") | 2025 DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length") |
2190 DECLARE_HYDROGEN_ACCESSOR(StringLength) | 2026 DECLARE_HYDROGEN_ACCESSOR(StringLength) |
| 2027 |
| 2028 LOperand* string() { return inputs_[0]; } |
2191 }; | 2029 }; |
2192 | 2030 |
2193 | 2031 |
2194 class LCheckFunction: public LTemplateInstruction<0, 1, 0> { | 2032 class LCheckFunction: public LTemplateInstruction<0, 1, 0> { |
2195 public: | 2033 public: |
2196 explicit LCheckFunction(LOperand* value) { | 2034 explicit LCheckFunction(LOperand* value) { |
2197 inputs_[0] = value; | 2035 inputs_[0] = value; |
2198 } | 2036 } |
2199 | 2037 |
2200 LOperand* value() { return inputs_[0]; } | 2038 LOperand* value() { return inputs_[0]; } |
2201 | 2039 |
2202 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function") | 2040 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function") |
2203 DECLARE_HYDROGEN_ACCESSOR(CheckFunction) | 2041 DECLARE_HYDROGEN_ACCESSOR(CheckFunction) |
2204 }; | 2042 }; |
2205 | 2043 |
2206 | 2044 |
2207 class LCheckInstanceType: public LTemplateInstruction<0, 1, 1> { | 2045 class LCheckInstanceType: public LTemplateInstruction<0, 1, 1> { |
2208 public: | 2046 public: |
2209 LCheckInstanceType(LOperand* value, LOperand* temp) { | 2047 LCheckInstanceType(LOperand* value, LOperand* temp) { |
2210 inputs_[0] = value; | 2048 inputs_[0] = value; |
2211 temps_[0] = temp; | 2049 temps_[0] = temp; |
2212 } | 2050 } |
2213 | 2051 |
2214 LOperand* value() { return inputs_[0]; } | |
2215 LOperand* temp() { return temps_[0]; } | |
2216 | |
2217 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type") | 2052 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type") |
2218 DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType) | 2053 DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType) |
2219 }; | 2054 }; |
2220 | 2055 |
2221 | 2056 |
2222 class LCheckMaps: public LTemplateInstruction<0, 1, 0> { | 2057 class LCheckMaps: public LTemplateInstruction<0, 1, 0> { |
2223 public: | 2058 public: |
2224 explicit LCheckMaps(LOperand* value) { | 2059 explicit LCheckMaps(LOperand* value) { |
2225 inputs_[0] = value; | 2060 inputs_[0] = value; |
2226 } | 2061 } |
2227 | 2062 |
2228 LOperand* value() { return inputs_[0]; } | |
2229 | |
2230 DECLARE_CONCRETE_INSTRUCTION(CheckMaps, "check-maps") | 2063 DECLARE_CONCRETE_INSTRUCTION(CheckMaps, "check-maps") |
2231 DECLARE_HYDROGEN_ACCESSOR(CheckMaps) | 2064 DECLARE_HYDROGEN_ACCESSOR(CheckMaps) |
2232 }; | 2065 }; |
2233 | 2066 |
2234 | 2067 |
2235 class LCheckPrototypeMaps: public LTemplateInstruction<0, 0, 1> { | 2068 class LCheckPrototypeMaps: public LTemplateInstruction<0, 0, 1> { |
2236 public: | 2069 public: |
2237 explicit LCheckPrototypeMaps(LOperand* temp) { | 2070 explicit LCheckPrototypeMaps(LOperand* temp) { |
2238 temps_[0] = temp; | 2071 temps_[0] = temp; |
2239 } | 2072 } |
2240 | 2073 |
2241 LOperand* temp() { return temps_[0]; } | |
2242 | |
2243 DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps") | 2074 DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps") |
2244 DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps) | 2075 DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps) |
2245 | 2076 |
2246 Handle<JSObject> prototype() const { return hydrogen()->prototype(); } | 2077 Handle<JSObject> prototype() const { return hydrogen()->prototype(); } |
2247 Handle<JSObject> holder() const { return hydrogen()->holder(); } | 2078 Handle<JSObject> holder() const { return hydrogen()->holder(); } |
2248 }; | 2079 }; |
2249 | 2080 |
2250 | 2081 |
2251 class LCheckSmi: public LTemplateInstruction<0, 1, 0> { | 2082 class LCheckSmi: public LTemplateInstruction<0, 1, 0> { |
2252 public: | 2083 public: |
2253 explicit LCheckSmi(LOperand* value) { | 2084 explicit LCheckSmi(LOperand* value) { |
2254 inputs_[0] = value; | 2085 inputs_[0] = value; |
2255 } | 2086 } |
2256 | 2087 |
2257 LOperand* value() { return inputs_[0]; } | |
2258 | |
2259 DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi") | 2088 DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi") |
2260 }; | 2089 }; |
2261 | 2090 |
2262 | 2091 |
2263 class LClampDToUint8: public LTemplateInstruction<1, 1, 0> { | 2092 class LClampDToUint8: public LTemplateInstruction<1, 1, 0> { |
2264 public: | 2093 public: |
2265 explicit LClampDToUint8(LOperand* value) { | 2094 explicit LClampDToUint8(LOperand* value) { |
2266 inputs_[0] = value; | 2095 inputs_[0] = value; |
2267 } | 2096 } |
2268 | 2097 |
(...skipping 27 matching lines...) Expand all Loading... |
2296 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") | 2125 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") |
2297 }; | 2126 }; |
2298 | 2127 |
2299 | 2128 |
2300 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { | 2129 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { |
2301 public: | 2130 public: |
2302 explicit LCheckNonSmi(LOperand* value) { | 2131 explicit LCheckNonSmi(LOperand* value) { |
2303 inputs_[0] = value; | 2132 inputs_[0] = value; |
2304 } | 2133 } |
2305 | 2134 |
2306 LOperand* value() { return inputs_[0]; } | |
2307 | |
2308 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") | 2135 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") |
2309 }; | 2136 }; |
2310 | 2137 |
2311 | 2138 |
2312 class LAllocateObject: public LTemplateInstruction<1, 1, 1> { | 2139 class LAllocateObject: public LTemplateInstruction<1, 1, 1> { |
2313 public: | 2140 public: |
2314 LAllocateObject(LOperand* context, LOperand* temp) { | 2141 LAllocateObject(LOperand* context, LOperand* temp) { |
2315 inputs_[0] = context; | 2142 inputs_[0] = context; |
2316 temps_[0] = temp; | 2143 temps_[0] = temp; |
2317 } | 2144 } |
2318 | 2145 |
2319 LOperand* context() { return inputs_[0]; } | |
2320 LOperand* temp() { return temps_[0]; } | |
2321 | |
2322 DECLARE_CONCRETE_INSTRUCTION(AllocateObject, "allocate-object") | 2146 DECLARE_CONCRETE_INSTRUCTION(AllocateObject, "allocate-object") |
2323 DECLARE_HYDROGEN_ACCESSOR(AllocateObject) | 2147 DECLARE_HYDROGEN_ACCESSOR(AllocateObject) |
| 2148 |
| 2149 LOperand* context() { return inputs_[0]; } |
2324 }; | 2150 }; |
2325 | 2151 |
2326 | 2152 |
2327 class LFastLiteral: public LTemplateInstruction<1, 1, 0> { | 2153 class LFastLiteral: public LTemplateInstruction<1, 1, 0> { |
2328 public: | 2154 public: |
2329 explicit LFastLiteral(LOperand* context) { | 2155 explicit LFastLiteral(LOperand* context) { |
2330 inputs_[0] = context; | 2156 inputs_[0] = context; |
2331 } | 2157 } |
2332 | 2158 |
2333 LOperand* context() { return inputs_[0]; } | 2159 LOperand* context() { return inputs_[0]; } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2390 Handle<SharedFunctionInfo> shared_info() { return hydrogen()->shared_info(); } | 2216 Handle<SharedFunctionInfo> shared_info() { return hydrogen()->shared_info(); } |
2391 }; | 2217 }; |
2392 | 2218 |
2393 | 2219 |
2394 class LToFastProperties: public LTemplateInstruction<1, 1, 0> { | 2220 class LToFastProperties: public LTemplateInstruction<1, 1, 0> { |
2395 public: | 2221 public: |
2396 explicit LToFastProperties(LOperand* value) { | 2222 explicit LToFastProperties(LOperand* value) { |
2397 inputs_[0] = value; | 2223 inputs_[0] = value; |
2398 } | 2224 } |
2399 | 2225 |
2400 LOperand* value() { return inputs_[0]; } | |
2401 | |
2402 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") | 2226 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") |
2403 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) | 2227 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) |
2404 }; | 2228 }; |
2405 | 2229 |
2406 | 2230 |
2407 class LTypeof: public LTemplateInstruction<1, 2, 0> { | 2231 class LTypeof: public LTemplateInstruction<1, 2, 0> { |
2408 public: | 2232 public: |
2409 LTypeof(LOperand* context, LOperand* value) { | 2233 LTypeof(LOperand* context, LOperand* value) { |
2410 inputs_[0] = context; | 2234 inputs_[0] = context; |
2411 inputs_[1] = value; | 2235 inputs_[1] = value; |
2412 } | 2236 } |
2413 | 2237 |
2414 LOperand* context() { return inputs_[0]; } | |
2415 LOperand* value() { return inputs_[1]; } | |
2416 | |
2417 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") | 2238 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") |
2418 }; | 2239 }; |
2419 | 2240 |
2420 | 2241 |
2421 class LTypeofIsAndBranch: public LControlInstruction<1, 0> { | 2242 class LTypeofIsAndBranch: public LControlInstruction<1, 0> { |
2422 public: | 2243 public: |
2423 explicit LTypeofIsAndBranch(LOperand* value) { | 2244 explicit LTypeofIsAndBranch(LOperand* value) { |
2424 inputs_[0] = value; | 2245 inputs_[0] = value; |
2425 } | 2246 } |
2426 | 2247 |
2427 LOperand* value() { return inputs_[0]; } | |
2428 | |
2429 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") | 2248 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") |
2430 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch) | 2249 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch) |
2431 | 2250 |
2432 Handle<String> type_literal() { return hydrogen()->type_literal(); } | 2251 Handle<String> type_literal() { return hydrogen()->type_literal(); } |
2433 | 2252 |
2434 virtual void PrintDataTo(StringStream* stream); | 2253 virtual void PrintDataTo(StringStream* stream); |
2435 }; | 2254 }; |
2436 | 2255 |
2437 | 2256 |
2438 class LDeleteProperty: public LTemplateInstruction<1, 3, 0> { | 2257 class LDeleteProperty: public LTemplateInstruction<1, 3, 0> { |
2439 public: | 2258 public: |
2440 LDeleteProperty(LOperand* context, LOperand* obj, LOperand* key) { | 2259 LDeleteProperty(LOperand* context, LOperand* obj, LOperand* key) { |
2441 inputs_[0] = context; | 2260 inputs_[0] = context; |
2442 inputs_[1] = obj; | 2261 inputs_[1] = obj; |
2443 inputs_[2] = key; | 2262 inputs_[2] = key; |
2444 } | 2263 } |
2445 | 2264 |
| 2265 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property") |
| 2266 |
2446 LOperand* context() { return inputs_[0]; } | 2267 LOperand* context() { return inputs_[0]; } |
2447 LOperand* object() { return inputs_[1]; } | 2268 LOperand* object() { return inputs_[1]; } |
2448 LOperand* key() { return inputs_[2]; } | 2269 LOperand* key() { return inputs_[2]; } |
2449 | |
2450 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property") | |
2451 }; | 2270 }; |
2452 | 2271 |
2453 | 2272 |
2454 class LOsrEntry: public LTemplateInstruction<0, 0, 0> { | 2273 class LOsrEntry: public LTemplateInstruction<0, 0, 0> { |
2455 public: | 2274 public: |
2456 LOsrEntry(); | 2275 LOsrEntry(); |
2457 | 2276 |
2458 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") | 2277 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") |
2459 | 2278 |
2460 LOperand** SpilledRegisterArray() { return register_spills_; } | 2279 LOperand** SpilledRegisterArray() { return register_spills_; } |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2739 | 2558 |
2740 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2559 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2741 }; | 2560 }; |
2742 | 2561 |
2743 #undef DECLARE_HYDROGEN_ACCESSOR | 2562 #undef DECLARE_HYDROGEN_ACCESSOR |
2744 #undef DECLARE_CONCRETE_INSTRUCTION | 2563 #undef DECLARE_CONCRETE_INSTRUCTION |
2745 | 2564 |
2746 } } // namespace v8::internal | 2565 } } // namespace v8::internal |
2747 | 2566 |
2748 #endif // V8_IA32_LITHIUM_IA32_H_ | 2567 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |