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

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

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