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

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

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

Powered by Google App Engine
This is Rietveld 408576698