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