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

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

Powered by Google App Engine
This is Rietveld 408576698