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

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

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

Powered by Google App Engine
This is Rietveld 408576698