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

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

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

Powered by Google App Engine
This is Rietveld 408576698