| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_ARM64_LITHIUM_ARM64_H_ | 5 #ifndef V8_ARM64_LITHIUM_ARM64_H_ |
| 6 #define V8_ARM64_LITHIUM_ARM64_H_ | 6 #define V8_ARM64_LITHIUM_ARM64_H_ |
| 7 | 7 |
| 8 #include "src/hydrogen.h" | 8 #include "src/hydrogen.h" |
| 9 #include "src/lithium.h" | 9 #include "src/lithium.h" |
| 10 #include "src/lithium-allocator.h" | 10 #include "src/lithium-allocator.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 V(TrapAllocationMemento) \ | 170 V(TrapAllocationMemento) \ |
| 171 V(TruncateDoubleToIntOrSmi) \ | 171 V(TruncateDoubleToIntOrSmi) \ |
| 172 V(Typeof) \ | 172 V(Typeof) \ |
| 173 V(TypeofIsAndBranch) \ | 173 V(TypeofIsAndBranch) \ |
| 174 V(Uint32ToDouble) \ | 174 V(Uint32ToDouble) \ |
| 175 V(UnknownOSRValue) \ | 175 V(UnknownOSRValue) \ |
| 176 V(WrapReceiver) | 176 V(WrapReceiver) |
| 177 | 177 |
| 178 | 178 |
| 179 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 179 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
| 180 Opcode opcode() const FINAL { return LInstruction::k##type; } \ | 180 Opcode opcode() const final { return LInstruction::k##type; } \ |
| 181 void CompileToNative(LCodeGen* generator) FINAL; \ | 181 void CompileToNative(LCodeGen* generator) final; \ |
| 182 const char* Mnemonic() const FINAL { return mnemonic; } \ | 182 const char* Mnemonic() const final { return mnemonic; } \ |
| 183 static L##type* cast(LInstruction* instr) { \ | 183 static L##type* cast(LInstruction* instr) { \ |
| 184 DCHECK(instr->Is##type()); \ | 184 DCHECK(instr->Is##type()); \ |
| 185 return reinterpret_cast<L##type*>(instr); \ | 185 return reinterpret_cast<L##type*>(instr); \ |
| 186 } | 186 } |
| 187 | 187 |
| 188 | 188 |
| 189 #define DECLARE_HYDROGEN_ACCESSOR(type) \ | 189 #define DECLARE_HYDROGEN_ACCESSOR(type) \ |
| 190 H##type* hydrogen() const { \ | 190 H##type* hydrogen() const { \ |
| 191 return H##type::cast(this->hydrogen_value()); \ | 191 return H##type::cast(this->hydrogen_value()); \ |
| 192 } | 192 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 int32_t bit_field_; | 282 int32_t bit_field_; |
| 283 }; | 283 }; |
| 284 | 284 |
| 285 | 285 |
| 286 // R = number of result operands (0 or 1). | 286 // R = number of result operands (0 or 1). |
| 287 template<int R> | 287 template<int R> |
| 288 class LTemplateResultInstruction : public LInstruction { | 288 class LTemplateResultInstruction : public LInstruction { |
| 289 public: | 289 public: |
| 290 // Allow 0 or 1 output operands. | 290 // Allow 0 or 1 output operands. |
| 291 STATIC_ASSERT(R == 0 || R == 1); | 291 STATIC_ASSERT(R == 0 || R == 1); |
| 292 bool HasResult() const FINAL { return (R != 0) && (result() != NULL); } | 292 bool HasResult() const final { return (R != 0) && (result() != NULL); } |
| 293 void set_result(LOperand* operand) { results_[0] = operand; } | 293 void set_result(LOperand* operand) { results_[0] = operand; } |
| 294 LOperand* result() const OVERRIDE { return results_[0]; } | 294 LOperand* result() const override { return results_[0]; } |
| 295 | 295 |
| 296 protected: | 296 protected: |
| 297 EmbeddedContainer<LOperand*, R> results_; | 297 EmbeddedContainer<LOperand*, R> results_; |
| 298 }; | 298 }; |
| 299 | 299 |
| 300 | 300 |
| 301 // R = number of result operands (0 or 1). | 301 // R = number of result operands (0 or 1). |
| 302 // I = number of input operands. | 302 // I = number of input operands. |
| 303 // T = number of temporary operands. | 303 // T = number of temporary operands. |
| 304 template<int R, int I, int T> | 304 template<int R, int I, int T> |
| 305 class LTemplateInstruction : public LTemplateResultInstruction<R> { | 305 class LTemplateInstruction : public LTemplateResultInstruction<R> { |
| 306 protected: | 306 protected: |
| 307 EmbeddedContainer<LOperand*, I> inputs_; | 307 EmbeddedContainer<LOperand*, I> inputs_; |
| 308 EmbeddedContainer<LOperand*, T> temps_; | 308 EmbeddedContainer<LOperand*, T> temps_; |
| 309 | 309 |
| 310 private: | 310 private: |
| 311 // Iterator support. | 311 // Iterator support. |
| 312 int InputCount() FINAL { return I; } | 312 int InputCount() final { return I; } |
| 313 LOperand* InputAt(int i) FINAL { return inputs_[i]; } | 313 LOperand* InputAt(int i) final { return inputs_[i]; } |
| 314 | 314 |
| 315 int TempCount() FINAL { return T; } | 315 int TempCount() final { return T; } |
| 316 LOperand* TempAt(int i) FINAL { return temps_[i]; } | 316 LOperand* TempAt(int i) final { return temps_[i]; } |
| 317 }; | 317 }; |
| 318 | 318 |
| 319 | 319 |
| 320 class LTailCallThroughMegamorphicCache FINAL | 320 class LTailCallThroughMegamorphicCache final |
| 321 : public LTemplateInstruction<0, 3, 0> { | 321 : public LTemplateInstruction<0, 3, 0> { |
| 322 public: | 322 public: |
| 323 LTailCallThroughMegamorphicCache(LOperand* context, LOperand* receiver, | 323 LTailCallThroughMegamorphicCache(LOperand* context, LOperand* receiver, |
| 324 LOperand* name) { | 324 LOperand* name) { |
| 325 inputs_[0] = context; | 325 inputs_[0] = context; |
| 326 inputs_[1] = receiver; | 326 inputs_[1] = receiver; |
| 327 inputs_[2] = name; | 327 inputs_[2] = name; |
| 328 } | 328 } |
| 329 | 329 |
| 330 LOperand* context() { return inputs_[0]; } | 330 LOperand* context() { return inputs_[0]; } |
| 331 LOperand* receiver() { return inputs_[1]; } | 331 LOperand* receiver() { return inputs_[1]; } |
| 332 LOperand* name() { return inputs_[2]; } | 332 LOperand* name() { return inputs_[2]; } |
| 333 | 333 |
| 334 DECLARE_CONCRETE_INSTRUCTION(TailCallThroughMegamorphicCache, | 334 DECLARE_CONCRETE_INSTRUCTION(TailCallThroughMegamorphicCache, |
| 335 "tail-call-through-megamorphic-cache") | 335 "tail-call-through-megamorphic-cache") |
| 336 DECLARE_HYDROGEN_ACCESSOR(TailCallThroughMegamorphicCache) | 336 DECLARE_HYDROGEN_ACCESSOR(TailCallThroughMegamorphicCache) |
| 337 }; | 337 }; |
| 338 | 338 |
| 339 | 339 |
| 340 class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> { | 340 class LUnknownOSRValue final : public LTemplateInstruction<1, 0, 0> { |
| 341 public: | 341 public: |
| 342 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; } | 342 bool HasInterestingComment(LCodeGen* gen) const override { return false; } |
| 343 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") | 343 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") |
| 344 }; | 344 }; |
| 345 | 345 |
| 346 | 346 |
| 347 template<int I, int T> | 347 template<int I, int T> |
| 348 class LControlInstruction : public LTemplateInstruction<0, I, T> { | 348 class LControlInstruction : public LTemplateInstruction<0, I, T> { |
| 349 public: | 349 public: |
| 350 LControlInstruction() : false_label_(NULL), true_label_(NULL) { } | 350 LControlInstruction() : false_label_(NULL), true_label_(NULL) { } |
| 351 | 351 |
| 352 bool IsControl() const FINAL { return true; } | 352 bool IsControl() const final { return true; } |
| 353 | 353 |
| 354 int SuccessorCount() { return hydrogen()->SuccessorCount(); } | 354 int SuccessorCount() { return hydrogen()->SuccessorCount(); } |
| 355 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } | 355 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } |
| 356 | 356 |
| 357 int TrueDestination(LChunk* chunk) { | 357 int TrueDestination(LChunk* chunk) { |
| 358 return chunk->LookupDestination(true_block_id()); | 358 return chunk->LookupDestination(true_block_id()); |
| 359 } | 359 } |
| 360 | 360 |
| 361 int FalseDestination(LChunk* chunk) { | 361 int FalseDestination(LChunk* chunk) { |
| 362 return chunk->LookupDestination(false_block_id()); | 362 return chunk->LookupDestination(false_block_id()); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 392 public: | 392 public: |
| 393 explicit LGap(HBasicBlock* block) | 393 explicit LGap(HBasicBlock* block) |
| 394 : block_(block) { | 394 : block_(block) { |
| 395 parallel_moves_[BEFORE] = NULL; | 395 parallel_moves_[BEFORE] = NULL; |
| 396 parallel_moves_[START] = NULL; | 396 parallel_moves_[START] = NULL; |
| 397 parallel_moves_[END] = NULL; | 397 parallel_moves_[END] = NULL; |
| 398 parallel_moves_[AFTER] = NULL; | 398 parallel_moves_[AFTER] = NULL; |
| 399 } | 399 } |
| 400 | 400 |
| 401 // Can't use the DECLARE-macro here because of sub-classes. | 401 // Can't use the DECLARE-macro here because of sub-classes. |
| 402 bool IsGap() const OVERRIDE { return true; } | 402 bool IsGap() const override { return true; } |
| 403 void PrintDataTo(StringStream* stream) OVERRIDE; | 403 void PrintDataTo(StringStream* stream) override; |
| 404 static LGap* cast(LInstruction* instr) { | 404 static LGap* cast(LInstruction* instr) { |
| 405 DCHECK(instr->IsGap()); | 405 DCHECK(instr->IsGap()); |
| 406 return reinterpret_cast<LGap*>(instr); | 406 return reinterpret_cast<LGap*>(instr); |
| 407 } | 407 } |
| 408 | 408 |
| 409 bool IsRedundant() const; | 409 bool IsRedundant() const; |
| 410 | 410 |
| 411 HBasicBlock* block() const { return block_; } | 411 HBasicBlock* block() const { return block_; } |
| 412 | 412 |
| 413 enum InnerPosition { | 413 enum InnerPosition { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 429 LParallelMove* GetParallelMove(InnerPosition pos) { | 429 LParallelMove* GetParallelMove(InnerPosition pos) { |
| 430 return parallel_moves_[pos]; | 430 return parallel_moves_[pos]; |
| 431 } | 431 } |
| 432 | 432 |
| 433 private: | 433 private: |
| 434 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; | 434 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; |
| 435 HBasicBlock* block_; | 435 HBasicBlock* block_; |
| 436 }; | 436 }; |
| 437 | 437 |
| 438 | 438 |
| 439 class LInstructionGap FINAL : public LGap { | 439 class LInstructionGap final : public LGap { |
| 440 public: | 440 public: |
| 441 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } | 441 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } |
| 442 | 442 |
| 443 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { | 443 bool HasInterestingComment(LCodeGen* gen) const override { |
| 444 return !IsRedundant(); | 444 return !IsRedundant(); |
| 445 } | 445 } |
| 446 | 446 |
| 447 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") | 447 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") |
| 448 }; | 448 }; |
| 449 | 449 |
| 450 | 450 |
| 451 class LDrop FINAL : public LTemplateInstruction<0, 0, 0> { | 451 class LDrop final : public LTemplateInstruction<0, 0, 0> { |
| 452 public: | 452 public: |
| 453 explicit LDrop(int count) : count_(count) { } | 453 explicit LDrop(int count) : count_(count) { } |
| 454 | 454 |
| 455 int count() const { return count_; } | 455 int count() const { return count_; } |
| 456 | 456 |
| 457 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop") | 457 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop") |
| 458 | 458 |
| 459 private: | 459 private: |
| 460 int count_; | 460 int count_; |
| 461 }; | 461 }; |
| 462 | 462 |
| 463 | 463 |
| 464 class LDummy FINAL : public LTemplateInstruction<1, 0, 0> { | 464 class LDummy final : public LTemplateInstruction<1, 0, 0> { |
| 465 public: | 465 public: |
| 466 LDummy() {} | 466 LDummy() {} |
| 467 DECLARE_CONCRETE_INSTRUCTION(Dummy, "dummy") | 467 DECLARE_CONCRETE_INSTRUCTION(Dummy, "dummy") |
| 468 }; | 468 }; |
| 469 | 469 |
| 470 | 470 |
| 471 class LDummyUse FINAL : public LTemplateInstruction<1, 1, 0> { | 471 class LDummyUse final : public LTemplateInstruction<1, 1, 0> { |
| 472 public: | 472 public: |
| 473 explicit LDummyUse(LOperand* value) { | 473 explicit LDummyUse(LOperand* value) { |
| 474 inputs_[0] = value; | 474 inputs_[0] = value; |
| 475 } | 475 } |
| 476 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") | 476 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") |
| 477 }; | 477 }; |
| 478 | 478 |
| 479 | 479 |
| 480 class LGoto FINAL : public LTemplateInstruction<0, 0, 0> { | 480 class LGoto final : public LTemplateInstruction<0, 0, 0> { |
| 481 public: | 481 public: |
| 482 explicit LGoto(HBasicBlock* block) : block_(block) { } | 482 explicit LGoto(HBasicBlock* block) : block_(block) { } |
| 483 | 483 |
| 484 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE; | 484 bool HasInterestingComment(LCodeGen* gen) const override; |
| 485 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") | 485 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") |
| 486 void PrintDataTo(StringStream* stream) OVERRIDE; | 486 void PrintDataTo(StringStream* stream) override; |
| 487 bool IsControl() const OVERRIDE { return true; } | 487 bool IsControl() const override { return true; } |
| 488 | 488 |
| 489 int block_id() const { return block_->block_id(); } | 489 int block_id() const { return block_->block_id(); } |
| 490 | 490 |
| 491 private: | 491 private: |
| 492 HBasicBlock* block_; | 492 HBasicBlock* block_; |
| 493 }; | 493 }; |
| 494 | 494 |
| 495 | 495 |
| 496 class LLazyBailout FINAL : public LTemplateInstruction<0, 0, 0> { | 496 class LLazyBailout final : public LTemplateInstruction<0, 0, 0> { |
| 497 public: | 497 public: |
| 498 LLazyBailout() : gap_instructions_size_(0) { } | 498 LLazyBailout() : gap_instructions_size_(0) { } |
| 499 | 499 |
| 500 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout") | 500 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout") |
| 501 | 501 |
| 502 void set_gap_instructions_size(int gap_instructions_size) { | 502 void set_gap_instructions_size(int gap_instructions_size) { |
| 503 gap_instructions_size_ = gap_instructions_size; | 503 gap_instructions_size_ = gap_instructions_size; |
| 504 } | 504 } |
| 505 int gap_instructions_size() { return gap_instructions_size_; } | 505 int gap_instructions_size() { return gap_instructions_size_; } |
| 506 | 506 |
| 507 private: | 507 private: |
| 508 int gap_instructions_size_; | 508 int gap_instructions_size_; |
| 509 }; | 509 }; |
| 510 | 510 |
| 511 | 511 |
| 512 class LLabel FINAL : public LGap { | 512 class LLabel final : public LGap { |
| 513 public: | 513 public: |
| 514 explicit LLabel(HBasicBlock* block) | 514 explicit LLabel(HBasicBlock* block) |
| 515 : LGap(block), replacement_(NULL) { } | 515 : LGap(block), replacement_(NULL) { } |
| 516 | 516 |
| 517 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; } | 517 bool HasInterestingComment(LCodeGen* gen) const override { return false; } |
| 518 DECLARE_CONCRETE_INSTRUCTION(Label, "label") | 518 DECLARE_CONCRETE_INSTRUCTION(Label, "label") |
| 519 | 519 |
| 520 void PrintDataTo(StringStream* stream) OVERRIDE; | 520 void PrintDataTo(StringStream* stream) override; |
| 521 | 521 |
| 522 int block_id() const { return block()->block_id(); } | 522 int block_id() const { return block()->block_id(); } |
| 523 bool is_loop_header() const { return block()->IsLoopHeader(); } | 523 bool is_loop_header() const { return block()->IsLoopHeader(); } |
| 524 bool is_osr_entry() const { return block()->is_osr_entry(); } | 524 bool is_osr_entry() const { return block()->is_osr_entry(); } |
| 525 Label* label() { return &label_; } | 525 Label* label() { return &label_; } |
| 526 LLabel* replacement() const { return replacement_; } | 526 LLabel* replacement() const { return replacement_; } |
| 527 void set_replacement(LLabel* label) { replacement_ = label; } | 527 void set_replacement(LLabel* label) { replacement_ = label; } |
| 528 bool HasReplacement() const { return replacement_ != NULL; } | 528 bool HasReplacement() const { return replacement_ != NULL; } |
| 529 | 529 |
| 530 private: | 530 private: |
| 531 Label label_; | 531 Label label_; |
| 532 LLabel* replacement_; | 532 LLabel* replacement_; |
| 533 }; | 533 }; |
| 534 | 534 |
| 535 | 535 |
| 536 class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> { | 536 class LOsrEntry final : public LTemplateInstruction<0, 0, 0> { |
| 537 public: | 537 public: |
| 538 LOsrEntry() {} | 538 LOsrEntry() {} |
| 539 | 539 |
| 540 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; } | 540 bool HasInterestingComment(LCodeGen* gen) const override { return false; } |
| 541 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") | 541 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") |
| 542 }; | 542 }; |
| 543 | 543 |
| 544 | 544 |
| 545 class LAccessArgumentsAt FINAL : public LTemplateInstruction<1, 3, 0> { | 545 class LAccessArgumentsAt final : public LTemplateInstruction<1, 3, 0> { |
| 546 public: | 546 public: |
| 547 LAccessArgumentsAt(LOperand* arguments, | 547 LAccessArgumentsAt(LOperand* arguments, |
| 548 LOperand* length, | 548 LOperand* length, |
| 549 LOperand* index) { | 549 LOperand* index) { |
| 550 inputs_[0] = arguments; | 550 inputs_[0] = arguments; |
| 551 inputs_[1] = length; | 551 inputs_[1] = length; |
| 552 inputs_[2] = index; | 552 inputs_[2] = index; |
| 553 } | 553 } |
| 554 | 554 |
| 555 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") | 555 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") |
| 556 | 556 |
| 557 LOperand* arguments() { return inputs_[0]; } | 557 LOperand* arguments() { return inputs_[0]; } |
| 558 LOperand* length() { return inputs_[1]; } | 558 LOperand* length() { return inputs_[1]; } |
| 559 LOperand* index() { return inputs_[2]; } | 559 LOperand* index() { return inputs_[2]; } |
| 560 | 560 |
| 561 void PrintDataTo(StringStream* stream) OVERRIDE; | 561 void PrintDataTo(StringStream* stream) override; |
| 562 }; | 562 }; |
| 563 | 563 |
| 564 | 564 |
| 565 class LAddE FINAL : public LTemplateInstruction<1, 2, 0> { | 565 class LAddE final : public LTemplateInstruction<1, 2, 0> { |
| 566 public: | 566 public: |
| 567 LAddE(LOperand* left, LOperand* right) { | 567 LAddE(LOperand* left, LOperand* right) { |
| 568 inputs_[0] = left; | 568 inputs_[0] = left; |
| 569 inputs_[1] = right; | 569 inputs_[1] = right; |
| 570 } | 570 } |
| 571 | 571 |
| 572 LOperand* left() { return inputs_[0]; } | 572 LOperand* left() { return inputs_[0]; } |
| 573 LOperand* right() { return inputs_[1]; } | 573 LOperand* right() { return inputs_[1]; } |
| 574 | 574 |
| 575 DECLARE_CONCRETE_INSTRUCTION(AddE, "add-e") | 575 DECLARE_CONCRETE_INSTRUCTION(AddE, "add-e") |
| 576 DECLARE_HYDROGEN_ACCESSOR(Add) | 576 DECLARE_HYDROGEN_ACCESSOR(Add) |
| 577 }; | 577 }; |
| 578 | 578 |
| 579 | 579 |
| 580 class LAddI FINAL : public LTemplateInstruction<1, 2, 0> { | 580 class LAddI final : public LTemplateInstruction<1, 2, 0> { |
| 581 public: | 581 public: |
| 582 LAddI(LOperand* left, LOperand* right) | 582 LAddI(LOperand* left, LOperand* right) |
| 583 : shift_(NO_SHIFT), shift_amount_(0) { | 583 : shift_(NO_SHIFT), shift_amount_(0) { |
| 584 inputs_[0] = left; | 584 inputs_[0] = left; |
| 585 inputs_[1] = right; | 585 inputs_[1] = right; |
| 586 } | 586 } |
| 587 | 587 |
| 588 LAddI(LOperand* left, LOperand* right, Shift shift, LOperand* shift_amount) | 588 LAddI(LOperand* left, LOperand* right, Shift shift, LOperand* shift_amount) |
| 589 : shift_(shift), shift_amount_(shift_amount) { | 589 : shift_(shift), shift_amount_(shift_amount) { |
| 590 inputs_[0] = left; | 590 inputs_[0] = left; |
| 591 inputs_[1] = right; | 591 inputs_[1] = right; |
| 592 } | 592 } |
| 593 | 593 |
| 594 LOperand* left() { return inputs_[0]; } | 594 LOperand* left() { return inputs_[0]; } |
| 595 LOperand* right() { return inputs_[1]; } | 595 LOperand* right() { return inputs_[1]; } |
| 596 | 596 |
| 597 Shift shift() const { return shift_; } | 597 Shift shift() const { return shift_; } |
| 598 LOperand* shift_amount() const { return shift_amount_; } | 598 LOperand* shift_amount() const { return shift_amount_; } |
| 599 | 599 |
| 600 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") | 600 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") |
| 601 DECLARE_HYDROGEN_ACCESSOR(Add) | 601 DECLARE_HYDROGEN_ACCESSOR(Add) |
| 602 | 602 |
| 603 protected: | 603 protected: |
| 604 Shift shift_; | 604 Shift shift_; |
| 605 LOperand* shift_amount_; | 605 LOperand* shift_amount_; |
| 606 }; | 606 }; |
| 607 | 607 |
| 608 | 608 |
| 609 class LAddS FINAL : public LTemplateInstruction<1, 2, 0> { | 609 class LAddS final : public LTemplateInstruction<1, 2, 0> { |
| 610 public: | 610 public: |
| 611 LAddS(LOperand* left, LOperand* right) { | 611 LAddS(LOperand* left, LOperand* right) { |
| 612 inputs_[0] = left; | 612 inputs_[0] = left; |
| 613 inputs_[1] = right; | 613 inputs_[1] = right; |
| 614 } | 614 } |
| 615 | 615 |
| 616 LOperand* left() { return inputs_[0]; } | 616 LOperand* left() { return inputs_[0]; } |
| 617 LOperand* right() { return inputs_[1]; } | 617 LOperand* right() { return inputs_[1]; } |
| 618 | 618 |
| 619 DECLARE_CONCRETE_INSTRUCTION(AddS, "add-s") | 619 DECLARE_CONCRETE_INSTRUCTION(AddS, "add-s") |
| 620 DECLARE_HYDROGEN_ACCESSOR(Add) | 620 DECLARE_HYDROGEN_ACCESSOR(Add) |
| 621 }; | 621 }; |
| 622 | 622 |
| 623 | 623 |
| 624 class LAllocate FINAL : public LTemplateInstruction<1, 2, 3> { | 624 class LAllocate final : public LTemplateInstruction<1, 2, 3> { |
| 625 public: | 625 public: |
| 626 LAllocate(LOperand* context, | 626 LAllocate(LOperand* context, |
| 627 LOperand* size, | 627 LOperand* size, |
| 628 LOperand* temp1, | 628 LOperand* temp1, |
| 629 LOperand* temp2, | 629 LOperand* temp2, |
| 630 LOperand* temp3) { | 630 LOperand* temp3) { |
| 631 inputs_[0] = context; | 631 inputs_[0] = context; |
| 632 inputs_[1] = size; | 632 inputs_[1] = size; |
| 633 temps_[0] = temp1; | 633 temps_[0] = temp1; |
| 634 temps_[1] = temp2; | 634 temps_[1] = temp2; |
| 635 temps_[2] = temp3; | 635 temps_[2] = temp3; |
| 636 } | 636 } |
| 637 | 637 |
| 638 LOperand* context() { return inputs_[0]; } | 638 LOperand* context() { return inputs_[0]; } |
| 639 LOperand* size() { return inputs_[1]; } | 639 LOperand* size() { return inputs_[1]; } |
| 640 LOperand* temp1() { return temps_[0]; } | 640 LOperand* temp1() { return temps_[0]; } |
| 641 LOperand* temp2() { return temps_[1]; } | 641 LOperand* temp2() { return temps_[1]; } |
| 642 LOperand* temp3() { return temps_[2]; } | 642 LOperand* temp3() { return temps_[2]; } |
| 643 | 643 |
| 644 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") | 644 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") |
| 645 DECLARE_HYDROGEN_ACCESSOR(Allocate) | 645 DECLARE_HYDROGEN_ACCESSOR(Allocate) |
| 646 }; | 646 }; |
| 647 | 647 |
| 648 | 648 |
| 649 class LApplyArguments FINAL : public LTemplateInstruction<1, 4, 0> { | 649 class LApplyArguments final : public LTemplateInstruction<1, 4, 0> { |
| 650 public: | 650 public: |
| 651 LApplyArguments(LOperand* function, | 651 LApplyArguments(LOperand* function, |
| 652 LOperand* receiver, | 652 LOperand* receiver, |
| 653 LOperand* length, | 653 LOperand* length, |
| 654 LOperand* elements) { | 654 LOperand* elements) { |
| 655 inputs_[0] = function; | 655 inputs_[0] = function; |
| 656 inputs_[1] = receiver; | 656 inputs_[1] = receiver; |
| 657 inputs_[2] = length; | 657 inputs_[2] = length; |
| 658 inputs_[3] = elements; | 658 inputs_[3] = elements; |
| 659 } | 659 } |
| 660 | 660 |
| 661 DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply-arguments") | 661 DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply-arguments") |
| 662 | 662 |
| 663 LOperand* function() { return inputs_[0]; } | 663 LOperand* function() { return inputs_[0]; } |
| 664 LOperand* receiver() { return inputs_[1]; } | 664 LOperand* receiver() { return inputs_[1]; } |
| 665 LOperand* length() { return inputs_[2]; } | 665 LOperand* length() { return inputs_[2]; } |
| 666 LOperand* elements() { return inputs_[3]; } | 666 LOperand* elements() { return inputs_[3]; } |
| 667 }; | 667 }; |
| 668 | 668 |
| 669 | 669 |
| 670 class LArgumentsElements FINAL : public LTemplateInstruction<1, 0, 1> { | 670 class LArgumentsElements final : public LTemplateInstruction<1, 0, 1> { |
| 671 public: | 671 public: |
| 672 explicit LArgumentsElements(LOperand* temp) { | 672 explicit LArgumentsElements(LOperand* temp) { |
| 673 temps_[0] = temp; | 673 temps_[0] = temp; |
| 674 } | 674 } |
| 675 | 675 |
| 676 LOperand* temp() { return temps_[0]; } | 676 LOperand* temp() { return temps_[0]; } |
| 677 | 677 |
| 678 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") | 678 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") |
| 679 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) | 679 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) |
| 680 }; | 680 }; |
| 681 | 681 |
| 682 | 682 |
| 683 class LArgumentsLength FINAL : public LTemplateInstruction<1, 1, 0> { | 683 class LArgumentsLength final : public LTemplateInstruction<1, 1, 0> { |
| 684 public: | 684 public: |
| 685 explicit LArgumentsLength(LOperand* elements) { | 685 explicit LArgumentsLength(LOperand* elements) { |
| 686 inputs_[0] = elements; | 686 inputs_[0] = elements; |
| 687 } | 687 } |
| 688 | 688 |
| 689 LOperand* elements() { return inputs_[0]; } | 689 LOperand* elements() { return inputs_[0]; } |
| 690 | 690 |
| 691 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") | 691 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") |
| 692 }; | 692 }; |
| 693 | 693 |
| 694 | 694 |
| 695 class LArithmeticD FINAL : public LTemplateInstruction<1, 2, 0> { | 695 class LArithmeticD final : public LTemplateInstruction<1, 2, 0> { |
| 696 public: | 696 public: |
| 697 LArithmeticD(Token::Value op, | 697 LArithmeticD(Token::Value op, |
| 698 LOperand* left, | 698 LOperand* left, |
| 699 LOperand* right) | 699 LOperand* right) |
| 700 : op_(op) { | 700 : op_(op) { |
| 701 inputs_[0] = left; | 701 inputs_[0] = left; |
| 702 inputs_[1] = right; | 702 inputs_[1] = right; |
| 703 } | 703 } |
| 704 | 704 |
| 705 Token::Value op() const { return op_; } | 705 Token::Value op() const { return op_; } |
| 706 LOperand* left() { return inputs_[0]; } | 706 LOperand* left() { return inputs_[0]; } |
| 707 LOperand* right() { return inputs_[1]; } | 707 LOperand* right() { return inputs_[1]; } |
| 708 | 708 |
| 709 Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; } | 709 Opcode opcode() const override { return LInstruction::kArithmeticD; } |
| 710 void CompileToNative(LCodeGen* generator) OVERRIDE; | 710 void CompileToNative(LCodeGen* generator) override; |
| 711 const char* Mnemonic() const OVERRIDE; | 711 const char* Mnemonic() const override; |
| 712 | 712 |
| 713 private: | 713 private: |
| 714 Token::Value op_; | 714 Token::Value op_; |
| 715 }; | 715 }; |
| 716 | 716 |
| 717 | 717 |
| 718 class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> { | 718 class LArithmeticT final : public LTemplateInstruction<1, 3, 0> { |
| 719 public: | 719 public: |
| 720 LArithmeticT(Token::Value op, | 720 LArithmeticT(Token::Value op, |
| 721 LOperand* context, | 721 LOperand* context, |
| 722 LOperand* left, | 722 LOperand* left, |
| 723 LOperand* right) | 723 LOperand* right) |
| 724 : op_(op) { | 724 : op_(op) { |
| 725 inputs_[0] = context; | 725 inputs_[0] = context; |
| 726 inputs_[1] = left; | 726 inputs_[1] = left; |
| 727 inputs_[2] = right; | 727 inputs_[2] = right; |
| 728 } | 728 } |
| 729 | 729 |
| 730 LOperand* context() { return inputs_[0]; } | 730 LOperand* context() { return inputs_[0]; } |
| 731 LOperand* left() { return inputs_[1]; } | 731 LOperand* left() { return inputs_[1]; } |
| 732 LOperand* right() { return inputs_[2]; } | 732 LOperand* right() { return inputs_[2]; } |
| 733 Token::Value op() const { return op_; } | 733 Token::Value op() const { return op_; } |
| 734 | 734 |
| 735 Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticT; } | 735 Opcode opcode() const override { return LInstruction::kArithmeticT; } |
| 736 void CompileToNative(LCodeGen* generator) OVERRIDE; | 736 void CompileToNative(LCodeGen* generator) override; |
| 737 const char* Mnemonic() const OVERRIDE; | 737 const char* Mnemonic() const override; |
| 738 | 738 |
| 739 private: | 739 private: |
| 740 Token::Value op_; | 740 Token::Value op_; |
| 741 }; | 741 }; |
| 742 | 742 |
| 743 | 743 |
| 744 class LBoundsCheck FINAL : public LTemplateInstruction<0, 2, 0> { | 744 class LBoundsCheck final : public LTemplateInstruction<0, 2, 0> { |
| 745 public: | 745 public: |
| 746 explicit LBoundsCheck(LOperand* index, LOperand* length) { | 746 explicit LBoundsCheck(LOperand* index, LOperand* length) { |
| 747 inputs_[0] = index; | 747 inputs_[0] = index; |
| 748 inputs_[1] = length; | 748 inputs_[1] = length; |
| 749 } | 749 } |
| 750 | 750 |
| 751 LOperand* index() { return inputs_[0]; } | 751 LOperand* index() { return inputs_[0]; } |
| 752 LOperand* length() { return inputs_[1]; } | 752 LOperand* length() { return inputs_[1]; } |
| 753 | 753 |
| 754 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check") | 754 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check") |
| 755 DECLARE_HYDROGEN_ACCESSOR(BoundsCheck) | 755 DECLARE_HYDROGEN_ACCESSOR(BoundsCheck) |
| 756 }; | 756 }; |
| 757 | 757 |
| 758 | 758 |
| 759 class LBitI FINAL : public LTemplateInstruction<1, 2, 0> { | 759 class LBitI final : public LTemplateInstruction<1, 2, 0> { |
| 760 public: | 760 public: |
| 761 LBitI(LOperand* left, LOperand* right) | 761 LBitI(LOperand* left, LOperand* right) |
| 762 : shift_(NO_SHIFT), shift_amount_(0) { | 762 : shift_(NO_SHIFT), shift_amount_(0) { |
| 763 inputs_[0] = left; | 763 inputs_[0] = left; |
| 764 inputs_[1] = right; | 764 inputs_[1] = right; |
| 765 } | 765 } |
| 766 | 766 |
| 767 LBitI(LOperand* left, LOperand* right, Shift shift, LOperand* shift_amount) | 767 LBitI(LOperand* left, LOperand* right, Shift shift, LOperand* shift_amount) |
| 768 : shift_(shift), shift_amount_(shift_amount) { | 768 : shift_(shift), shift_amount_(shift_amount) { |
| 769 inputs_[0] = left; | 769 inputs_[0] = left; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 780 | 780 |
| 781 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i") | 781 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i") |
| 782 DECLARE_HYDROGEN_ACCESSOR(Bitwise) | 782 DECLARE_HYDROGEN_ACCESSOR(Bitwise) |
| 783 | 783 |
| 784 protected: | 784 protected: |
| 785 Shift shift_; | 785 Shift shift_; |
| 786 LOperand* shift_amount_; | 786 LOperand* shift_amount_; |
| 787 }; | 787 }; |
| 788 | 788 |
| 789 | 789 |
| 790 class LBitS FINAL : public LTemplateInstruction<1, 2, 0> { | 790 class LBitS final : public LTemplateInstruction<1, 2, 0> { |
| 791 public: | 791 public: |
| 792 LBitS(LOperand* left, LOperand* right) { | 792 LBitS(LOperand* left, LOperand* right) { |
| 793 inputs_[0] = left; | 793 inputs_[0] = left; |
| 794 inputs_[1] = right; | 794 inputs_[1] = right; |
| 795 } | 795 } |
| 796 | 796 |
| 797 LOperand* left() { return inputs_[0]; } | 797 LOperand* left() { return inputs_[0]; } |
| 798 LOperand* right() { return inputs_[1]; } | 798 LOperand* right() { return inputs_[1]; } |
| 799 | 799 |
| 800 Token::Value op() const { return hydrogen()->op(); } | 800 Token::Value op() const { return hydrogen()->op(); } |
| 801 | 801 |
| 802 DECLARE_CONCRETE_INSTRUCTION(BitS, "bit-s") | 802 DECLARE_CONCRETE_INSTRUCTION(BitS, "bit-s") |
| 803 DECLARE_HYDROGEN_ACCESSOR(Bitwise) | 803 DECLARE_HYDROGEN_ACCESSOR(Bitwise) |
| 804 }; | 804 }; |
| 805 | 805 |
| 806 | 806 |
| 807 class LBranch FINAL : public LControlInstruction<1, 2> { | 807 class LBranch final : public LControlInstruction<1, 2> { |
| 808 public: | 808 public: |
| 809 explicit LBranch(LOperand* value, LOperand *temp1, LOperand *temp2) { | 809 explicit LBranch(LOperand* value, LOperand *temp1, LOperand *temp2) { |
| 810 inputs_[0] = value; | 810 inputs_[0] = value; |
| 811 temps_[0] = temp1; | 811 temps_[0] = temp1; |
| 812 temps_[1] = temp2; | 812 temps_[1] = temp2; |
| 813 } | 813 } |
| 814 | 814 |
| 815 LOperand* value() { return inputs_[0]; } | 815 LOperand* value() { return inputs_[0]; } |
| 816 LOperand* temp1() { return temps_[0]; } | 816 LOperand* temp1() { return temps_[0]; } |
| 817 LOperand* temp2() { return temps_[1]; } | 817 LOperand* temp2() { return temps_[1]; } |
| 818 | 818 |
| 819 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") | 819 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") |
| 820 DECLARE_HYDROGEN_ACCESSOR(Branch) | 820 DECLARE_HYDROGEN_ACCESSOR(Branch) |
| 821 | 821 |
| 822 void PrintDataTo(StringStream* stream) OVERRIDE; | 822 void PrintDataTo(StringStream* stream) override; |
| 823 }; | 823 }; |
| 824 | 824 |
| 825 | 825 |
| 826 class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> { | 826 class LCallJSFunction final : public LTemplateInstruction<1, 1, 0> { |
| 827 public: | 827 public: |
| 828 explicit LCallJSFunction(LOperand* function) { | 828 explicit LCallJSFunction(LOperand* function) { |
| 829 inputs_[0] = function; | 829 inputs_[0] = function; |
| 830 } | 830 } |
| 831 | 831 |
| 832 LOperand* function() { return inputs_[0]; } | 832 LOperand* function() { return inputs_[0]; } |
| 833 | 833 |
| 834 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function") | 834 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function") |
| 835 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction) | 835 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction) |
| 836 | 836 |
| 837 void PrintDataTo(StringStream* stream) OVERRIDE; | 837 void PrintDataTo(StringStream* stream) override; |
| 838 | 838 |
| 839 int arity() const { return hydrogen()->argument_count() - 1; } | 839 int arity() const { return hydrogen()->argument_count() - 1; } |
| 840 }; | 840 }; |
| 841 | 841 |
| 842 | 842 |
| 843 class LCallFunction FINAL : public LTemplateInstruction<1, 2, 2> { | 843 class LCallFunction final : public LTemplateInstruction<1, 2, 2> { |
| 844 public: | 844 public: |
| 845 LCallFunction(LOperand* context, LOperand* function, LOperand* slot, | 845 LCallFunction(LOperand* context, LOperand* function, LOperand* slot, |
| 846 LOperand* vector) { | 846 LOperand* vector) { |
| 847 inputs_[0] = context; | 847 inputs_[0] = context; |
| 848 inputs_[1] = function; | 848 inputs_[1] = function; |
| 849 temps_[0] = slot; | 849 temps_[0] = slot; |
| 850 temps_[1] = vector; | 850 temps_[1] = vector; |
| 851 } | 851 } |
| 852 | 852 |
| 853 LOperand* context() { return inputs_[0]; } | 853 LOperand* context() { return inputs_[0]; } |
| 854 LOperand* function() { return inputs_[1]; } | 854 LOperand* function() { return inputs_[1]; } |
| 855 LOperand* temp_slot() { return temps_[0]; } | 855 LOperand* temp_slot() { return temps_[0]; } |
| 856 LOperand* temp_vector() { return temps_[1]; } | 856 LOperand* temp_vector() { return temps_[1]; } |
| 857 | 857 |
| 858 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") | 858 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") |
| 859 DECLARE_HYDROGEN_ACCESSOR(CallFunction) | 859 DECLARE_HYDROGEN_ACCESSOR(CallFunction) |
| 860 | 860 |
| 861 int arity() const { return hydrogen()->argument_count() - 1; } | 861 int arity() const { return hydrogen()->argument_count() - 1; } |
| 862 void PrintDataTo(StringStream* stream) OVERRIDE; | 862 void PrintDataTo(StringStream* stream) override; |
| 863 }; | 863 }; |
| 864 | 864 |
| 865 | 865 |
| 866 class LCallNew FINAL : public LTemplateInstruction<1, 2, 0> { | 866 class LCallNew final : public LTemplateInstruction<1, 2, 0> { |
| 867 public: | 867 public: |
| 868 LCallNew(LOperand* context, LOperand* constructor) { | 868 LCallNew(LOperand* context, LOperand* constructor) { |
| 869 inputs_[0] = context; | 869 inputs_[0] = context; |
| 870 inputs_[1] = constructor; | 870 inputs_[1] = constructor; |
| 871 } | 871 } |
| 872 | 872 |
| 873 LOperand* context() { return inputs_[0]; } | 873 LOperand* context() { return inputs_[0]; } |
| 874 LOperand* constructor() { return inputs_[1]; } | 874 LOperand* constructor() { return inputs_[1]; } |
| 875 | 875 |
| 876 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") | 876 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") |
| 877 DECLARE_HYDROGEN_ACCESSOR(CallNew) | 877 DECLARE_HYDROGEN_ACCESSOR(CallNew) |
| 878 | 878 |
| 879 void PrintDataTo(StringStream* stream) OVERRIDE; | 879 void PrintDataTo(StringStream* stream) override; |
| 880 | 880 |
| 881 int arity() const { return hydrogen()->argument_count() - 1; } | 881 int arity() const { return hydrogen()->argument_count() - 1; } |
| 882 }; | 882 }; |
| 883 | 883 |
| 884 | 884 |
| 885 class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> { | 885 class LCallNewArray final : public LTemplateInstruction<1, 2, 0> { |
| 886 public: | 886 public: |
| 887 LCallNewArray(LOperand* context, LOperand* constructor) { | 887 LCallNewArray(LOperand* context, LOperand* constructor) { |
| 888 inputs_[0] = context; | 888 inputs_[0] = context; |
| 889 inputs_[1] = constructor; | 889 inputs_[1] = constructor; |
| 890 } | 890 } |
| 891 | 891 |
| 892 LOperand* context() { return inputs_[0]; } | 892 LOperand* context() { return inputs_[0]; } |
| 893 LOperand* constructor() { return inputs_[1]; } | 893 LOperand* constructor() { return inputs_[1]; } |
| 894 | 894 |
| 895 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") | 895 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") |
| 896 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) | 896 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) |
| 897 | 897 |
| 898 void PrintDataTo(StringStream* stream) OVERRIDE; | 898 void PrintDataTo(StringStream* stream) override; |
| 899 | 899 |
| 900 int arity() const { return hydrogen()->argument_count() - 1; } | 900 int arity() const { return hydrogen()->argument_count() - 1; } |
| 901 }; | 901 }; |
| 902 | 902 |
| 903 | 903 |
| 904 class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> { | 904 class LCallRuntime final : public LTemplateInstruction<1, 1, 0> { |
| 905 public: | 905 public: |
| 906 explicit LCallRuntime(LOperand* context) { | 906 explicit LCallRuntime(LOperand* context) { |
| 907 inputs_[0] = context; | 907 inputs_[0] = context; |
| 908 } | 908 } |
| 909 | 909 |
| 910 LOperand* context() { return inputs_[0]; } | 910 LOperand* context() { return inputs_[0]; } |
| 911 | 911 |
| 912 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") | 912 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") |
| 913 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) | 913 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) |
| 914 | 914 |
| 915 bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE { | 915 bool ClobbersDoubleRegisters(Isolate* isolate) const override { |
| 916 return save_doubles() == kDontSaveFPRegs; | 916 return save_doubles() == kDontSaveFPRegs; |
| 917 } | 917 } |
| 918 | 918 |
| 919 const Runtime::Function* function() const { return hydrogen()->function(); } | 919 const Runtime::Function* function() const { return hydrogen()->function(); } |
| 920 int arity() const { return hydrogen()->argument_count(); } | 920 int arity() const { return hydrogen()->argument_count(); } |
| 921 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } | 921 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } |
| 922 }; | 922 }; |
| 923 | 923 |
| 924 | 924 |
| 925 class LCallStub FINAL : public LTemplateInstruction<1, 1, 0> { | 925 class LCallStub final : public LTemplateInstruction<1, 1, 0> { |
| 926 public: | 926 public: |
| 927 explicit LCallStub(LOperand* context) { | 927 explicit LCallStub(LOperand* context) { |
| 928 inputs_[0] = context; | 928 inputs_[0] = context; |
| 929 } | 929 } |
| 930 | 930 |
| 931 LOperand* context() { return inputs_[0]; } | 931 LOperand* context() { return inputs_[0]; } |
| 932 | 932 |
| 933 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") | 933 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") |
| 934 DECLARE_HYDROGEN_ACCESSOR(CallStub) | 934 DECLARE_HYDROGEN_ACCESSOR(CallStub) |
| 935 }; | 935 }; |
| 936 | 936 |
| 937 | 937 |
| 938 class LCheckInstanceType FINAL : public LTemplateInstruction<0, 1, 1> { | 938 class LCheckInstanceType final : public LTemplateInstruction<0, 1, 1> { |
| 939 public: | 939 public: |
| 940 explicit LCheckInstanceType(LOperand* value, LOperand* temp) { | 940 explicit LCheckInstanceType(LOperand* value, LOperand* temp) { |
| 941 inputs_[0] = value; | 941 inputs_[0] = value; |
| 942 temps_[0] = temp; | 942 temps_[0] = temp; |
| 943 } | 943 } |
| 944 | 944 |
| 945 LOperand* value() { return inputs_[0]; } | 945 LOperand* value() { return inputs_[0]; } |
| 946 LOperand* temp() { return temps_[0]; } | 946 LOperand* temp() { return temps_[0]; } |
| 947 | 947 |
| 948 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type") | 948 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type") |
| 949 DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType) | 949 DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType) |
| 950 }; | 950 }; |
| 951 | 951 |
| 952 | 952 |
| 953 class LCheckMaps FINAL : public LTemplateInstruction<0, 1, 1> { | 953 class LCheckMaps final : public LTemplateInstruction<0, 1, 1> { |
| 954 public: | 954 public: |
| 955 explicit LCheckMaps(LOperand* value = NULL, LOperand* temp = NULL) { | 955 explicit LCheckMaps(LOperand* value = NULL, LOperand* temp = NULL) { |
| 956 inputs_[0] = value; | 956 inputs_[0] = value; |
| 957 temps_[0] = temp; | 957 temps_[0] = temp; |
| 958 } | 958 } |
| 959 | 959 |
| 960 LOperand* value() { return inputs_[0]; } | 960 LOperand* value() { return inputs_[0]; } |
| 961 LOperand* temp() { return temps_[0]; } | 961 LOperand* temp() { return temps_[0]; } |
| 962 | 962 |
| 963 DECLARE_CONCRETE_INSTRUCTION(CheckMaps, "check-maps") | 963 DECLARE_CONCRETE_INSTRUCTION(CheckMaps, "check-maps") |
| 964 DECLARE_HYDROGEN_ACCESSOR(CheckMaps) | 964 DECLARE_HYDROGEN_ACCESSOR(CheckMaps) |
| 965 }; | 965 }; |
| 966 | 966 |
| 967 | 967 |
| 968 class LCheckNonSmi FINAL : public LTemplateInstruction<0, 1, 0> { | 968 class LCheckNonSmi final : public LTemplateInstruction<0, 1, 0> { |
| 969 public: | 969 public: |
| 970 explicit LCheckNonSmi(LOperand* value) { | 970 explicit LCheckNonSmi(LOperand* value) { |
| 971 inputs_[0] = value; | 971 inputs_[0] = value; |
| 972 } | 972 } |
| 973 | 973 |
| 974 LOperand* value() { return inputs_[0]; } | 974 LOperand* value() { return inputs_[0]; } |
| 975 | 975 |
| 976 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") | 976 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") |
| 977 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject) | 977 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject) |
| 978 }; | 978 }; |
| 979 | 979 |
| 980 | 980 |
| 981 class LCheckSmi FINAL : public LTemplateInstruction<1, 1, 0> { | 981 class LCheckSmi final : public LTemplateInstruction<1, 1, 0> { |
| 982 public: | 982 public: |
| 983 explicit LCheckSmi(LOperand* value) { | 983 explicit LCheckSmi(LOperand* value) { |
| 984 inputs_[0] = value; | 984 inputs_[0] = value; |
| 985 } | 985 } |
| 986 | 986 |
| 987 LOperand* value() { return inputs_[0]; } | 987 LOperand* value() { return inputs_[0]; } |
| 988 | 988 |
| 989 DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi") | 989 DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi") |
| 990 }; | 990 }; |
| 991 | 991 |
| 992 | 992 |
| 993 class LCheckValue FINAL : public LTemplateInstruction<0, 1, 0> { | 993 class LCheckValue final : public LTemplateInstruction<0, 1, 0> { |
| 994 public: | 994 public: |
| 995 explicit LCheckValue(LOperand* value) { | 995 explicit LCheckValue(LOperand* value) { |
| 996 inputs_[0] = value; | 996 inputs_[0] = value; |
| 997 } | 997 } |
| 998 | 998 |
| 999 LOperand* value() { return inputs_[0]; } | 999 LOperand* value() { return inputs_[0]; } |
| 1000 | 1000 |
| 1001 DECLARE_CONCRETE_INSTRUCTION(CheckValue, "check-value") | 1001 DECLARE_CONCRETE_INSTRUCTION(CheckValue, "check-value") |
| 1002 DECLARE_HYDROGEN_ACCESSOR(CheckValue) | 1002 DECLARE_HYDROGEN_ACCESSOR(CheckValue) |
| 1003 }; | 1003 }; |
| 1004 | 1004 |
| 1005 | 1005 |
| 1006 class LClampDToUint8 FINAL : public LTemplateInstruction<1, 1, 0> { | 1006 class LClampDToUint8 final : public LTemplateInstruction<1, 1, 0> { |
| 1007 public: | 1007 public: |
| 1008 explicit LClampDToUint8(LOperand* unclamped) { | 1008 explicit LClampDToUint8(LOperand* unclamped) { |
| 1009 inputs_[0] = unclamped; | 1009 inputs_[0] = unclamped; |
| 1010 } | 1010 } |
| 1011 | 1011 |
| 1012 LOperand* unclamped() { return inputs_[0]; } | 1012 LOperand* unclamped() { return inputs_[0]; } |
| 1013 | 1013 |
| 1014 DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8") | 1014 DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8") |
| 1015 }; | 1015 }; |
| 1016 | 1016 |
| 1017 | 1017 |
| 1018 class LClampIToUint8 FINAL : public LTemplateInstruction<1, 1, 0> { | 1018 class LClampIToUint8 final : public LTemplateInstruction<1, 1, 0> { |
| 1019 public: | 1019 public: |
| 1020 explicit LClampIToUint8(LOperand* unclamped) { | 1020 explicit LClampIToUint8(LOperand* unclamped) { |
| 1021 inputs_[0] = unclamped; | 1021 inputs_[0] = unclamped; |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 LOperand* unclamped() { return inputs_[0]; } | 1024 LOperand* unclamped() { return inputs_[0]; } |
| 1025 | 1025 |
| 1026 DECLARE_CONCRETE_INSTRUCTION(ClampIToUint8, "clamp-i-to-uint8") | 1026 DECLARE_CONCRETE_INSTRUCTION(ClampIToUint8, "clamp-i-to-uint8") |
| 1027 }; | 1027 }; |
| 1028 | 1028 |
| 1029 | 1029 |
| 1030 class LClampTToUint8 FINAL : public LTemplateInstruction<1, 1, 1> { | 1030 class LClampTToUint8 final : public LTemplateInstruction<1, 1, 1> { |
| 1031 public: | 1031 public: |
| 1032 LClampTToUint8(LOperand* unclamped, LOperand* temp1) { | 1032 LClampTToUint8(LOperand* unclamped, LOperand* temp1) { |
| 1033 inputs_[0] = unclamped; | 1033 inputs_[0] = unclamped; |
| 1034 temps_[0] = temp1; | 1034 temps_[0] = temp1; |
| 1035 } | 1035 } |
| 1036 | 1036 |
| 1037 LOperand* unclamped() { return inputs_[0]; } | 1037 LOperand* unclamped() { return inputs_[0]; } |
| 1038 LOperand* temp1() { return temps_[0]; } | 1038 LOperand* temp1() { return temps_[0]; } |
| 1039 | 1039 |
| 1040 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") | 1040 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") |
| 1041 }; | 1041 }; |
| 1042 | 1042 |
| 1043 | 1043 |
| 1044 class LDoubleBits FINAL : public LTemplateInstruction<1, 1, 0> { | 1044 class LDoubleBits final : public LTemplateInstruction<1, 1, 0> { |
| 1045 public: | 1045 public: |
| 1046 explicit LDoubleBits(LOperand* value) { | 1046 explicit LDoubleBits(LOperand* value) { |
| 1047 inputs_[0] = value; | 1047 inputs_[0] = value; |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 LOperand* value() { return inputs_[0]; } | 1050 LOperand* value() { return inputs_[0]; } |
| 1051 | 1051 |
| 1052 DECLARE_CONCRETE_INSTRUCTION(DoubleBits, "double-bits") | 1052 DECLARE_CONCRETE_INSTRUCTION(DoubleBits, "double-bits") |
| 1053 DECLARE_HYDROGEN_ACCESSOR(DoubleBits) | 1053 DECLARE_HYDROGEN_ACCESSOR(DoubleBits) |
| 1054 }; | 1054 }; |
| 1055 | 1055 |
| 1056 | 1056 |
| 1057 class LConstructDouble FINAL : public LTemplateInstruction<1, 2, 0> { | 1057 class LConstructDouble final : public LTemplateInstruction<1, 2, 0> { |
| 1058 public: | 1058 public: |
| 1059 LConstructDouble(LOperand* hi, LOperand* lo) { | 1059 LConstructDouble(LOperand* hi, LOperand* lo) { |
| 1060 inputs_[0] = hi; | 1060 inputs_[0] = hi; |
| 1061 inputs_[1] = lo; | 1061 inputs_[1] = lo; |
| 1062 } | 1062 } |
| 1063 | 1063 |
| 1064 LOperand* hi() { return inputs_[0]; } | 1064 LOperand* hi() { return inputs_[0]; } |
| 1065 LOperand* lo() { return inputs_[1]; } | 1065 LOperand* lo() { return inputs_[1]; } |
| 1066 | 1066 |
| 1067 DECLARE_CONCRETE_INSTRUCTION(ConstructDouble, "construct-double") | 1067 DECLARE_CONCRETE_INSTRUCTION(ConstructDouble, "construct-double") |
| 1068 }; | 1068 }; |
| 1069 | 1069 |
| 1070 | 1070 |
| 1071 class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 2> { | 1071 class LClassOfTestAndBranch final : public LControlInstruction<1, 2> { |
| 1072 public: | 1072 public: |
| 1073 LClassOfTestAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) { | 1073 LClassOfTestAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) { |
| 1074 inputs_[0] = value; | 1074 inputs_[0] = value; |
| 1075 temps_[0] = temp1; | 1075 temps_[0] = temp1; |
| 1076 temps_[1] = temp2; | 1076 temps_[1] = temp2; |
| 1077 } | 1077 } |
| 1078 | 1078 |
| 1079 LOperand* value() { return inputs_[0]; } | 1079 LOperand* value() { return inputs_[0]; } |
| 1080 LOperand* temp1() { return temps_[0]; } | 1080 LOperand* temp1() { return temps_[0]; } |
| 1081 LOperand* temp2() { return temps_[1]; } | 1081 LOperand* temp2() { return temps_[1]; } |
| 1082 | 1082 |
| 1083 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, | 1083 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, |
| 1084 "class-of-test-and-branch") | 1084 "class-of-test-and-branch") |
| 1085 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) | 1085 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) |
| 1086 | 1086 |
| 1087 void PrintDataTo(StringStream* stream) OVERRIDE; | 1087 void PrintDataTo(StringStream* stream) override; |
| 1088 }; | 1088 }; |
| 1089 | 1089 |
| 1090 | 1090 |
| 1091 class LCmpHoleAndBranchD FINAL : public LControlInstruction<1, 1> { | 1091 class LCmpHoleAndBranchD final : public LControlInstruction<1, 1> { |
| 1092 public: | 1092 public: |
| 1093 explicit LCmpHoleAndBranchD(LOperand* object, LOperand* temp) { | 1093 explicit LCmpHoleAndBranchD(LOperand* object, LOperand* temp) { |
| 1094 inputs_[0] = object; | 1094 inputs_[0] = object; |
| 1095 temps_[0] = temp; | 1095 temps_[0] = temp; |
| 1096 } | 1096 } |
| 1097 | 1097 |
| 1098 LOperand* object() { return inputs_[0]; } | 1098 LOperand* object() { return inputs_[0]; } |
| 1099 LOperand* temp() { return temps_[0]; } | 1099 LOperand* temp() { return temps_[0]; } |
| 1100 | 1100 |
| 1101 DECLARE_CONCRETE_INSTRUCTION(CmpHoleAndBranchD, "cmp-hole-and-branch-d") | 1101 DECLARE_CONCRETE_INSTRUCTION(CmpHoleAndBranchD, "cmp-hole-and-branch-d") |
| 1102 DECLARE_HYDROGEN_ACCESSOR(CompareHoleAndBranch) | 1102 DECLARE_HYDROGEN_ACCESSOR(CompareHoleAndBranch) |
| 1103 }; | 1103 }; |
| 1104 | 1104 |
| 1105 | 1105 |
| 1106 class LCmpHoleAndBranchT FINAL : public LControlInstruction<1, 0> { | 1106 class LCmpHoleAndBranchT final : public LControlInstruction<1, 0> { |
| 1107 public: | 1107 public: |
| 1108 explicit LCmpHoleAndBranchT(LOperand* object) { | 1108 explicit LCmpHoleAndBranchT(LOperand* object) { |
| 1109 inputs_[0] = object; | 1109 inputs_[0] = object; |
| 1110 } | 1110 } |
| 1111 | 1111 |
| 1112 LOperand* object() { return inputs_[0]; } | 1112 LOperand* object() { return inputs_[0]; } |
| 1113 | 1113 |
| 1114 DECLARE_CONCRETE_INSTRUCTION(CmpHoleAndBranchT, "cmp-hole-and-branch-t") | 1114 DECLARE_CONCRETE_INSTRUCTION(CmpHoleAndBranchT, "cmp-hole-and-branch-t") |
| 1115 DECLARE_HYDROGEN_ACCESSOR(CompareHoleAndBranch) | 1115 DECLARE_HYDROGEN_ACCESSOR(CompareHoleAndBranch) |
| 1116 }; | 1116 }; |
| 1117 | 1117 |
| 1118 | 1118 |
| 1119 class LCmpMapAndBranch FINAL : public LControlInstruction<1, 1> { | 1119 class LCmpMapAndBranch final : public LControlInstruction<1, 1> { |
| 1120 public: | 1120 public: |
| 1121 LCmpMapAndBranch(LOperand* value, LOperand* temp) { | 1121 LCmpMapAndBranch(LOperand* value, LOperand* temp) { |
| 1122 inputs_[0] = value; | 1122 inputs_[0] = value; |
| 1123 temps_[0] = temp; | 1123 temps_[0] = temp; |
| 1124 } | 1124 } |
| 1125 | 1125 |
| 1126 LOperand* value() { return inputs_[0]; } | 1126 LOperand* value() { return inputs_[0]; } |
| 1127 LOperand* temp() { return temps_[0]; } | 1127 LOperand* temp() { return temps_[0]; } |
| 1128 | 1128 |
| 1129 DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch") | 1129 DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch") |
| 1130 DECLARE_HYDROGEN_ACCESSOR(CompareMap) | 1130 DECLARE_HYDROGEN_ACCESSOR(CompareMap) |
| 1131 | 1131 |
| 1132 Handle<Map> map() const { return hydrogen()->map().handle(); } | 1132 Handle<Map> map() const { return hydrogen()->map().handle(); } |
| 1133 }; | 1133 }; |
| 1134 | 1134 |
| 1135 | 1135 |
| 1136 class LCmpObjectEqAndBranch FINAL : public LControlInstruction<2, 0> { | 1136 class LCmpObjectEqAndBranch final : public LControlInstruction<2, 0> { |
| 1137 public: | 1137 public: |
| 1138 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) { | 1138 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) { |
| 1139 inputs_[0] = left; | 1139 inputs_[0] = left; |
| 1140 inputs_[1] = right; | 1140 inputs_[1] = right; |
| 1141 } | 1141 } |
| 1142 | 1142 |
| 1143 LOperand* left() { return inputs_[0]; } | 1143 LOperand* left() { return inputs_[0]; } |
| 1144 LOperand* right() { return inputs_[1]; } | 1144 LOperand* right() { return inputs_[1]; } |
| 1145 | 1145 |
| 1146 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, "cmp-object-eq-and-branch") | 1146 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, "cmp-object-eq-and-branch") |
| 1147 DECLARE_HYDROGEN_ACCESSOR(CompareObjectEqAndBranch) | 1147 DECLARE_HYDROGEN_ACCESSOR(CompareObjectEqAndBranch) |
| 1148 }; | 1148 }; |
| 1149 | 1149 |
| 1150 | 1150 |
| 1151 class LCmpT FINAL : public LTemplateInstruction<1, 3, 0> { | 1151 class LCmpT final : public LTemplateInstruction<1, 3, 0> { |
| 1152 public: | 1152 public: |
| 1153 LCmpT(LOperand* context, LOperand* left, LOperand* right) { | 1153 LCmpT(LOperand* context, LOperand* left, LOperand* right) { |
| 1154 inputs_[0] = context; | 1154 inputs_[0] = context; |
| 1155 inputs_[1] = left; | 1155 inputs_[1] = left; |
| 1156 inputs_[2] = right; | 1156 inputs_[2] = right; |
| 1157 } | 1157 } |
| 1158 | 1158 |
| 1159 LOperand* context() { return inputs_[0]; } | 1159 LOperand* context() { return inputs_[0]; } |
| 1160 LOperand* left() { return inputs_[1]; } | 1160 LOperand* left() { return inputs_[1]; } |
| 1161 LOperand* right() { return inputs_[2]; } | 1161 LOperand* right() { return inputs_[2]; } |
| 1162 | 1162 |
| 1163 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") | 1163 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") |
| 1164 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) | 1164 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) |
| 1165 | 1165 |
| 1166 Token::Value op() const { return hydrogen()->token(); } | 1166 Token::Value op() const { return hydrogen()->token(); } |
| 1167 }; | 1167 }; |
| 1168 | 1168 |
| 1169 | 1169 |
| 1170 class LCompareMinusZeroAndBranch FINAL : public LControlInstruction<1, 1> { | 1170 class LCompareMinusZeroAndBranch final : public LControlInstruction<1, 1> { |
| 1171 public: | 1171 public: |
| 1172 LCompareMinusZeroAndBranch(LOperand* value, LOperand* temp) { | 1172 LCompareMinusZeroAndBranch(LOperand* value, LOperand* temp) { |
| 1173 inputs_[0] = value; | 1173 inputs_[0] = value; |
| 1174 temps_[0] = temp; | 1174 temps_[0] = temp; |
| 1175 } | 1175 } |
| 1176 | 1176 |
| 1177 LOperand* value() { return inputs_[0]; } | 1177 LOperand* value() { return inputs_[0]; } |
| 1178 LOperand* temp() { return temps_[0]; } | 1178 LOperand* temp() { return temps_[0]; } |
| 1179 | 1179 |
| 1180 DECLARE_CONCRETE_INSTRUCTION(CompareMinusZeroAndBranch, | 1180 DECLARE_CONCRETE_INSTRUCTION(CompareMinusZeroAndBranch, |
| 1181 "cmp-minus-zero-and-branch") | 1181 "cmp-minus-zero-and-branch") |
| 1182 DECLARE_HYDROGEN_ACCESSOR(CompareMinusZeroAndBranch) | 1182 DECLARE_HYDROGEN_ACCESSOR(CompareMinusZeroAndBranch) |
| 1183 }; | 1183 }; |
| 1184 | 1184 |
| 1185 | 1185 |
| 1186 class LCompareNumericAndBranch FINAL : public LControlInstruction<2, 0> { | 1186 class LCompareNumericAndBranch final : public LControlInstruction<2, 0> { |
| 1187 public: | 1187 public: |
| 1188 LCompareNumericAndBranch(LOperand* left, LOperand* right) { | 1188 LCompareNumericAndBranch(LOperand* left, LOperand* right) { |
| 1189 inputs_[0] = left; | 1189 inputs_[0] = left; |
| 1190 inputs_[1] = right; | 1190 inputs_[1] = right; |
| 1191 } | 1191 } |
| 1192 | 1192 |
| 1193 LOperand* left() { return inputs_[0]; } | 1193 LOperand* left() { return inputs_[0]; } |
| 1194 LOperand* right() { return inputs_[1]; } | 1194 LOperand* right() { return inputs_[1]; } |
| 1195 | 1195 |
| 1196 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch, | 1196 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch, |
| 1197 "compare-numeric-and-branch") | 1197 "compare-numeric-and-branch") |
| 1198 DECLARE_HYDROGEN_ACCESSOR(CompareNumericAndBranch) | 1198 DECLARE_HYDROGEN_ACCESSOR(CompareNumericAndBranch) |
| 1199 | 1199 |
| 1200 Token::Value op() const { return hydrogen()->token(); } | 1200 Token::Value op() const { return hydrogen()->token(); } |
| 1201 bool is_double() const { | 1201 bool is_double() const { |
| 1202 return hydrogen()->representation().IsDouble(); | 1202 return hydrogen()->representation().IsDouble(); |
| 1203 } | 1203 } |
| 1204 | 1204 |
| 1205 void PrintDataTo(StringStream* stream) OVERRIDE; | 1205 void PrintDataTo(StringStream* stream) override; |
| 1206 }; | 1206 }; |
| 1207 | 1207 |
| 1208 | 1208 |
| 1209 class LConstantD FINAL : public LTemplateInstruction<1, 0, 0> { | 1209 class LConstantD final : public LTemplateInstruction<1, 0, 0> { |
| 1210 public: | 1210 public: |
| 1211 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d") | 1211 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d") |
| 1212 DECLARE_HYDROGEN_ACCESSOR(Constant) | 1212 DECLARE_HYDROGEN_ACCESSOR(Constant) |
| 1213 | 1213 |
| 1214 double value() const { return hydrogen()->DoubleValue(); } | 1214 double value() const { return hydrogen()->DoubleValue(); } |
| 1215 }; | 1215 }; |
| 1216 | 1216 |
| 1217 | 1217 |
| 1218 class LConstantE FINAL : public LTemplateInstruction<1, 0, 0> { | 1218 class LConstantE final : public LTemplateInstruction<1, 0, 0> { |
| 1219 public: | 1219 public: |
| 1220 DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e") | 1220 DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e") |
| 1221 DECLARE_HYDROGEN_ACCESSOR(Constant) | 1221 DECLARE_HYDROGEN_ACCESSOR(Constant) |
| 1222 | 1222 |
| 1223 ExternalReference value() const { | 1223 ExternalReference value() const { |
| 1224 return hydrogen()->ExternalReferenceValue(); | 1224 return hydrogen()->ExternalReferenceValue(); |
| 1225 } | 1225 } |
| 1226 }; | 1226 }; |
| 1227 | 1227 |
| 1228 | 1228 |
| 1229 class LConstantI FINAL : public LTemplateInstruction<1, 0, 0> { | 1229 class LConstantI final : public LTemplateInstruction<1, 0, 0> { |
| 1230 public: | 1230 public: |
| 1231 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") | 1231 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") |
| 1232 DECLARE_HYDROGEN_ACCESSOR(Constant) | 1232 DECLARE_HYDROGEN_ACCESSOR(Constant) |
| 1233 | 1233 |
| 1234 int32_t value() const { return hydrogen()->Integer32Value(); } | 1234 int32_t value() const { return hydrogen()->Integer32Value(); } |
| 1235 }; | 1235 }; |
| 1236 | 1236 |
| 1237 | 1237 |
| 1238 class LConstantS FINAL : public LTemplateInstruction<1, 0, 0> { | 1238 class LConstantS final : public LTemplateInstruction<1, 0, 0> { |
| 1239 public: | 1239 public: |
| 1240 DECLARE_CONCRETE_INSTRUCTION(ConstantS, "constant-s") | 1240 DECLARE_CONCRETE_INSTRUCTION(ConstantS, "constant-s") |
| 1241 DECLARE_HYDROGEN_ACCESSOR(Constant) | 1241 DECLARE_HYDROGEN_ACCESSOR(Constant) |
| 1242 | 1242 |
| 1243 Smi* value() const { return Smi::FromInt(hydrogen()->Integer32Value()); } | 1243 Smi* value() const { return Smi::FromInt(hydrogen()->Integer32Value()); } |
| 1244 }; | 1244 }; |
| 1245 | 1245 |
| 1246 | 1246 |
| 1247 class LConstantT FINAL : public LTemplateInstruction<1, 0, 0> { | 1247 class LConstantT final : public LTemplateInstruction<1, 0, 0> { |
| 1248 public: | 1248 public: |
| 1249 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") | 1249 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") |
| 1250 DECLARE_HYDROGEN_ACCESSOR(Constant) | 1250 DECLARE_HYDROGEN_ACCESSOR(Constant) |
| 1251 | 1251 |
| 1252 Handle<Object> value(Isolate* isolate) const { | 1252 Handle<Object> value(Isolate* isolate) const { |
| 1253 return hydrogen()->handle(isolate); | 1253 return hydrogen()->handle(isolate); |
| 1254 } | 1254 } |
| 1255 }; | 1255 }; |
| 1256 | 1256 |
| 1257 | 1257 |
| 1258 class LContext FINAL : public LTemplateInstruction<1, 0, 0> { | 1258 class LContext final : public LTemplateInstruction<1, 0, 0> { |
| 1259 public: | 1259 public: |
| 1260 DECLARE_CONCRETE_INSTRUCTION(Context, "context") | 1260 DECLARE_CONCRETE_INSTRUCTION(Context, "context") |
| 1261 DECLARE_HYDROGEN_ACCESSOR(Context) | 1261 DECLARE_HYDROGEN_ACCESSOR(Context) |
| 1262 }; | 1262 }; |
| 1263 | 1263 |
| 1264 | 1264 |
| 1265 class LDateField FINAL : public LTemplateInstruction<1, 1, 0> { | 1265 class LDateField final : public LTemplateInstruction<1, 1, 0> { |
| 1266 public: | 1266 public: |
| 1267 LDateField(LOperand* date, Smi* index) : index_(index) { | 1267 LDateField(LOperand* date, Smi* index) : index_(index) { |
| 1268 inputs_[0] = date; | 1268 inputs_[0] = date; |
| 1269 } | 1269 } |
| 1270 | 1270 |
| 1271 LOperand* date() { return inputs_[0]; } | 1271 LOperand* date() { return inputs_[0]; } |
| 1272 Smi* index() const { return index_; } | 1272 Smi* index() const { return index_; } |
| 1273 | 1273 |
| 1274 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field") | 1274 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field") |
| 1275 DECLARE_HYDROGEN_ACCESSOR(DateField) | 1275 DECLARE_HYDROGEN_ACCESSOR(DateField) |
| 1276 | 1276 |
| 1277 private: | 1277 private: |
| 1278 Smi* index_; | 1278 Smi* index_; |
| 1279 }; | 1279 }; |
| 1280 | 1280 |
| 1281 | 1281 |
| 1282 class LDebugBreak FINAL : public LTemplateInstruction<0, 0, 0> { | 1282 class LDebugBreak final : public LTemplateInstruction<0, 0, 0> { |
| 1283 public: | 1283 public: |
| 1284 DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break") | 1284 DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break") |
| 1285 }; | 1285 }; |
| 1286 | 1286 |
| 1287 | 1287 |
| 1288 class LDeclareGlobals FINAL : public LTemplateInstruction<0, 1, 0> { | 1288 class LDeclareGlobals final : public LTemplateInstruction<0, 1, 0> { |
| 1289 public: | 1289 public: |
| 1290 explicit LDeclareGlobals(LOperand* context) { | 1290 explicit LDeclareGlobals(LOperand* context) { |
| 1291 inputs_[0] = context; | 1291 inputs_[0] = context; |
| 1292 } | 1292 } |
| 1293 | 1293 |
| 1294 LOperand* context() { return inputs_[0]; } | 1294 LOperand* context() { return inputs_[0]; } |
| 1295 | 1295 |
| 1296 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") | 1296 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") |
| 1297 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) | 1297 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) |
| 1298 }; | 1298 }; |
| 1299 | 1299 |
| 1300 | 1300 |
| 1301 class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> { | 1301 class LDeoptimize final : public LTemplateInstruction<0, 0, 0> { |
| 1302 public: | 1302 public: |
| 1303 bool IsControl() const OVERRIDE { return true; } | 1303 bool IsControl() const override { return true; } |
| 1304 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") | 1304 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") |
| 1305 DECLARE_HYDROGEN_ACCESSOR(Deoptimize) | 1305 DECLARE_HYDROGEN_ACCESSOR(Deoptimize) |
| 1306 }; | 1306 }; |
| 1307 | 1307 |
| 1308 | 1308 |
| 1309 class LDivByPowerOf2I FINAL : public LTemplateInstruction<1, 1, 0> { | 1309 class LDivByPowerOf2I final : public LTemplateInstruction<1, 1, 0> { |
| 1310 public: | 1310 public: |
| 1311 LDivByPowerOf2I(LOperand* dividend, int32_t divisor) { | 1311 LDivByPowerOf2I(LOperand* dividend, int32_t divisor) { |
| 1312 inputs_[0] = dividend; | 1312 inputs_[0] = dividend; |
| 1313 divisor_ = divisor; | 1313 divisor_ = divisor; |
| 1314 } | 1314 } |
| 1315 | 1315 |
| 1316 LOperand* dividend() { return inputs_[0]; } | 1316 LOperand* dividend() { return inputs_[0]; } |
| 1317 int32_t divisor() const { return divisor_; } | 1317 int32_t divisor() const { return divisor_; } |
| 1318 | 1318 |
| 1319 DECLARE_CONCRETE_INSTRUCTION(DivByPowerOf2I, "div-by-power-of-2-i") | 1319 DECLARE_CONCRETE_INSTRUCTION(DivByPowerOf2I, "div-by-power-of-2-i") |
| 1320 DECLARE_HYDROGEN_ACCESSOR(Div) | 1320 DECLARE_HYDROGEN_ACCESSOR(Div) |
| 1321 | 1321 |
| 1322 private: | 1322 private: |
| 1323 int32_t divisor_; | 1323 int32_t divisor_; |
| 1324 }; | 1324 }; |
| 1325 | 1325 |
| 1326 | 1326 |
| 1327 class LDivByConstI FINAL : public LTemplateInstruction<1, 1, 1> { | 1327 class LDivByConstI final : public LTemplateInstruction<1, 1, 1> { |
| 1328 public: | 1328 public: |
| 1329 LDivByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) { | 1329 LDivByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) { |
| 1330 inputs_[0] = dividend; | 1330 inputs_[0] = dividend; |
| 1331 divisor_ = divisor; | 1331 divisor_ = divisor; |
| 1332 temps_[0] = temp; | 1332 temps_[0] = temp; |
| 1333 } | 1333 } |
| 1334 | 1334 |
| 1335 LOperand* dividend() { return inputs_[0]; } | 1335 LOperand* dividend() { return inputs_[0]; } |
| 1336 int32_t divisor() const { return divisor_; } | 1336 int32_t divisor() const { return divisor_; } |
| 1337 LOperand* temp() { return temps_[0]; } | 1337 LOperand* temp() { return temps_[0]; } |
| 1338 | 1338 |
| 1339 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i") | 1339 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i") |
| 1340 DECLARE_HYDROGEN_ACCESSOR(Div) | 1340 DECLARE_HYDROGEN_ACCESSOR(Div) |
| 1341 | 1341 |
| 1342 private: | 1342 private: |
| 1343 int32_t divisor_; | 1343 int32_t divisor_; |
| 1344 }; | 1344 }; |
| 1345 | 1345 |
| 1346 | 1346 |
| 1347 class LDivI FINAL : public LTemplateInstruction<1, 2, 1> { | 1347 class LDivI final : public LTemplateInstruction<1, 2, 1> { |
| 1348 public: | 1348 public: |
| 1349 LDivI(LOperand* dividend, LOperand* divisor, LOperand* temp) { | 1349 LDivI(LOperand* dividend, LOperand* divisor, LOperand* temp) { |
| 1350 inputs_[0] = dividend; | 1350 inputs_[0] = dividend; |
| 1351 inputs_[1] = divisor; | 1351 inputs_[1] = divisor; |
| 1352 temps_[0] = temp; | 1352 temps_[0] = temp; |
| 1353 } | 1353 } |
| 1354 | 1354 |
| 1355 LOperand* dividend() { return inputs_[0]; } | 1355 LOperand* dividend() { return inputs_[0]; } |
| 1356 LOperand* divisor() { return inputs_[1]; } | 1356 LOperand* divisor() { return inputs_[1]; } |
| 1357 LOperand* temp() { return temps_[0]; } | 1357 LOperand* temp() { return temps_[0]; } |
| 1358 | 1358 |
| 1359 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") | 1359 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") |
| 1360 DECLARE_HYDROGEN_ACCESSOR(BinaryOperation) | 1360 DECLARE_HYDROGEN_ACCESSOR(BinaryOperation) |
| 1361 }; | 1361 }; |
| 1362 | 1362 |
| 1363 | 1363 |
| 1364 class LDoubleToIntOrSmi FINAL : public LTemplateInstruction<1, 1, 0> { | 1364 class LDoubleToIntOrSmi final : public LTemplateInstruction<1, 1, 0> { |
| 1365 public: | 1365 public: |
| 1366 explicit LDoubleToIntOrSmi(LOperand* value) { | 1366 explicit LDoubleToIntOrSmi(LOperand* value) { |
| 1367 inputs_[0] = value; | 1367 inputs_[0] = value; |
| 1368 } | 1368 } |
| 1369 | 1369 |
| 1370 LOperand* value() { return inputs_[0]; } | 1370 LOperand* value() { return inputs_[0]; } |
| 1371 | 1371 |
| 1372 DECLARE_CONCRETE_INSTRUCTION(DoubleToIntOrSmi, "double-to-int-or-smi") | 1372 DECLARE_CONCRETE_INSTRUCTION(DoubleToIntOrSmi, "double-to-int-or-smi") |
| 1373 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) | 1373 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) |
| 1374 | 1374 |
| 1375 bool tag_result() { return hydrogen()->representation().IsSmi(); } | 1375 bool tag_result() { return hydrogen()->representation().IsSmi(); } |
| 1376 }; | 1376 }; |
| 1377 | 1377 |
| 1378 | 1378 |
| 1379 class LForInCacheArray FINAL : public LTemplateInstruction<1, 1, 0> { | 1379 class LForInCacheArray final : public LTemplateInstruction<1, 1, 0> { |
| 1380 public: | 1380 public: |
| 1381 explicit LForInCacheArray(LOperand* map) { | 1381 explicit LForInCacheArray(LOperand* map) { |
| 1382 inputs_[0] = map; | 1382 inputs_[0] = map; |
| 1383 } | 1383 } |
| 1384 | 1384 |
| 1385 LOperand* map() { return inputs_[0]; } | 1385 LOperand* map() { return inputs_[0]; } |
| 1386 | 1386 |
| 1387 DECLARE_CONCRETE_INSTRUCTION(ForInCacheArray, "for-in-cache-array") | 1387 DECLARE_CONCRETE_INSTRUCTION(ForInCacheArray, "for-in-cache-array") |
| 1388 | 1388 |
| 1389 int idx() { | 1389 int idx() { |
| 1390 return HForInCacheArray::cast(this->hydrogen_value())->idx(); | 1390 return HForInCacheArray::cast(this->hydrogen_value())->idx(); |
| 1391 } | 1391 } |
| 1392 }; | 1392 }; |
| 1393 | 1393 |
| 1394 | 1394 |
| 1395 class LForInPrepareMap FINAL : public LTemplateInstruction<1, 2, 0> { | 1395 class LForInPrepareMap final : public LTemplateInstruction<1, 2, 0> { |
| 1396 public: | 1396 public: |
| 1397 LForInPrepareMap(LOperand* context, LOperand* object) { | 1397 LForInPrepareMap(LOperand* context, LOperand* object) { |
| 1398 inputs_[0] = context; | 1398 inputs_[0] = context; |
| 1399 inputs_[1] = object; | 1399 inputs_[1] = object; |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 LOperand* context() { return inputs_[0]; } | 1402 LOperand* context() { return inputs_[0]; } |
| 1403 LOperand* object() { return inputs_[1]; } | 1403 LOperand* object() { return inputs_[1]; } |
| 1404 | 1404 |
| 1405 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map") | 1405 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map") |
| 1406 }; | 1406 }; |
| 1407 | 1407 |
| 1408 | 1408 |
| 1409 class LGetCachedArrayIndex FINAL : public LTemplateInstruction<1, 1, 0> { | 1409 class LGetCachedArrayIndex final : public LTemplateInstruction<1, 1, 0> { |
| 1410 public: | 1410 public: |
| 1411 explicit LGetCachedArrayIndex(LOperand* value) { | 1411 explicit LGetCachedArrayIndex(LOperand* value) { |
| 1412 inputs_[0] = value; | 1412 inputs_[0] = value; |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 LOperand* value() { return inputs_[0]; } | 1415 LOperand* value() { return inputs_[0]; } |
| 1416 | 1416 |
| 1417 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") | 1417 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") |
| 1418 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) | 1418 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) |
| 1419 }; | 1419 }; |
| 1420 | 1420 |
| 1421 | 1421 |
| 1422 class LHasCachedArrayIndexAndBranch FINAL | 1422 class LHasCachedArrayIndexAndBranch final : public LControlInstruction<1, 1> { |
| 1423 : public LControlInstruction<1, 1> { | |
| 1424 public: | 1423 public: |
| 1425 LHasCachedArrayIndexAndBranch(LOperand* value, LOperand* temp) { | 1424 LHasCachedArrayIndexAndBranch(LOperand* value, LOperand* temp) { |
| 1426 inputs_[0] = value; | 1425 inputs_[0] = value; |
| 1427 temps_[0] = temp; | 1426 temps_[0] = temp; |
| 1428 } | 1427 } |
| 1429 | 1428 |
| 1430 LOperand* value() { return inputs_[0]; } | 1429 LOperand* value() { return inputs_[0]; } |
| 1431 LOperand* temp() { return temps_[0]; } | 1430 LOperand* temp() { return temps_[0]; } |
| 1432 | 1431 |
| 1433 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, | 1432 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, |
| 1434 "has-cached-array-index-and-branch") | 1433 "has-cached-array-index-and-branch") |
| 1435 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch) | 1434 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch) |
| 1436 | 1435 |
| 1437 void PrintDataTo(StringStream* stream) OVERRIDE; | 1436 void PrintDataTo(StringStream* stream) override; |
| 1438 }; | 1437 }; |
| 1439 | 1438 |
| 1440 | 1439 |
| 1441 class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 1> { | 1440 class LHasInstanceTypeAndBranch final : public LControlInstruction<1, 1> { |
| 1442 public: | 1441 public: |
| 1443 LHasInstanceTypeAndBranch(LOperand* value, LOperand* temp) { | 1442 LHasInstanceTypeAndBranch(LOperand* value, LOperand* temp) { |
| 1444 inputs_[0] = value; | 1443 inputs_[0] = value; |
| 1445 temps_[0] = temp; | 1444 temps_[0] = temp; |
| 1446 } | 1445 } |
| 1447 | 1446 |
| 1448 LOperand* value() { return inputs_[0]; } | 1447 LOperand* value() { return inputs_[0]; } |
| 1449 LOperand* temp() { return temps_[0]; } | 1448 LOperand* temp() { return temps_[0]; } |
| 1450 | 1449 |
| 1451 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, | 1450 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, |
| 1452 "has-instance-type-and-branch") | 1451 "has-instance-type-and-branch") |
| 1453 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) | 1452 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) |
| 1454 | 1453 |
| 1455 void PrintDataTo(StringStream* stream) OVERRIDE; | 1454 void PrintDataTo(StringStream* stream) override; |
| 1456 }; | 1455 }; |
| 1457 | 1456 |
| 1458 | 1457 |
| 1459 class LInnerAllocatedObject FINAL : public LTemplateInstruction<1, 2, 0> { | 1458 class LInnerAllocatedObject final : public LTemplateInstruction<1, 2, 0> { |
| 1460 public: | 1459 public: |
| 1461 LInnerAllocatedObject(LOperand* base_object, LOperand* offset) { | 1460 LInnerAllocatedObject(LOperand* base_object, LOperand* offset) { |
| 1462 inputs_[0] = base_object; | 1461 inputs_[0] = base_object; |
| 1463 inputs_[1] = offset; | 1462 inputs_[1] = offset; |
| 1464 } | 1463 } |
| 1465 | 1464 |
| 1466 LOperand* base_object() const { return inputs_[0]; } | 1465 LOperand* base_object() const { return inputs_[0]; } |
| 1467 LOperand* offset() const { return inputs_[1]; } | 1466 LOperand* offset() const { return inputs_[1]; } |
| 1468 | 1467 |
| 1469 void PrintDataTo(StringStream* stream) OVERRIDE; | 1468 void PrintDataTo(StringStream* stream) override; |
| 1470 | 1469 |
| 1471 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object") | 1470 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object") |
| 1472 }; | 1471 }; |
| 1473 | 1472 |
| 1474 | 1473 |
| 1475 class LInstanceOf FINAL : public LTemplateInstruction<1, 3, 0> { | 1474 class LInstanceOf final : public LTemplateInstruction<1, 3, 0> { |
| 1476 public: | 1475 public: |
| 1477 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { | 1476 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { |
| 1478 inputs_[0] = context; | 1477 inputs_[0] = context; |
| 1479 inputs_[1] = left; | 1478 inputs_[1] = left; |
| 1480 inputs_[2] = right; | 1479 inputs_[2] = right; |
| 1481 } | 1480 } |
| 1482 | 1481 |
| 1483 LOperand* context() { return inputs_[0]; } | 1482 LOperand* context() { return inputs_[0]; } |
| 1484 LOperand* left() { return inputs_[1]; } | 1483 LOperand* left() { return inputs_[1]; } |
| 1485 LOperand* right() { return inputs_[2]; } | 1484 LOperand* right() { return inputs_[2]; } |
| 1486 | 1485 |
| 1487 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") | 1486 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") |
| 1488 }; | 1487 }; |
| 1489 | 1488 |
| 1490 | 1489 |
| 1491 class LInstanceOfKnownGlobal FINAL : public LTemplateInstruction<1, 2, 0> { | 1490 class LInstanceOfKnownGlobal final : public LTemplateInstruction<1, 2, 0> { |
| 1492 public: | 1491 public: |
| 1493 LInstanceOfKnownGlobal(LOperand* context, LOperand* value) { | 1492 LInstanceOfKnownGlobal(LOperand* context, LOperand* value) { |
| 1494 inputs_[0] = context; | 1493 inputs_[0] = context; |
| 1495 inputs_[1] = value; | 1494 inputs_[1] = value; |
| 1496 } | 1495 } |
| 1497 | 1496 |
| 1498 LOperand* context() { return inputs_[0]; } | 1497 LOperand* context() { return inputs_[0]; } |
| 1499 LOperand* value() { return inputs_[1]; } | 1498 LOperand* value() { return inputs_[1]; } |
| 1500 | 1499 |
| 1501 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, | 1500 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, |
| 1502 "instance-of-known-global") | 1501 "instance-of-known-global") |
| 1503 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) | 1502 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) |
| 1504 | 1503 |
| 1505 Handle<JSFunction> function() const { return hydrogen()->function(); } | 1504 Handle<JSFunction> function() const { return hydrogen()->function(); } |
| 1506 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { | 1505 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { |
| 1507 return lazy_deopt_env_; | 1506 return lazy_deopt_env_; |
| 1508 } | 1507 } |
| 1509 virtual void SetDeferredLazyDeoptimizationEnvironment( | 1508 virtual void SetDeferredLazyDeoptimizationEnvironment( |
| 1510 LEnvironment* env) OVERRIDE { | 1509 LEnvironment* env) override { |
| 1511 lazy_deopt_env_ = env; | 1510 lazy_deopt_env_ = env; |
| 1512 } | 1511 } |
| 1513 | 1512 |
| 1514 private: | 1513 private: |
| 1515 LEnvironment* lazy_deopt_env_; | 1514 LEnvironment* lazy_deopt_env_; |
| 1516 }; | 1515 }; |
| 1517 | 1516 |
| 1518 | 1517 |
| 1519 class LInteger32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> { | 1518 class LInteger32ToDouble final : public LTemplateInstruction<1, 1, 0> { |
| 1520 public: | 1519 public: |
| 1521 explicit LInteger32ToDouble(LOperand* value) { | 1520 explicit LInteger32ToDouble(LOperand* value) { |
| 1522 inputs_[0] = value; | 1521 inputs_[0] = value; |
| 1523 } | 1522 } |
| 1524 | 1523 |
| 1525 LOperand* value() { return inputs_[0]; } | 1524 LOperand* value() { return inputs_[0]; } |
| 1526 | 1525 |
| 1527 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") | 1526 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") |
| 1528 }; | 1527 }; |
| 1529 | 1528 |
| 1530 | 1529 |
| 1531 class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> { | 1530 class LCallWithDescriptor final : public LTemplateResultInstruction<1> { |
| 1532 public: | 1531 public: |
| 1533 LCallWithDescriptor(CallInterfaceDescriptor descriptor, | 1532 LCallWithDescriptor(CallInterfaceDescriptor descriptor, |
| 1534 const ZoneList<LOperand*>& operands, Zone* zone) | 1533 const ZoneList<LOperand*>& operands, Zone* zone) |
| 1535 : descriptor_(descriptor), | 1534 : descriptor_(descriptor), |
| 1536 inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { | 1535 inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { |
| 1537 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); | 1536 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); |
| 1538 inputs_.AddAll(operands, zone); | 1537 inputs_.AddAll(operands, zone); |
| 1539 } | 1538 } |
| 1540 | 1539 |
| 1541 LOperand* target() const { return inputs_[0]; } | 1540 LOperand* target() const { return inputs_[0]; } |
| 1542 | 1541 |
| 1543 CallInterfaceDescriptor descriptor() { return descriptor_; } | 1542 CallInterfaceDescriptor descriptor() { return descriptor_; } |
| 1544 | 1543 |
| 1545 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) | 1544 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) |
| 1546 | 1545 |
| 1547 private: | 1546 private: |
| 1548 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") | 1547 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") |
| 1549 | 1548 |
| 1550 void PrintDataTo(StringStream* stream) OVERRIDE; | 1549 void PrintDataTo(StringStream* stream) override; |
| 1551 | 1550 |
| 1552 int arity() const { return hydrogen()->argument_count() - 1; } | 1551 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1553 | 1552 |
| 1554 CallInterfaceDescriptor descriptor_; | 1553 CallInterfaceDescriptor descriptor_; |
| 1555 ZoneList<LOperand*> inputs_; | 1554 ZoneList<LOperand*> inputs_; |
| 1556 | 1555 |
| 1557 // Iterator support. | 1556 // Iterator support. |
| 1558 int InputCount() FINAL { return inputs_.length(); } | 1557 int InputCount() final { return inputs_.length(); } |
| 1559 LOperand* InputAt(int i) FINAL { return inputs_[i]; } | 1558 LOperand* InputAt(int i) final { return inputs_[i]; } |
| 1560 | 1559 |
| 1561 int TempCount() FINAL { return 0; } | 1560 int TempCount() final { return 0; } |
| 1562 LOperand* TempAt(int i) FINAL { return NULL; } | 1561 LOperand* TempAt(int i) final { return NULL; } |
| 1563 }; | 1562 }; |
| 1564 | 1563 |
| 1565 | 1564 |
| 1566 class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> { | 1565 class LInvokeFunction final : public LTemplateInstruction<1, 2, 0> { |
| 1567 public: | 1566 public: |
| 1568 LInvokeFunction(LOperand* context, LOperand* function) { | 1567 LInvokeFunction(LOperand* context, LOperand* function) { |
| 1569 inputs_[0] = context; | 1568 inputs_[0] = context; |
| 1570 inputs_[1] = function; | 1569 inputs_[1] = function; |
| 1571 } | 1570 } |
| 1572 | 1571 |
| 1573 LOperand* context() { return inputs_[0]; } | 1572 LOperand* context() { return inputs_[0]; } |
| 1574 LOperand* function() { return inputs_[1]; } | 1573 LOperand* function() { return inputs_[1]; } |
| 1575 | 1574 |
| 1576 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") | 1575 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") |
| 1577 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) | 1576 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) |
| 1578 | 1577 |
| 1579 void PrintDataTo(StringStream* stream) OVERRIDE; | 1578 void PrintDataTo(StringStream* stream) override; |
| 1580 | 1579 |
| 1581 int arity() const { return hydrogen()->argument_count() - 1; } | 1580 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1582 }; | 1581 }; |
| 1583 | 1582 |
| 1584 | 1583 |
| 1585 class LIsConstructCallAndBranch FINAL : public LControlInstruction<0, 2> { | 1584 class LIsConstructCallAndBranch final : public LControlInstruction<0, 2> { |
| 1586 public: | 1585 public: |
| 1587 LIsConstructCallAndBranch(LOperand* temp1, LOperand* temp2) { | 1586 LIsConstructCallAndBranch(LOperand* temp1, LOperand* temp2) { |
| 1588 temps_[0] = temp1; | 1587 temps_[0] = temp1; |
| 1589 temps_[1] = temp2; | 1588 temps_[1] = temp2; |
| 1590 } | 1589 } |
| 1591 | 1590 |
| 1592 LOperand* temp1() { return temps_[0]; } | 1591 LOperand* temp1() { return temps_[0]; } |
| 1593 LOperand* temp2() { return temps_[1]; } | 1592 LOperand* temp2() { return temps_[1]; } |
| 1594 | 1593 |
| 1595 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, | 1594 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, |
| 1596 "is-construct-call-and-branch") | 1595 "is-construct-call-and-branch") |
| 1597 }; | 1596 }; |
| 1598 | 1597 |
| 1599 | 1598 |
| 1600 class LIsObjectAndBranch FINAL : public LControlInstruction<1, 2> { | 1599 class LIsObjectAndBranch final : public LControlInstruction<1, 2> { |
| 1601 public: | 1600 public: |
| 1602 LIsObjectAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) { | 1601 LIsObjectAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) { |
| 1603 inputs_[0] = value; | 1602 inputs_[0] = value; |
| 1604 temps_[0] = temp1; | 1603 temps_[0] = temp1; |
| 1605 temps_[1] = temp2; | 1604 temps_[1] = temp2; |
| 1606 } | 1605 } |
| 1607 | 1606 |
| 1608 LOperand* value() { return inputs_[0]; } | 1607 LOperand* value() { return inputs_[0]; } |
| 1609 LOperand* temp1() { return temps_[0]; } | 1608 LOperand* temp1() { return temps_[0]; } |
| 1610 LOperand* temp2() { return temps_[1]; } | 1609 LOperand* temp2() { return temps_[1]; } |
| 1611 | 1610 |
| 1612 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") | 1611 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") |
| 1613 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) | 1612 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) |
| 1614 | 1613 |
| 1615 void PrintDataTo(StringStream* stream) OVERRIDE; | 1614 void PrintDataTo(StringStream* stream) override; |
| 1616 }; | 1615 }; |
| 1617 | 1616 |
| 1618 | 1617 |
| 1619 class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> { | 1618 class LIsStringAndBranch final : public LControlInstruction<1, 1> { |
| 1620 public: | 1619 public: |
| 1621 LIsStringAndBranch(LOperand* value, LOperand* temp) { | 1620 LIsStringAndBranch(LOperand* value, LOperand* temp) { |
| 1622 inputs_[0] = value; | 1621 inputs_[0] = value; |
| 1623 temps_[0] = temp; | 1622 temps_[0] = temp; |
| 1624 } | 1623 } |
| 1625 | 1624 |
| 1626 LOperand* value() { return inputs_[0]; } | 1625 LOperand* value() { return inputs_[0]; } |
| 1627 LOperand* temp() { return temps_[0]; } | 1626 LOperand* temp() { return temps_[0]; } |
| 1628 | 1627 |
| 1629 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") | 1628 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") |
| 1630 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) | 1629 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) |
| 1631 | 1630 |
| 1632 void PrintDataTo(StringStream* stream) OVERRIDE; | 1631 void PrintDataTo(StringStream* stream) override; |
| 1633 }; | 1632 }; |
| 1634 | 1633 |
| 1635 | 1634 |
| 1636 class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> { | 1635 class LIsSmiAndBranch final : public LControlInstruction<1, 0> { |
| 1637 public: | 1636 public: |
| 1638 explicit LIsSmiAndBranch(LOperand* value) { | 1637 explicit LIsSmiAndBranch(LOperand* value) { |
| 1639 inputs_[0] = value; | 1638 inputs_[0] = value; |
| 1640 } | 1639 } |
| 1641 | 1640 |
| 1642 LOperand* value() { return inputs_[0]; } | 1641 LOperand* value() { return inputs_[0]; } |
| 1643 | 1642 |
| 1644 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") | 1643 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") |
| 1645 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) | 1644 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) |
| 1646 | 1645 |
| 1647 void PrintDataTo(StringStream* stream) OVERRIDE; | 1646 void PrintDataTo(StringStream* stream) override; |
| 1648 }; | 1647 }; |
| 1649 | 1648 |
| 1650 | 1649 |
| 1651 class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> { | 1650 class LIsUndetectableAndBranch final : public LControlInstruction<1, 1> { |
| 1652 public: | 1651 public: |
| 1653 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { | 1652 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { |
| 1654 inputs_[0] = value; | 1653 inputs_[0] = value; |
| 1655 temps_[0] = temp; | 1654 temps_[0] = temp; |
| 1656 } | 1655 } |
| 1657 | 1656 |
| 1658 LOperand* value() { return inputs_[0]; } | 1657 LOperand* value() { return inputs_[0]; } |
| 1659 LOperand* temp() { return temps_[0]; } | 1658 LOperand* temp() { return temps_[0]; } |
| 1660 | 1659 |
| 1661 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, | 1660 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, |
| 1662 "is-undetectable-and-branch") | 1661 "is-undetectable-and-branch") |
| 1663 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) | 1662 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) |
| 1664 | 1663 |
| 1665 void PrintDataTo(StringStream* stream) OVERRIDE; | 1664 void PrintDataTo(StringStream* stream) override; |
| 1666 }; | 1665 }; |
| 1667 | 1666 |
| 1668 | 1667 |
| 1669 class LLoadContextSlot FINAL : public LTemplateInstruction<1, 1, 0> { | 1668 class LLoadContextSlot final : public LTemplateInstruction<1, 1, 0> { |
| 1670 public: | 1669 public: |
| 1671 explicit LLoadContextSlot(LOperand* context) { | 1670 explicit LLoadContextSlot(LOperand* context) { |
| 1672 inputs_[0] = context; | 1671 inputs_[0] = context; |
| 1673 } | 1672 } |
| 1674 | 1673 |
| 1675 LOperand* context() { return inputs_[0]; } | 1674 LOperand* context() { return inputs_[0]; } |
| 1676 | 1675 |
| 1677 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") | 1676 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") |
| 1678 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) | 1677 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) |
| 1679 | 1678 |
| 1680 int slot_index() const { return hydrogen()->slot_index(); } | 1679 int slot_index() const { return hydrogen()->slot_index(); } |
| 1681 | 1680 |
| 1682 void PrintDataTo(StringStream* stream) OVERRIDE; | 1681 void PrintDataTo(StringStream* stream) override; |
| 1683 }; | 1682 }; |
| 1684 | 1683 |
| 1685 | 1684 |
| 1686 class LLoadNamedField FINAL : public LTemplateInstruction<1, 1, 0> { | 1685 class LLoadNamedField final : public LTemplateInstruction<1, 1, 0> { |
| 1687 public: | 1686 public: |
| 1688 explicit LLoadNamedField(LOperand* object) { | 1687 explicit LLoadNamedField(LOperand* object) { |
| 1689 inputs_[0] = object; | 1688 inputs_[0] = object; |
| 1690 } | 1689 } |
| 1691 | 1690 |
| 1692 LOperand* object() { return inputs_[0]; } | 1691 LOperand* object() { return inputs_[0]; } |
| 1693 | 1692 |
| 1694 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") | 1693 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") |
| 1695 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) | 1694 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) |
| 1696 }; | 1695 }; |
| 1697 | 1696 |
| 1698 | 1697 |
| 1699 class LFunctionLiteral FINAL : public LTemplateInstruction<1, 1, 0> { | 1698 class LFunctionLiteral final : public LTemplateInstruction<1, 1, 0> { |
| 1700 public: | 1699 public: |
| 1701 explicit LFunctionLiteral(LOperand* context) { | 1700 explicit LFunctionLiteral(LOperand* context) { |
| 1702 inputs_[0] = context; | 1701 inputs_[0] = context; |
| 1703 } | 1702 } |
| 1704 | 1703 |
| 1705 LOperand* context() { return inputs_[0]; } | 1704 LOperand* context() { return inputs_[0]; } |
| 1706 | 1705 |
| 1707 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") | 1706 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") |
| 1708 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) | 1707 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) |
| 1709 }; | 1708 }; |
| 1710 | 1709 |
| 1711 | 1710 |
| 1712 class LLoadFunctionPrototype FINAL : public LTemplateInstruction<1, 1, 1> { | 1711 class LLoadFunctionPrototype final : public LTemplateInstruction<1, 1, 1> { |
| 1713 public: | 1712 public: |
| 1714 LLoadFunctionPrototype(LOperand* function, LOperand* temp) { | 1713 LLoadFunctionPrototype(LOperand* function, LOperand* temp) { |
| 1715 inputs_[0] = function; | 1714 inputs_[0] = function; |
| 1716 temps_[0] = temp; | 1715 temps_[0] = temp; |
| 1717 } | 1716 } |
| 1718 | 1717 |
| 1719 LOperand* function() { return inputs_[0]; } | 1718 LOperand* function() { return inputs_[0]; } |
| 1720 LOperand* temp() { return temps_[0]; } | 1719 LOperand* temp() { return temps_[0]; } |
| 1721 | 1720 |
| 1722 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype") | 1721 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype") |
| 1723 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype) | 1722 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype) |
| 1724 }; | 1723 }; |
| 1725 | 1724 |
| 1726 | 1725 |
| 1727 class LLoadGlobalGeneric FINAL : public LTemplateInstruction<1, 2, 1> { | 1726 class LLoadGlobalGeneric final : public LTemplateInstruction<1, 2, 1> { |
| 1728 public: | 1727 public: |
| 1729 LLoadGlobalGeneric(LOperand* context, LOperand* global_object, | 1728 LLoadGlobalGeneric(LOperand* context, LOperand* global_object, |
| 1730 LOperand* vector) { | 1729 LOperand* vector) { |
| 1731 inputs_[0] = context; | 1730 inputs_[0] = context; |
| 1732 inputs_[1] = global_object; | 1731 inputs_[1] = global_object; |
| 1733 temps_[0] = vector; | 1732 temps_[0] = vector; |
| 1734 } | 1733 } |
| 1735 | 1734 |
| 1736 LOperand* context() { return inputs_[0]; } | 1735 LOperand* context() { return inputs_[0]; } |
| 1737 LOperand* global_object() { return inputs_[1]; } | 1736 LOperand* global_object() { return inputs_[1]; } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1763 } | 1762 } |
| 1764 bool is_fixed_typed_array() const { | 1763 bool is_fixed_typed_array() const { |
| 1765 return hydrogen()->is_fixed_typed_array(); | 1764 return hydrogen()->is_fixed_typed_array(); |
| 1766 } | 1765 } |
| 1767 bool is_typed_elements() const { | 1766 bool is_typed_elements() const { |
| 1768 return is_external() || is_fixed_typed_array(); | 1767 return is_external() || is_fixed_typed_array(); |
| 1769 } | 1768 } |
| 1770 uint32_t base_offset() const { | 1769 uint32_t base_offset() const { |
| 1771 return this->hydrogen()->base_offset(); | 1770 return this->hydrogen()->base_offset(); |
| 1772 } | 1771 } |
| 1773 void PrintDataTo(StringStream* stream) OVERRIDE { | 1772 void PrintDataTo(StringStream* stream) override { |
| 1774 this->elements()->PrintTo(stream); | 1773 this->elements()->PrintTo(stream); |
| 1775 stream->Add("["); | 1774 stream->Add("["); |
| 1776 this->key()->PrintTo(stream); | 1775 this->key()->PrintTo(stream); |
| 1777 if (this->base_offset() != 0) { | 1776 if (this->base_offset() != 0) { |
| 1778 stream->Add(" + %d]", this->base_offset()); | 1777 stream->Add(" + %d]", this->base_offset()); |
| 1779 } else { | 1778 } else { |
| 1780 stream->Add("]"); | 1779 stream->Add("]"); |
| 1781 } | 1780 } |
| 1782 } | 1781 } |
| 1783 | 1782 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1817 LLoadKeyed<1>(elements, key) { | 1816 LLoadKeyed<1>(elements, key) { |
| 1818 temps_[0] = temp; | 1817 temps_[0] = temp; |
| 1819 } | 1818 } |
| 1820 | 1819 |
| 1821 LOperand* temp() { return temps_[0]; } | 1820 LOperand* temp() { return temps_[0]; } |
| 1822 | 1821 |
| 1823 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFixedDouble, "load-keyed-fixed-double"); | 1822 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFixedDouble, "load-keyed-fixed-double"); |
| 1824 }; | 1823 }; |
| 1825 | 1824 |
| 1826 | 1825 |
| 1827 class LLoadKeyedGeneric FINAL : public LTemplateInstruction<1, 3, 1> { | 1826 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> { |
| 1828 public: | 1827 public: |
| 1829 LLoadKeyedGeneric(LOperand* context, LOperand* object, LOperand* key, | 1828 LLoadKeyedGeneric(LOperand* context, LOperand* object, LOperand* key, |
| 1830 LOperand* vector) { | 1829 LOperand* vector) { |
| 1831 inputs_[0] = context; | 1830 inputs_[0] = context; |
| 1832 inputs_[1] = object; | 1831 inputs_[1] = object; |
| 1833 inputs_[2] = key; | 1832 inputs_[2] = key; |
| 1834 temps_[0] = vector; | 1833 temps_[0] = vector; |
| 1835 } | 1834 } |
| 1836 | 1835 |
| 1837 LOperand* context() { return inputs_[0]; } | 1836 LOperand* context() { return inputs_[0]; } |
| 1838 LOperand* object() { return inputs_[1]; } | 1837 LOperand* object() { return inputs_[1]; } |
| 1839 LOperand* key() { return inputs_[2]; } | 1838 LOperand* key() { return inputs_[2]; } |
| 1840 LOperand* temp_vector() { return temps_[0]; } | 1839 LOperand* temp_vector() { return temps_[0]; } |
| 1841 | 1840 |
| 1842 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") | 1841 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") |
| 1843 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedGeneric) | 1842 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedGeneric) |
| 1844 }; | 1843 }; |
| 1845 | 1844 |
| 1846 | 1845 |
| 1847 class LLoadNamedGeneric FINAL : public LTemplateInstruction<1, 2, 1> { | 1846 class LLoadNamedGeneric final : public LTemplateInstruction<1, 2, 1> { |
| 1848 public: | 1847 public: |
| 1849 LLoadNamedGeneric(LOperand* context, LOperand* object, LOperand* vector) { | 1848 LLoadNamedGeneric(LOperand* context, LOperand* object, LOperand* vector) { |
| 1850 inputs_[0] = context; | 1849 inputs_[0] = context; |
| 1851 inputs_[1] = object; | 1850 inputs_[1] = object; |
| 1852 temps_[0] = vector; | 1851 temps_[0] = vector; |
| 1853 } | 1852 } |
| 1854 | 1853 |
| 1855 LOperand* context() { return inputs_[0]; } | 1854 LOperand* context() { return inputs_[0]; } |
| 1856 LOperand* object() { return inputs_[1]; } | 1855 LOperand* object() { return inputs_[1]; } |
| 1857 LOperand* temp_vector() { return temps_[0]; } | 1856 LOperand* temp_vector() { return temps_[0]; } |
| 1858 | 1857 |
| 1859 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") | 1858 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") |
| 1860 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) | 1859 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) |
| 1861 | 1860 |
| 1862 Handle<Object> name() const { return hydrogen()->name(); } | 1861 Handle<Object> name() const { return hydrogen()->name(); } |
| 1863 }; | 1862 }; |
| 1864 | 1863 |
| 1865 | 1864 |
| 1866 class LLoadRoot FINAL : public LTemplateInstruction<1, 0, 0> { | 1865 class LLoadRoot final : public LTemplateInstruction<1, 0, 0> { |
| 1867 public: | 1866 public: |
| 1868 DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") | 1867 DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") |
| 1869 DECLARE_HYDROGEN_ACCESSOR(LoadRoot) | 1868 DECLARE_HYDROGEN_ACCESSOR(LoadRoot) |
| 1870 | 1869 |
| 1871 Heap::RootListIndex index() const { return hydrogen()->index(); } | 1870 Heap::RootListIndex index() const { return hydrogen()->index(); } |
| 1872 }; | 1871 }; |
| 1873 | 1872 |
| 1874 | 1873 |
| 1875 class LMapEnumLength FINAL : public LTemplateInstruction<1, 1, 0> { | 1874 class LMapEnumLength final : public LTemplateInstruction<1, 1, 0> { |
| 1876 public: | 1875 public: |
| 1877 explicit LMapEnumLength(LOperand* value) { | 1876 explicit LMapEnumLength(LOperand* value) { |
| 1878 inputs_[0] = value; | 1877 inputs_[0] = value; |
| 1879 } | 1878 } |
| 1880 | 1879 |
| 1881 LOperand* value() { return inputs_[0]; } | 1880 LOperand* value() { return inputs_[0]; } |
| 1882 | 1881 |
| 1883 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") | 1882 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") |
| 1884 }; | 1883 }; |
| 1885 | 1884 |
| 1886 | 1885 |
| 1887 template<int T> | 1886 template<int T> |
| 1888 class LUnaryMathOperation : public LTemplateInstruction<1, 1, T> { | 1887 class LUnaryMathOperation : public LTemplateInstruction<1, 1, T> { |
| 1889 public: | 1888 public: |
| 1890 explicit LUnaryMathOperation(LOperand* value) { | 1889 explicit LUnaryMathOperation(LOperand* value) { |
| 1891 this->inputs_[0] = value; | 1890 this->inputs_[0] = value; |
| 1892 } | 1891 } |
| 1893 | 1892 |
| 1894 LOperand* value() { return this->inputs_[0]; } | 1893 LOperand* value() { return this->inputs_[0]; } |
| 1895 BuiltinFunctionId op() const { return this->hydrogen()->op(); } | 1894 BuiltinFunctionId op() const { return this->hydrogen()->op(); } |
| 1896 | 1895 |
| 1897 void PrintDataTo(StringStream* stream) OVERRIDE; | 1896 void PrintDataTo(StringStream* stream) override; |
| 1898 | 1897 |
| 1899 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) | 1898 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) |
| 1900 }; | 1899 }; |
| 1901 | 1900 |
| 1902 | 1901 |
| 1903 class LMathAbs FINAL : public LUnaryMathOperation<0> { | 1902 class LMathAbs final : public LUnaryMathOperation<0> { |
| 1904 public: | 1903 public: |
| 1905 explicit LMathAbs(LOperand* value) : LUnaryMathOperation<0>(value) {} | 1904 explicit LMathAbs(LOperand* value) : LUnaryMathOperation<0>(value) {} |
| 1906 | 1905 |
| 1907 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs") | 1906 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs") |
| 1908 }; | 1907 }; |
| 1909 | 1908 |
| 1910 | 1909 |
| 1911 class LMathAbsTagged: public LTemplateInstruction<1, 2, 3> { | 1910 class LMathAbsTagged: public LTemplateInstruction<1, 2, 3> { |
| 1912 public: | 1911 public: |
| 1913 LMathAbsTagged(LOperand* context, LOperand* value, | 1912 LMathAbsTagged(LOperand* context, LOperand* value, |
| 1914 LOperand* temp1, LOperand* temp2, LOperand* temp3) { | 1913 LOperand* temp1, LOperand* temp2, LOperand* temp3) { |
| 1915 inputs_[0] = context; | 1914 inputs_[0] = context; |
| 1916 inputs_[1] = value; | 1915 inputs_[1] = value; |
| 1917 temps_[0] = temp1; | 1916 temps_[0] = temp1; |
| 1918 temps_[1] = temp2; | 1917 temps_[1] = temp2; |
| 1919 temps_[2] = temp3; | 1918 temps_[2] = temp3; |
| 1920 } | 1919 } |
| 1921 | 1920 |
| 1922 LOperand* context() { return inputs_[0]; } | 1921 LOperand* context() { return inputs_[0]; } |
| 1923 LOperand* value() { return inputs_[1]; } | 1922 LOperand* value() { return inputs_[1]; } |
| 1924 LOperand* temp1() { return temps_[0]; } | 1923 LOperand* temp1() { return temps_[0]; } |
| 1925 LOperand* temp2() { return temps_[1]; } | 1924 LOperand* temp2() { return temps_[1]; } |
| 1926 LOperand* temp3() { return temps_[2]; } | 1925 LOperand* temp3() { return temps_[2]; } |
| 1927 | 1926 |
| 1928 DECLARE_CONCRETE_INSTRUCTION(MathAbsTagged, "math-abs-tagged") | 1927 DECLARE_CONCRETE_INSTRUCTION(MathAbsTagged, "math-abs-tagged") |
| 1929 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) | 1928 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) |
| 1930 }; | 1929 }; |
| 1931 | 1930 |
| 1932 | 1931 |
| 1933 class LMathExp FINAL : public LUnaryMathOperation<4> { | 1932 class LMathExp final : public LUnaryMathOperation<4> { |
| 1934 public: | 1933 public: |
| 1935 LMathExp(LOperand* value, | 1934 LMathExp(LOperand* value, |
| 1936 LOperand* double_temp1, | 1935 LOperand* double_temp1, |
| 1937 LOperand* temp1, | 1936 LOperand* temp1, |
| 1938 LOperand* temp2, | 1937 LOperand* temp2, |
| 1939 LOperand* temp3) | 1938 LOperand* temp3) |
| 1940 : LUnaryMathOperation<4>(value) { | 1939 : LUnaryMathOperation<4>(value) { |
| 1941 temps_[0] = double_temp1; | 1940 temps_[0] = double_temp1; |
| 1942 temps_[1] = temp1; | 1941 temps_[1] = temp1; |
| 1943 temps_[2] = temp2; | 1942 temps_[2] = temp2; |
| 1944 temps_[3] = temp3; | 1943 temps_[3] = temp3; |
| 1945 ExternalReference::InitializeMathExpData(); | 1944 ExternalReference::InitializeMathExpData(); |
| 1946 } | 1945 } |
| 1947 | 1946 |
| 1948 LOperand* double_temp1() { return temps_[0]; } | 1947 LOperand* double_temp1() { return temps_[0]; } |
| 1949 LOperand* temp1() { return temps_[1]; } | 1948 LOperand* temp1() { return temps_[1]; } |
| 1950 LOperand* temp2() { return temps_[2]; } | 1949 LOperand* temp2() { return temps_[2]; } |
| 1951 LOperand* temp3() { return temps_[3]; } | 1950 LOperand* temp3() { return temps_[3]; } |
| 1952 | 1951 |
| 1953 DECLARE_CONCRETE_INSTRUCTION(MathExp, "math-exp") | 1952 DECLARE_CONCRETE_INSTRUCTION(MathExp, "math-exp") |
| 1954 }; | 1953 }; |
| 1955 | 1954 |
| 1956 | 1955 |
| 1957 // Math.floor with a double result. | 1956 // Math.floor with a double result. |
| 1958 class LMathFloorD FINAL : public LUnaryMathOperation<0> { | 1957 class LMathFloorD final : public LUnaryMathOperation<0> { |
| 1959 public: | 1958 public: |
| 1960 explicit LMathFloorD(LOperand* value) : LUnaryMathOperation<0>(value) { } | 1959 explicit LMathFloorD(LOperand* value) : LUnaryMathOperation<0>(value) { } |
| 1961 DECLARE_CONCRETE_INSTRUCTION(MathFloorD, "math-floor-d") | 1960 DECLARE_CONCRETE_INSTRUCTION(MathFloorD, "math-floor-d") |
| 1962 }; | 1961 }; |
| 1963 | 1962 |
| 1964 | 1963 |
| 1965 // Math.floor with an integer result. | 1964 // Math.floor with an integer result. |
| 1966 class LMathFloorI FINAL : public LUnaryMathOperation<0> { | 1965 class LMathFloorI final : public LUnaryMathOperation<0> { |
| 1967 public: | 1966 public: |
| 1968 explicit LMathFloorI(LOperand* value) : LUnaryMathOperation<0>(value) { } | 1967 explicit LMathFloorI(LOperand* value) : LUnaryMathOperation<0>(value) { } |
| 1969 DECLARE_CONCRETE_INSTRUCTION(MathFloorI, "math-floor-i") | 1968 DECLARE_CONCRETE_INSTRUCTION(MathFloorI, "math-floor-i") |
| 1970 }; | 1969 }; |
| 1971 | 1970 |
| 1972 | 1971 |
| 1973 class LFlooringDivByPowerOf2I FINAL : public LTemplateInstruction<1, 1, 0> { | 1972 class LFlooringDivByPowerOf2I final : public LTemplateInstruction<1, 1, 0> { |
| 1974 public: | 1973 public: |
| 1975 LFlooringDivByPowerOf2I(LOperand* dividend, int32_t divisor) { | 1974 LFlooringDivByPowerOf2I(LOperand* dividend, int32_t divisor) { |
| 1976 inputs_[0] = dividend; | 1975 inputs_[0] = dividend; |
| 1977 divisor_ = divisor; | 1976 divisor_ = divisor; |
| 1978 } | 1977 } |
| 1979 | 1978 |
| 1980 LOperand* dividend() { return inputs_[0]; } | 1979 LOperand* dividend() { return inputs_[0]; } |
| 1981 int32_t divisor() const { return divisor_; } | 1980 int32_t divisor() const { return divisor_; } |
| 1982 | 1981 |
| 1983 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, | 1982 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, |
| 1984 "flooring-div-by-power-of-2-i") | 1983 "flooring-div-by-power-of-2-i") |
| 1985 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 1984 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
| 1986 | 1985 |
| 1987 private: | 1986 private: |
| 1988 int32_t divisor_; | 1987 int32_t divisor_; |
| 1989 }; | 1988 }; |
| 1990 | 1989 |
| 1991 | 1990 |
| 1992 class LFlooringDivByConstI FINAL : public LTemplateInstruction<1, 1, 2> { | 1991 class LFlooringDivByConstI final : public LTemplateInstruction<1, 1, 2> { |
| 1993 public: | 1992 public: |
| 1994 LFlooringDivByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) { | 1993 LFlooringDivByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) { |
| 1995 inputs_[0] = dividend; | 1994 inputs_[0] = dividend; |
| 1996 divisor_ = divisor; | 1995 divisor_ = divisor; |
| 1997 temps_[0] = temp; | 1996 temps_[0] = temp; |
| 1998 } | 1997 } |
| 1999 | 1998 |
| 2000 LOperand* dividend() { return inputs_[0]; } | 1999 LOperand* dividend() { return inputs_[0]; } |
| 2001 int32_t divisor() const { return divisor_; } | 2000 int32_t divisor() const { return divisor_; } |
| 2002 LOperand* temp() { return temps_[0]; } | 2001 LOperand* temp() { return temps_[0]; } |
| 2003 | 2002 |
| 2004 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") | 2003 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") |
| 2005 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 2004 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
| 2006 | 2005 |
| 2007 private: | 2006 private: |
| 2008 int32_t divisor_; | 2007 int32_t divisor_; |
| 2009 }; | 2008 }; |
| 2010 | 2009 |
| 2011 | 2010 |
| 2012 class LFlooringDivI FINAL : public LTemplateInstruction<1, 2, 1> { | 2011 class LFlooringDivI final : public LTemplateInstruction<1, 2, 1> { |
| 2013 public: | 2012 public: |
| 2014 LFlooringDivI(LOperand* dividend, LOperand* divisor, LOperand* temp) { | 2013 LFlooringDivI(LOperand* dividend, LOperand* divisor, LOperand* temp) { |
| 2015 inputs_[0] = dividend; | 2014 inputs_[0] = dividend; |
| 2016 inputs_[1] = divisor; | 2015 inputs_[1] = divisor; |
| 2017 temps_[0] = temp; | 2016 temps_[0] = temp; |
| 2018 } | 2017 } |
| 2019 | 2018 |
| 2020 LOperand* dividend() { return inputs_[0]; } | 2019 LOperand* dividend() { return inputs_[0]; } |
| 2021 LOperand* divisor() { return inputs_[1]; } | 2020 LOperand* divisor() { return inputs_[1]; } |
| 2022 LOperand* temp() { return temps_[0]; } | 2021 LOperand* temp() { return temps_[0]; } |
| 2023 | 2022 |
| 2024 DECLARE_CONCRETE_INSTRUCTION(FlooringDivI, "flooring-div-i") | 2023 DECLARE_CONCRETE_INSTRUCTION(FlooringDivI, "flooring-div-i") |
| 2025 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) | 2024 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
| 2026 }; | 2025 }; |
| 2027 | 2026 |
| 2028 | 2027 |
| 2029 class LMathLog FINAL : public LUnaryMathOperation<0> { | 2028 class LMathLog final : public LUnaryMathOperation<0> { |
| 2030 public: | 2029 public: |
| 2031 explicit LMathLog(LOperand* value) : LUnaryMathOperation<0>(value) { } | 2030 explicit LMathLog(LOperand* value) : LUnaryMathOperation<0>(value) { } |
| 2032 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log") | 2031 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log") |
| 2033 }; | 2032 }; |
| 2034 | 2033 |
| 2035 | 2034 |
| 2036 class LMathClz32 FINAL : public LUnaryMathOperation<0> { | 2035 class LMathClz32 final : public LUnaryMathOperation<0> { |
| 2037 public: | 2036 public: |
| 2038 explicit LMathClz32(LOperand* value) : LUnaryMathOperation<0>(value) { } | 2037 explicit LMathClz32(LOperand* value) : LUnaryMathOperation<0>(value) { } |
| 2039 DECLARE_CONCRETE_INSTRUCTION(MathClz32, "math-clz32") | 2038 DECLARE_CONCRETE_INSTRUCTION(MathClz32, "math-clz32") |
| 2040 }; | 2039 }; |
| 2041 | 2040 |
| 2042 | 2041 |
| 2043 class LMathMinMax FINAL : public LTemplateInstruction<1, 2, 0> { | 2042 class LMathMinMax final : public LTemplateInstruction<1, 2, 0> { |
| 2044 public: | 2043 public: |
| 2045 LMathMinMax(LOperand* left, LOperand* right) { | 2044 LMathMinMax(LOperand* left, LOperand* right) { |
| 2046 inputs_[0] = left; | 2045 inputs_[0] = left; |
| 2047 inputs_[1] = right; | 2046 inputs_[1] = right; |
| 2048 } | 2047 } |
| 2049 | 2048 |
| 2050 LOperand* left() { return inputs_[0]; } | 2049 LOperand* left() { return inputs_[0]; } |
| 2051 LOperand* right() { return inputs_[1]; } | 2050 LOperand* right() { return inputs_[1]; } |
| 2052 | 2051 |
| 2053 DECLARE_CONCRETE_INSTRUCTION(MathMinMax, "math-min-max") | 2052 DECLARE_CONCRETE_INSTRUCTION(MathMinMax, "math-min-max") |
| 2054 DECLARE_HYDROGEN_ACCESSOR(MathMinMax) | 2053 DECLARE_HYDROGEN_ACCESSOR(MathMinMax) |
| 2055 }; | 2054 }; |
| 2056 | 2055 |
| 2057 | 2056 |
| 2058 class LMathPowHalf FINAL : public LUnaryMathOperation<0> { | 2057 class LMathPowHalf final : public LUnaryMathOperation<0> { |
| 2059 public: | 2058 public: |
| 2060 explicit LMathPowHalf(LOperand* value) : LUnaryMathOperation<0>(value) { } | 2059 explicit LMathPowHalf(LOperand* value) : LUnaryMathOperation<0>(value) { } |
| 2061 DECLARE_CONCRETE_INSTRUCTION(MathPowHalf, "math-pow-half") | 2060 DECLARE_CONCRETE_INSTRUCTION(MathPowHalf, "math-pow-half") |
| 2062 }; | 2061 }; |
| 2063 | 2062 |
| 2064 | 2063 |
| 2065 // Math.round with an integer result. | 2064 // Math.round with an integer result. |
| 2066 class LMathRoundD FINAL : public LUnaryMathOperation<0> { | 2065 class LMathRoundD final : public LUnaryMathOperation<0> { |
| 2067 public: | 2066 public: |
| 2068 explicit LMathRoundD(LOperand* value) | 2067 explicit LMathRoundD(LOperand* value) |
| 2069 : LUnaryMathOperation<0>(value) { | 2068 : LUnaryMathOperation<0>(value) { |
| 2070 } | 2069 } |
| 2071 | 2070 |
| 2072 DECLARE_CONCRETE_INSTRUCTION(MathRoundD, "math-round-d") | 2071 DECLARE_CONCRETE_INSTRUCTION(MathRoundD, "math-round-d") |
| 2073 }; | 2072 }; |
| 2074 | 2073 |
| 2075 | 2074 |
| 2076 // Math.round with an integer result. | 2075 // Math.round with an integer result. |
| 2077 class LMathRoundI FINAL : public LUnaryMathOperation<1> { | 2076 class LMathRoundI final : public LUnaryMathOperation<1> { |
| 2078 public: | 2077 public: |
| 2079 LMathRoundI(LOperand* value, LOperand* temp1) | 2078 LMathRoundI(LOperand* value, LOperand* temp1) |
| 2080 : LUnaryMathOperation<1>(value) { | 2079 : LUnaryMathOperation<1>(value) { |
| 2081 temps_[0] = temp1; | 2080 temps_[0] = temp1; |
| 2082 } | 2081 } |
| 2083 | 2082 |
| 2084 LOperand* temp1() { return temps_[0]; } | 2083 LOperand* temp1() { return temps_[0]; } |
| 2085 | 2084 |
| 2086 DECLARE_CONCRETE_INSTRUCTION(MathRoundI, "math-round-i") | 2085 DECLARE_CONCRETE_INSTRUCTION(MathRoundI, "math-round-i") |
| 2087 }; | 2086 }; |
| 2088 | 2087 |
| 2089 | 2088 |
| 2090 class LMathFround FINAL : public LUnaryMathOperation<0> { | 2089 class LMathFround final : public LUnaryMathOperation<0> { |
| 2091 public: | 2090 public: |
| 2092 explicit LMathFround(LOperand* value) : LUnaryMathOperation<0>(value) {} | 2091 explicit LMathFround(LOperand* value) : LUnaryMathOperation<0>(value) {} |
| 2093 | 2092 |
| 2094 DECLARE_CONCRETE_INSTRUCTION(MathFround, "math-fround") | 2093 DECLARE_CONCRETE_INSTRUCTION(MathFround, "math-fround") |
| 2095 }; | 2094 }; |
| 2096 | 2095 |
| 2097 | 2096 |
| 2098 class LMathSqrt FINAL : public LUnaryMathOperation<0> { | 2097 class LMathSqrt final : public LUnaryMathOperation<0> { |
| 2099 public: | 2098 public: |
| 2100 explicit LMathSqrt(LOperand* value) : LUnaryMathOperation<0>(value) { } | 2099 explicit LMathSqrt(LOperand* value) : LUnaryMathOperation<0>(value) { } |
| 2101 DECLARE_CONCRETE_INSTRUCTION(MathSqrt, "math-sqrt") | 2100 DECLARE_CONCRETE_INSTRUCTION(MathSqrt, "math-sqrt") |
| 2102 }; | 2101 }; |
| 2103 | 2102 |
| 2104 | 2103 |
| 2105 class LModByPowerOf2I FINAL : public LTemplateInstruction<1, 1, 0> { | 2104 class LModByPowerOf2I final : public LTemplateInstruction<1, 1, 0> { |
| 2106 public: | 2105 public: |
| 2107 LModByPowerOf2I(LOperand* dividend, int32_t divisor) { | 2106 LModByPowerOf2I(LOperand* dividend, int32_t divisor) { |
| 2108 inputs_[0] = dividend; | 2107 inputs_[0] = dividend; |
| 2109 divisor_ = divisor; | 2108 divisor_ = divisor; |
| 2110 } | 2109 } |
| 2111 | 2110 |
| 2112 LOperand* dividend() { return inputs_[0]; } | 2111 LOperand* dividend() { return inputs_[0]; } |
| 2113 int32_t divisor() const { return divisor_; } | 2112 int32_t divisor() const { return divisor_; } |
| 2114 | 2113 |
| 2115 DECLARE_CONCRETE_INSTRUCTION(ModByPowerOf2I, "mod-by-power-of-2-i") | 2114 DECLARE_CONCRETE_INSTRUCTION(ModByPowerOf2I, "mod-by-power-of-2-i") |
| 2116 DECLARE_HYDROGEN_ACCESSOR(Mod) | 2115 DECLARE_HYDROGEN_ACCESSOR(Mod) |
| 2117 | 2116 |
| 2118 private: | 2117 private: |
| 2119 int32_t divisor_; | 2118 int32_t divisor_; |
| 2120 }; | 2119 }; |
| 2121 | 2120 |
| 2122 | 2121 |
| 2123 class LModByConstI FINAL : public LTemplateInstruction<1, 1, 1> { | 2122 class LModByConstI final : public LTemplateInstruction<1, 1, 1> { |
| 2124 public: | 2123 public: |
| 2125 LModByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) { | 2124 LModByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) { |
| 2126 inputs_[0] = dividend; | 2125 inputs_[0] = dividend; |
| 2127 divisor_ = divisor; | 2126 divisor_ = divisor; |
| 2128 temps_[0] = temp; | 2127 temps_[0] = temp; |
| 2129 } | 2128 } |
| 2130 | 2129 |
| 2131 LOperand* dividend() { return inputs_[0]; } | 2130 LOperand* dividend() { return inputs_[0]; } |
| 2132 int32_t divisor() const { return divisor_; } | 2131 int32_t divisor() const { return divisor_; } |
| 2133 LOperand* temp() { return temps_[0]; } | 2132 LOperand* temp() { return temps_[0]; } |
| 2134 | 2133 |
| 2135 DECLARE_CONCRETE_INSTRUCTION(ModByConstI, "mod-by-const-i") | 2134 DECLARE_CONCRETE_INSTRUCTION(ModByConstI, "mod-by-const-i") |
| 2136 DECLARE_HYDROGEN_ACCESSOR(Mod) | 2135 DECLARE_HYDROGEN_ACCESSOR(Mod) |
| 2137 | 2136 |
| 2138 private: | 2137 private: |
| 2139 int32_t divisor_; | 2138 int32_t divisor_; |
| 2140 }; | 2139 }; |
| 2141 | 2140 |
| 2142 | 2141 |
| 2143 class LModI FINAL : public LTemplateInstruction<1, 2, 0> { | 2142 class LModI final : public LTemplateInstruction<1, 2, 0> { |
| 2144 public: | 2143 public: |
| 2145 LModI(LOperand* left, LOperand* right) { | 2144 LModI(LOperand* left, LOperand* right) { |
| 2146 inputs_[0] = left; | 2145 inputs_[0] = left; |
| 2147 inputs_[1] = right; | 2146 inputs_[1] = right; |
| 2148 } | 2147 } |
| 2149 | 2148 |
| 2150 LOperand* left() { return inputs_[0]; } | 2149 LOperand* left() { return inputs_[0]; } |
| 2151 LOperand* right() { return inputs_[1]; } | 2150 LOperand* right() { return inputs_[1]; } |
| 2152 | 2151 |
| 2153 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") | 2152 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") |
| 2154 DECLARE_HYDROGEN_ACCESSOR(Mod) | 2153 DECLARE_HYDROGEN_ACCESSOR(Mod) |
| 2155 }; | 2154 }; |
| 2156 | 2155 |
| 2157 | 2156 |
| 2158 class LMulConstIS FINAL : public LTemplateInstruction<1, 2, 0> { | 2157 class LMulConstIS final : public LTemplateInstruction<1, 2, 0> { |
| 2159 public: | 2158 public: |
| 2160 LMulConstIS(LOperand* left, LConstantOperand* right) { | 2159 LMulConstIS(LOperand* left, LConstantOperand* right) { |
| 2161 inputs_[0] = left; | 2160 inputs_[0] = left; |
| 2162 inputs_[1] = right; | 2161 inputs_[1] = right; |
| 2163 } | 2162 } |
| 2164 | 2163 |
| 2165 LOperand* left() { return inputs_[0]; } | 2164 LOperand* left() { return inputs_[0]; } |
| 2166 LConstantOperand* right() { return LConstantOperand::cast(inputs_[1]); } | 2165 LConstantOperand* right() { return LConstantOperand::cast(inputs_[1]); } |
| 2167 | 2166 |
| 2168 DECLARE_CONCRETE_INSTRUCTION(MulConstIS, "mul-const-i-s") | 2167 DECLARE_CONCRETE_INSTRUCTION(MulConstIS, "mul-const-i-s") |
| 2169 DECLARE_HYDROGEN_ACCESSOR(Mul) | 2168 DECLARE_HYDROGEN_ACCESSOR(Mul) |
| 2170 }; | 2169 }; |
| 2171 | 2170 |
| 2172 | 2171 |
| 2173 class LMulI FINAL : public LTemplateInstruction<1, 2, 0> { | 2172 class LMulI final : public LTemplateInstruction<1, 2, 0> { |
| 2174 public: | 2173 public: |
| 2175 LMulI(LOperand* left, LOperand* right) { | 2174 LMulI(LOperand* left, LOperand* right) { |
| 2176 inputs_[0] = left; | 2175 inputs_[0] = left; |
| 2177 inputs_[1] = right; | 2176 inputs_[1] = right; |
| 2178 } | 2177 } |
| 2179 | 2178 |
| 2180 LOperand* left() { return inputs_[0]; } | 2179 LOperand* left() { return inputs_[0]; } |
| 2181 LOperand* right() { return inputs_[1]; } | 2180 LOperand* right() { return inputs_[1]; } |
| 2182 | 2181 |
| 2183 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") | 2182 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") |
| 2184 DECLARE_HYDROGEN_ACCESSOR(Mul) | 2183 DECLARE_HYDROGEN_ACCESSOR(Mul) |
| 2185 }; | 2184 }; |
| 2186 | 2185 |
| 2187 | 2186 |
| 2188 class LMulS FINAL : public LTemplateInstruction<1, 2, 0> { | 2187 class LMulS final : public LTemplateInstruction<1, 2, 0> { |
| 2189 public: | 2188 public: |
| 2190 LMulS(LOperand* left, LOperand* right) { | 2189 LMulS(LOperand* left, LOperand* right) { |
| 2191 inputs_[0] = left; | 2190 inputs_[0] = left; |
| 2192 inputs_[1] = right; | 2191 inputs_[1] = right; |
| 2193 } | 2192 } |
| 2194 | 2193 |
| 2195 LOperand* left() { return inputs_[0]; } | 2194 LOperand* left() { return inputs_[0]; } |
| 2196 LOperand* right() { return inputs_[1]; } | 2195 LOperand* right() { return inputs_[1]; } |
| 2197 | 2196 |
| 2198 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-s") | 2197 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-s") |
| 2199 DECLARE_HYDROGEN_ACCESSOR(Mul) | 2198 DECLARE_HYDROGEN_ACCESSOR(Mul) |
| 2200 }; | 2199 }; |
| 2201 | 2200 |
| 2202 | 2201 |
| 2203 class LNumberTagD FINAL : public LTemplateInstruction<1, 1, 2> { | 2202 class LNumberTagD final : public LTemplateInstruction<1, 1, 2> { |
| 2204 public: | 2203 public: |
| 2205 LNumberTagD(LOperand* value, LOperand* temp1, LOperand* temp2) { | 2204 LNumberTagD(LOperand* value, LOperand* temp1, LOperand* temp2) { |
| 2206 inputs_[0] = value; | 2205 inputs_[0] = value; |
| 2207 temps_[0] = temp1; | 2206 temps_[0] = temp1; |
| 2208 temps_[1] = temp2; | 2207 temps_[1] = temp2; |
| 2209 } | 2208 } |
| 2210 | 2209 |
| 2211 LOperand* value() { return inputs_[0]; } | 2210 LOperand* value() { return inputs_[0]; } |
| 2212 LOperand* temp1() { return temps_[0]; } | 2211 LOperand* temp1() { return temps_[0]; } |
| 2213 LOperand* temp2() { return temps_[1]; } | 2212 LOperand* temp2() { return temps_[1]; } |
| 2214 | 2213 |
| 2215 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") | 2214 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") |
| 2216 DECLARE_HYDROGEN_ACCESSOR(Change) | 2215 DECLARE_HYDROGEN_ACCESSOR(Change) |
| 2217 }; | 2216 }; |
| 2218 | 2217 |
| 2219 | 2218 |
| 2220 class LNumberTagU FINAL : public LTemplateInstruction<1, 1, 2> { | 2219 class LNumberTagU final : public LTemplateInstruction<1, 1, 2> { |
| 2221 public: | 2220 public: |
| 2222 explicit LNumberTagU(LOperand* value, | 2221 explicit LNumberTagU(LOperand* value, |
| 2223 LOperand* temp1, | 2222 LOperand* temp1, |
| 2224 LOperand* temp2) { | 2223 LOperand* temp2) { |
| 2225 inputs_[0] = value; | 2224 inputs_[0] = value; |
| 2226 temps_[0] = temp1; | 2225 temps_[0] = temp1; |
| 2227 temps_[1] = temp2; | 2226 temps_[1] = temp2; |
| 2228 } | 2227 } |
| 2229 | 2228 |
| 2230 LOperand* value() { return inputs_[0]; } | 2229 LOperand* value() { return inputs_[0]; } |
| 2231 LOperand* temp1() { return temps_[0]; } | 2230 LOperand* temp1() { return temps_[0]; } |
| 2232 LOperand* temp2() { return temps_[1]; } | 2231 LOperand* temp2() { return temps_[1]; } |
| 2233 | 2232 |
| 2234 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u") | 2233 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u") |
| 2235 }; | 2234 }; |
| 2236 | 2235 |
| 2237 | 2236 |
| 2238 class LNumberUntagD FINAL : public LTemplateInstruction<1, 1, 1> { | 2237 class LNumberUntagD final : public LTemplateInstruction<1, 1, 1> { |
| 2239 public: | 2238 public: |
| 2240 LNumberUntagD(LOperand* value, LOperand* temp) { | 2239 LNumberUntagD(LOperand* value, LOperand* temp) { |
| 2241 inputs_[0] = value; | 2240 inputs_[0] = value; |
| 2242 temps_[0] = temp; | 2241 temps_[0] = temp; |
| 2243 } | 2242 } |
| 2244 | 2243 |
| 2245 LOperand* value() { return inputs_[0]; } | 2244 LOperand* value() { return inputs_[0]; } |
| 2246 | 2245 |
| 2247 LOperand* temp() { return temps_[0]; } | 2246 LOperand* temp() { return temps_[0]; } |
| 2248 | 2247 |
| 2249 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") | 2248 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") |
| 2250 DECLARE_HYDROGEN_ACCESSOR(Change) | 2249 DECLARE_HYDROGEN_ACCESSOR(Change) |
| 2251 }; | 2250 }; |
| 2252 | 2251 |
| 2253 | 2252 |
| 2254 class LParameter FINAL : public LTemplateInstruction<1, 0, 0> { | 2253 class LParameter final : public LTemplateInstruction<1, 0, 0> { |
| 2255 public: | 2254 public: |
| 2256 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; } | 2255 bool HasInterestingComment(LCodeGen* gen) const override { return false; } |
| 2257 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") | 2256 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") |
| 2258 }; | 2257 }; |
| 2259 | 2258 |
| 2260 | 2259 |
| 2261 class LPower FINAL : public LTemplateInstruction<1, 2, 0> { | 2260 class LPower final : public LTemplateInstruction<1, 2, 0> { |
| 2262 public: | 2261 public: |
| 2263 LPower(LOperand* left, LOperand* right) { | 2262 LPower(LOperand* left, LOperand* right) { |
| 2264 inputs_[0] = left; | 2263 inputs_[0] = left; |
| 2265 inputs_[1] = right; | 2264 inputs_[1] = right; |
| 2266 } | 2265 } |
| 2267 | 2266 |
| 2268 LOperand* left() { return inputs_[0]; } | 2267 LOperand* left() { return inputs_[0]; } |
| 2269 LOperand* right() { return inputs_[1]; } | 2268 LOperand* right() { return inputs_[1]; } |
| 2270 | 2269 |
| 2271 DECLARE_CONCRETE_INSTRUCTION(Power, "power") | 2270 DECLARE_CONCRETE_INSTRUCTION(Power, "power") |
| 2272 DECLARE_HYDROGEN_ACCESSOR(Power) | 2271 DECLARE_HYDROGEN_ACCESSOR(Power) |
| 2273 }; | 2272 }; |
| 2274 | 2273 |
| 2275 | 2274 |
| 2276 class LPreparePushArguments FINAL : public LTemplateInstruction<0, 0, 0> { | 2275 class LPreparePushArguments final : public LTemplateInstruction<0, 0, 0> { |
| 2277 public: | 2276 public: |
| 2278 explicit LPreparePushArguments(int argc) : argc_(argc) {} | 2277 explicit LPreparePushArguments(int argc) : argc_(argc) {} |
| 2279 | 2278 |
| 2280 inline int argc() const { return argc_; } | 2279 inline int argc() const { return argc_; } |
| 2281 | 2280 |
| 2282 DECLARE_CONCRETE_INSTRUCTION(PreparePushArguments, "prepare-push-arguments") | 2281 DECLARE_CONCRETE_INSTRUCTION(PreparePushArguments, "prepare-push-arguments") |
| 2283 | 2282 |
| 2284 protected: | 2283 protected: |
| 2285 int argc_; | 2284 int argc_; |
| 2286 }; | 2285 }; |
| 2287 | 2286 |
| 2288 | 2287 |
| 2289 class LPushArguments FINAL : public LTemplateResultInstruction<0> { | 2288 class LPushArguments final : public LTemplateResultInstruction<0> { |
| 2290 public: | 2289 public: |
| 2291 explicit LPushArguments(Zone* zone, | 2290 explicit LPushArguments(Zone* zone, |
| 2292 int capacity = kRecommendedMaxPushedArgs) | 2291 int capacity = kRecommendedMaxPushedArgs) |
| 2293 : zone_(zone), inputs_(capacity, zone) {} | 2292 : zone_(zone), inputs_(capacity, zone) {} |
| 2294 | 2293 |
| 2295 LOperand* argument(int i) { return inputs_[i]; } | 2294 LOperand* argument(int i) { return inputs_[i]; } |
| 2296 int ArgumentCount() const { return inputs_.length(); } | 2295 int ArgumentCount() const { return inputs_.length(); } |
| 2297 | 2296 |
| 2298 void AddArgument(LOperand* arg) { inputs_.Add(arg, zone_); } | 2297 void AddArgument(LOperand* arg) { inputs_.Add(arg, zone_); } |
| 2299 | 2298 |
| 2300 DECLARE_CONCRETE_INSTRUCTION(PushArguments, "push-arguments") | 2299 DECLARE_CONCRETE_INSTRUCTION(PushArguments, "push-arguments") |
| 2301 | 2300 |
| 2302 // It is better to limit the number of arguments pushed simultaneously to | 2301 // It is better to limit the number of arguments pushed simultaneously to |
| 2303 // avoid pressure on the register allocator. | 2302 // avoid pressure on the register allocator. |
| 2304 static const int kRecommendedMaxPushedArgs = 4; | 2303 static const int kRecommendedMaxPushedArgs = 4; |
| 2305 bool ShouldSplitPush() const { | 2304 bool ShouldSplitPush() const { |
| 2306 return inputs_.length() >= kRecommendedMaxPushedArgs; | 2305 return inputs_.length() >= kRecommendedMaxPushedArgs; |
| 2307 } | 2306 } |
| 2308 | 2307 |
| 2309 protected: | 2308 protected: |
| 2310 Zone* zone_; | 2309 Zone* zone_; |
| 2311 ZoneList<LOperand*> inputs_; | 2310 ZoneList<LOperand*> inputs_; |
| 2312 | 2311 |
| 2313 private: | 2312 private: |
| 2314 // Iterator support. | 2313 // Iterator support. |
| 2315 int InputCount() FINAL { return inputs_.length(); } | 2314 int InputCount() final { return inputs_.length(); } |
| 2316 LOperand* InputAt(int i) FINAL { return inputs_[i]; } | 2315 LOperand* InputAt(int i) final { return inputs_[i]; } |
| 2317 | 2316 |
| 2318 int TempCount() FINAL { return 0; } | 2317 int TempCount() final { return 0; } |
| 2319 LOperand* TempAt(int i) FINAL { return NULL; } | 2318 LOperand* TempAt(int i) final { return NULL; } |
| 2320 }; | 2319 }; |
| 2321 | 2320 |
| 2322 | 2321 |
| 2323 class LRegExpLiteral FINAL : public LTemplateInstruction<1, 1, 0> { | 2322 class LRegExpLiteral final : public LTemplateInstruction<1, 1, 0> { |
| 2324 public: | 2323 public: |
| 2325 explicit LRegExpLiteral(LOperand* context) { | 2324 explicit LRegExpLiteral(LOperand* context) { |
| 2326 inputs_[0] = context; | 2325 inputs_[0] = context; |
| 2327 } | 2326 } |
| 2328 | 2327 |
| 2329 LOperand* context() { return inputs_[0]; } | 2328 LOperand* context() { return inputs_[0]; } |
| 2330 | 2329 |
| 2331 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") | 2330 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") |
| 2332 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) | 2331 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) |
| 2333 }; | 2332 }; |
| 2334 | 2333 |
| 2335 | 2334 |
| 2336 class LReturn FINAL : public LTemplateInstruction<0, 3, 0> { | 2335 class LReturn final : public LTemplateInstruction<0, 3, 0> { |
| 2337 public: | 2336 public: |
| 2338 LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) { | 2337 LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) { |
| 2339 inputs_[0] = value; | 2338 inputs_[0] = value; |
| 2340 inputs_[1] = context; | 2339 inputs_[1] = context; |
| 2341 inputs_[2] = parameter_count; | 2340 inputs_[2] = parameter_count; |
| 2342 } | 2341 } |
| 2343 | 2342 |
| 2344 LOperand* value() { return inputs_[0]; } | 2343 LOperand* value() { return inputs_[0]; } |
| 2345 LOperand* parameter_count() { return inputs_[2]; } | 2344 LOperand* parameter_count() { return inputs_[2]; } |
| 2346 | 2345 |
| 2347 bool has_constant_parameter_count() { | 2346 bool has_constant_parameter_count() { |
| 2348 return parameter_count()->IsConstantOperand(); | 2347 return parameter_count()->IsConstantOperand(); |
| 2349 } | 2348 } |
| 2350 LConstantOperand* constant_parameter_count() { | 2349 LConstantOperand* constant_parameter_count() { |
| 2351 DCHECK(has_constant_parameter_count()); | 2350 DCHECK(has_constant_parameter_count()); |
| 2352 return LConstantOperand::cast(parameter_count()); | 2351 return LConstantOperand::cast(parameter_count()); |
| 2353 } | 2352 } |
| 2354 | 2353 |
| 2355 DECLARE_CONCRETE_INSTRUCTION(Return, "return") | 2354 DECLARE_CONCRETE_INSTRUCTION(Return, "return") |
| 2356 }; | 2355 }; |
| 2357 | 2356 |
| 2358 | 2357 |
| 2359 class LSeqStringGetChar FINAL : public LTemplateInstruction<1, 2, 1> { | 2358 class LSeqStringGetChar final : public LTemplateInstruction<1, 2, 1> { |
| 2360 public: | 2359 public: |
| 2361 LSeqStringGetChar(LOperand* string, | 2360 LSeqStringGetChar(LOperand* string, |
| 2362 LOperand* index, | 2361 LOperand* index, |
| 2363 LOperand* temp) { | 2362 LOperand* temp) { |
| 2364 inputs_[0] = string; | 2363 inputs_[0] = string; |
| 2365 inputs_[1] = index; | 2364 inputs_[1] = index; |
| 2366 temps_[0] = temp; | 2365 temps_[0] = temp; |
| 2367 } | 2366 } |
| 2368 | 2367 |
| 2369 LOperand* string() { return inputs_[0]; } | 2368 LOperand* string() { return inputs_[0]; } |
| 2370 LOperand* index() { return inputs_[1]; } | 2369 LOperand* index() { return inputs_[1]; } |
| 2371 LOperand* temp() { return temps_[0]; } | 2370 LOperand* temp() { return temps_[0]; } |
| 2372 | 2371 |
| 2373 DECLARE_CONCRETE_INSTRUCTION(SeqStringGetChar, "seq-string-get-char") | 2372 DECLARE_CONCRETE_INSTRUCTION(SeqStringGetChar, "seq-string-get-char") |
| 2374 DECLARE_HYDROGEN_ACCESSOR(SeqStringGetChar) | 2373 DECLARE_HYDROGEN_ACCESSOR(SeqStringGetChar) |
| 2375 }; | 2374 }; |
| 2376 | 2375 |
| 2377 | 2376 |
| 2378 class LSeqStringSetChar FINAL : public LTemplateInstruction<1, 4, 1> { | 2377 class LSeqStringSetChar final : public LTemplateInstruction<1, 4, 1> { |
| 2379 public: | 2378 public: |
| 2380 LSeqStringSetChar(LOperand* context, | 2379 LSeqStringSetChar(LOperand* context, |
| 2381 LOperand* string, | 2380 LOperand* string, |
| 2382 LOperand* index, | 2381 LOperand* index, |
| 2383 LOperand* value, | 2382 LOperand* value, |
| 2384 LOperand* temp) { | 2383 LOperand* temp) { |
| 2385 inputs_[0] = context; | 2384 inputs_[0] = context; |
| 2386 inputs_[1] = string; | 2385 inputs_[1] = string; |
| 2387 inputs_[2] = index; | 2386 inputs_[2] = index; |
| 2388 inputs_[3] = value; | 2387 inputs_[3] = value; |
| 2389 temps_[0] = temp; | 2388 temps_[0] = temp; |
| 2390 } | 2389 } |
| 2391 | 2390 |
| 2392 LOperand* context() { return inputs_[0]; } | 2391 LOperand* context() { return inputs_[0]; } |
| 2393 LOperand* string() { return inputs_[1]; } | 2392 LOperand* string() { return inputs_[1]; } |
| 2394 LOperand* index() { return inputs_[2]; } | 2393 LOperand* index() { return inputs_[2]; } |
| 2395 LOperand* value() { return inputs_[3]; } | 2394 LOperand* value() { return inputs_[3]; } |
| 2396 LOperand* temp() { return temps_[0]; } | 2395 LOperand* temp() { return temps_[0]; } |
| 2397 | 2396 |
| 2398 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") | 2397 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") |
| 2399 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) | 2398 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) |
| 2400 }; | 2399 }; |
| 2401 | 2400 |
| 2402 | 2401 |
| 2403 class LSmiTag FINAL : public LTemplateInstruction<1, 1, 0> { | 2402 class LSmiTag final : public LTemplateInstruction<1, 1, 0> { |
| 2404 public: | 2403 public: |
| 2405 explicit LSmiTag(LOperand* value) { | 2404 explicit LSmiTag(LOperand* value) { |
| 2406 inputs_[0] = value; | 2405 inputs_[0] = value; |
| 2407 } | 2406 } |
| 2408 | 2407 |
| 2409 LOperand* value() { return inputs_[0]; } | 2408 LOperand* value() { return inputs_[0]; } |
| 2410 | 2409 |
| 2411 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") | 2410 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") |
| 2412 DECLARE_HYDROGEN_ACCESSOR(Change) | 2411 DECLARE_HYDROGEN_ACCESSOR(Change) |
| 2413 }; | 2412 }; |
| 2414 | 2413 |
| 2415 | 2414 |
| 2416 class LSmiUntag FINAL : public LTemplateInstruction<1, 1, 0> { | 2415 class LSmiUntag final : public LTemplateInstruction<1, 1, 0> { |
| 2417 public: | 2416 public: |
| 2418 LSmiUntag(LOperand* value, bool needs_check) | 2417 LSmiUntag(LOperand* value, bool needs_check) |
| 2419 : needs_check_(needs_check) { | 2418 : needs_check_(needs_check) { |
| 2420 inputs_[0] = value; | 2419 inputs_[0] = value; |
| 2421 } | 2420 } |
| 2422 | 2421 |
| 2423 LOperand* value() { return inputs_[0]; } | 2422 LOperand* value() { return inputs_[0]; } |
| 2424 bool needs_check() const { return needs_check_; } | 2423 bool needs_check() const { return needs_check_; } |
| 2425 | 2424 |
| 2426 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") | 2425 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") |
| 2427 | 2426 |
| 2428 private: | 2427 private: |
| 2429 bool needs_check_; | 2428 bool needs_check_; |
| 2430 }; | 2429 }; |
| 2431 | 2430 |
| 2432 | 2431 |
| 2433 class LStackCheck FINAL : public LTemplateInstruction<0, 1, 0> { | 2432 class LStackCheck final : public LTemplateInstruction<0, 1, 0> { |
| 2434 public: | 2433 public: |
| 2435 explicit LStackCheck(LOperand* context) { | 2434 explicit LStackCheck(LOperand* context) { |
| 2436 inputs_[0] = context; | 2435 inputs_[0] = context; |
| 2437 } | 2436 } |
| 2438 | 2437 |
| 2439 LOperand* context() { return inputs_[0]; } | 2438 LOperand* context() { return inputs_[0]; } |
| 2440 | 2439 |
| 2441 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") | 2440 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") |
| 2442 DECLARE_HYDROGEN_ACCESSOR(StackCheck) | 2441 DECLARE_HYDROGEN_ACCESSOR(StackCheck) |
| 2443 | 2442 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2473 | 2472 |
| 2474 bool NeedsCanonicalization() { | 2473 bool NeedsCanonicalization() { |
| 2475 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() || | 2474 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() || |
| 2476 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) { | 2475 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) { |
| 2477 return false; | 2476 return false; |
| 2478 } | 2477 } |
| 2479 return this->hydrogen()->NeedsCanonicalization(); | 2478 return this->hydrogen()->NeedsCanonicalization(); |
| 2480 } | 2479 } |
| 2481 uint32_t base_offset() const { return this->hydrogen()->base_offset(); } | 2480 uint32_t base_offset() const { return this->hydrogen()->base_offset(); } |
| 2482 | 2481 |
| 2483 void PrintDataTo(StringStream* stream) OVERRIDE { | 2482 void PrintDataTo(StringStream* stream) override { |
| 2484 this->elements()->PrintTo(stream); | 2483 this->elements()->PrintTo(stream); |
| 2485 stream->Add("["); | 2484 stream->Add("["); |
| 2486 this->key()->PrintTo(stream); | 2485 this->key()->PrintTo(stream); |
| 2487 if (this->base_offset() != 0) { | 2486 if (this->base_offset() != 0) { |
| 2488 stream->Add(" + %d] <-", this->base_offset()); | 2487 stream->Add(" + %d] <-", this->base_offset()); |
| 2489 } else { | 2488 } else { |
| 2490 stream->Add("] <- "); | 2489 stream->Add("] <- "); |
| 2491 } | 2490 } |
| 2492 | 2491 |
| 2493 if (this->value() == NULL) { | 2492 if (this->value() == NULL) { |
| 2494 DCHECK(hydrogen()->IsConstantHoleStore() && | 2493 DCHECK(hydrogen()->IsConstantHoleStore() && |
| 2495 hydrogen()->value()->representation().IsDouble()); | 2494 hydrogen()->value()->representation().IsDouble()); |
| 2496 stream->Add("<the hole(nan)>"); | 2495 stream->Add("<the hole(nan)>"); |
| 2497 } else { | 2496 } else { |
| 2498 this->value()->PrintTo(stream); | 2497 this->value()->PrintTo(stream); |
| 2499 } | 2498 } |
| 2500 } | 2499 } |
| 2501 | 2500 |
| 2502 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) | 2501 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) |
| 2503 }; | 2502 }; |
| 2504 | 2503 |
| 2505 | 2504 |
| 2506 class LStoreKeyedExternal FINAL : public LStoreKeyed<1> { | 2505 class LStoreKeyedExternal final : public LStoreKeyed<1> { |
| 2507 public: | 2506 public: |
| 2508 LStoreKeyedExternal(LOperand* elements, LOperand* key, LOperand* value, | 2507 LStoreKeyedExternal(LOperand* elements, LOperand* key, LOperand* value, |
| 2509 LOperand* temp) : | 2508 LOperand* temp) : |
| 2510 LStoreKeyed<1>(elements, key, value) { | 2509 LStoreKeyed<1>(elements, key, value) { |
| 2511 temps_[0] = temp; | 2510 temps_[0] = temp; |
| 2512 } | 2511 } |
| 2513 | 2512 |
| 2514 LOperand* temp() { return temps_[0]; } | 2513 LOperand* temp() { return temps_[0]; } |
| 2515 | 2514 |
| 2516 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedExternal, "store-keyed-external") | 2515 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedExternal, "store-keyed-external") |
| 2517 }; | 2516 }; |
| 2518 | 2517 |
| 2519 | 2518 |
| 2520 class LStoreKeyedFixed FINAL : public LStoreKeyed<1> { | 2519 class LStoreKeyedFixed final : public LStoreKeyed<1> { |
| 2521 public: | 2520 public: |
| 2522 LStoreKeyedFixed(LOperand* elements, LOperand* key, LOperand* value, | 2521 LStoreKeyedFixed(LOperand* elements, LOperand* key, LOperand* value, |
| 2523 LOperand* temp) : | 2522 LOperand* temp) : |
| 2524 LStoreKeyed<1>(elements, key, value) { | 2523 LStoreKeyed<1>(elements, key, value) { |
| 2525 temps_[0] = temp; | 2524 temps_[0] = temp; |
| 2526 } | 2525 } |
| 2527 | 2526 |
| 2528 LOperand* temp() { return temps_[0]; } | 2527 LOperand* temp() { return temps_[0]; } |
| 2529 | 2528 |
| 2530 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFixed, "store-keyed-fixed") | 2529 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFixed, "store-keyed-fixed") |
| 2531 }; | 2530 }; |
| 2532 | 2531 |
| 2533 | 2532 |
| 2534 class LStoreKeyedFixedDouble FINAL : public LStoreKeyed<1> { | 2533 class LStoreKeyedFixedDouble final : public LStoreKeyed<1> { |
| 2535 public: | 2534 public: |
| 2536 LStoreKeyedFixedDouble(LOperand* elements, LOperand* key, LOperand* value, | 2535 LStoreKeyedFixedDouble(LOperand* elements, LOperand* key, LOperand* value, |
| 2537 LOperand* temp) : | 2536 LOperand* temp) : |
| 2538 LStoreKeyed<1>(elements, key, value) { | 2537 LStoreKeyed<1>(elements, key, value) { |
| 2539 temps_[0] = temp; | 2538 temps_[0] = temp; |
| 2540 } | 2539 } |
| 2541 | 2540 |
| 2542 LOperand* temp() { return temps_[0]; } | 2541 LOperand* temp() { return temps_[0]; } |
| 2543 | 2542 |
| 2544 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFixedDouble, | 2543 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFixedDouble, |
| 2545 "store-keyed-fixed-double") | 2544 "store-keyed-fixed-double") |
| 2546 }; | 2545 }; |
| 2547 | 2546 |
| 2548 | 2547 |
| 2549 class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> { | 2548 class LStoreKeyedGeneric final : public LTemplateInstruction<0, 4, 0> { |
| 2550 public: | 2549 public: |
| 2551 LStoreKeyedGeneric(LOperand* context, | 2550 LStoreKeyedGeneric(LOperand* context, |
| 2552 LOperand* obj, | 2551 LOperand* obj, |
| 2553 LOperand* key, | 2552 LOperand* key, |
| 2554 LOperand* value) { | 2553 LOperand* value) { |
| 2555 inputs_[0] = context; | 2554 inputs_[0] = context; |
| 2556 inputs_[1] = obj; | 2555 inputs_[1] = obj; |
| 2557 inputs_[2] = key; | 2556 inputs_[2] = key; |
| 2558 inputs_[3] = value; | 2557 inputs_[3] = value; |
| 2559 } | 2558 } |
| 2560 | 2559 |
| 2561 LOperand* context() { return inputs_[0]; } | 2560 LOperand* context() { return inputs_[0]; } |
| 2562 LOperand* object() { return inputs_[1]; } | 2561 LOperand* object() { return inputs_[1]; } |
| 2563 LOperand* key() { return inputs_[2]; } | 2562 LOperand* key() { return inputs_[2]; } |
| 2564 LOperand* value() { return inputs_[3]; } | 2563 LOperand* value() { return inputs_[3]; } |
| 2565 | 2564 |
| 2566 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") | 2565 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") |
| 2567 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) | 2566 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) |
| 2568 | 2567 |
| 2569 void PrintDataTo(StringStream* stream) OVERRIDE; | 2568 void PrintDataTo(StringStream* stream) override; |
| 2570 | 2569 |
| 2571 LanguageMode language_mode() { return hydrogen()->language_mode(); } | 2570 LanguageMode language_mode() { return hydrogen()->language_mode(); } |
| 2572 }; | 2571 }; |
| 2573 | 2572 |
| 2574 | 2573 |
| 2575 class LStoreNamedField FINAL : public LTemplateInstruction<0, 2, 2> { | 2574 class LStoreNamedField final : public LTemplateInstruction<0, 2, 2> { |
| 2576 public: | 2575 public: |
| 2577 LStoreNamedField(LOperand* object, LOperand* value, | 2576 LStoreNamedField(LOperand* object, LOperand* value, |
| 2578 LOperand* temp0, LOperand* temp1) { | 2577 LOperand* temp0, LOperand* temp1) { |
| 2579 inputs_[0] = object; | 2578 inputs_[0] = object; |
| 2580 inputs_[1] = value; | 2579 inputs_[1] = value; |
| 2581 temps_[0] = temp0; | 2580 temps_[0] = temp0; |
| 2582 temps_[1] = temp1; | 2581 temps_[1] = temp1; |
| 2583 } | 2582 } |
| 2584 | 2583 |
| 2585 LOperand* object() { return inputs_[0]; } | 2584 LOperand* object() { return inputs_[0]; } |
| 2586 LOperand* value() { return inputs_[1]; } | 2585 LOperand* value() { return inputs_[1]; } |
| 2587 LOperand* temp0() { return temps_[0]; } | 2586 LOperand* temp0() { return temps_[0]; } |
| 2588 LOperand* temp1() { return temps_[1]; } | 2587 LOperand* temp1() { return temps_[1]; } |
| 2589 | 2588 |
| 2590 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") | 2589 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") |
| 2591 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) | 2590 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) |
| 2592 | 2591 |
| 2593 void PrintDataTo(StringStream* stream) OVERRIDE; | 2592 void PrintDataTo(StringStream* stream) override; |
| 2594 | 2593 |
| 2595 Representation representation() const { | 2594 Representation representation() const { |
| 2596 return hydrogen()->field_representation(); | 2595 return hydrogen()->field_representation(); |
| 2597 } | 2596 } |
| 2598 }; | 2597 }; |
| 2599 | 2598 |
| 2600 | 2599 |
| 2601 class LStoreNamedGeneric FINAL: public LTemplateInstruction<0, 3, 0> { | 2600 class LStoreNamedGeneric final : public LTemplateInstruction<0, 3, 0> { |
| 2602 public: | 2601 public: |
| 2603 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { | 2602 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { |
| 2604 inputs_[0] = context; | 2603 inputs_[0] = context; |
| 2605 inputs_[1] = object; | 2604 inputs_[1] = object; |
| 2606 inputs_[2] = value; | 2605 inputs_[2] = value; |
| 2607 } | 2606 } |
| 2608 | 2607 |
| 2609 LOperand* context() { return inputs_[0]; } | 2608 LOperand* context() { return inputs_[0]; } |
| 2610 LOperand* object() { return inputs_[1]; } | 2609 LOperand* object() { return inputs_[1]; } |
| 2611 LOperand* value() { return inputs_[2]; } | 2610 LOperand* value() { return inputs_[2]; } |
| 2612 | 2611 |
| 2613 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 2612 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |
| 2614 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 2613 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |
| 2615 | 2614 |
| 2616 void PrintDataTo(StringStream* stream) OVERRIDE; | 2615 void PrintDataTo(StringStream* stream) override; |
| 2617 | 2616 |
| 2618 Handle<Object> name() const { return hydrogen()->name(); } | 2617 Handle<Object> name() const { return hydrogen()->name(); } |
| 2619 LanguageMode language_mode() { return hydrogen()->language_mode(); } | 2618 LanguageMode language_mode() { return hydrogen()->language_mode(); } |
| 2620 }; | 2619 }; |
| 2621 | 2620 |
| 2622 | 2621 |
| 2623 class LStringAdd FINAL : public LTemplateInstruction<1, 3, 0> { | 2622 class LStringAdd final : public LTemplateInstruction<1, 3, 0> { |
| 2624 public: | 2623 public: |
| 2625 LStringAdd(LOperand* context, LOperand* left, LOperand* right) { | 2624 LStringAdd(LOperand* context, LOperand* left, LOperand* right) { |
| 2626 inputs_[0] = context; | 2625 inputs_[0] = context; |
| 2627 inputs_[1] = left; | 2626 inputs_[1] = left; |
| 2628 inputs_[2] = right; | 2627 inputs_[2] = right; |
| 2629 } | 2628 } |
| 2630 | 2629 |
| 2631 LOperand* context() { return inputs_[0]; } | 2630 LOperand* context() { return inputs_[0]; } |
| 2632 LOperand* left() { return inputs_[1]; } | 2631 LOperand* left() { return inputs_[1]; } |
| 2633 LOperand* right() { return inputs_[2]; } | 2632 LOperand* right() { return inputs_[2]; } |
| 2634 | 2633 |
| 2635 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") | 2634 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") |
| 2636 DECLARE_HYDROGEN_ACCESSOR(StringAdd) | 2635 DECLARE_HYDROGEN_ACCESSOR(StringAdd) |
| 2637 }; | 2636 }; |
| 2638 | 2637 |
| 2639 | 2638 |
| 2640 | 2639 class LStringCharCodeAt final : public LTemplateInstruction<1, 3, 0> { |
| 2641 class LStringCharCodeAt FINAL : public LTemplateInstruction<1, 3, 0> { | |
| 2642 public: | 2640 public: |
| 2643 LStringCharCodeAt(LOperand* context, LOperand* string, LOperand* index) { | 2641 LStringCharCodeAt(LOperand* context, LOperand* string, LOperand* index) { |
| 2644 inputs_[0] = context; | 2642 inputs_[0] = context; |
| 2645 inputs_[1] = string; | 2643 inputs_[1] = string; |
| 2646 inputs_[2] = index; | 2644 inputs_[2] = index; |
| 2647 } | 2645 } |
| 2648 | 2646 |
| 2649 LOperand* context() { return inputs_[0]; } | 2647 LOperand* context() { return inputs_[0]; } |
| 2650 LOperand* string() { return inputs_[1]; } | 2648 LOperand* string() { return inputs_[1]; } |
| 2651 LOperand* index() { return inputs_[2]; } | 2649 LOperand* index() { return inputs_[2]; } |
| 2652 | 2650 |
| 2653 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") | 2651 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") |
| 2654 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) | 2652 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) |
| 2655 }; | 2653 }; |
| 2656 | 2654 |
| 2657 | 2655 |
| 2658 class LStringCharFromCode FINAL : public LTemplateInstruction<1, 2, 0> { | 2656 class LStringCharFromCode final : public LTemplateInstruction<1, 2, 0> { |
| 2659 public: | 2657 public: |
| 2660 LStringCharFromCode(LOperand* context, LOperand* char_code) { | 2658 LStringCharFromCode(LOperand* context, LOperand* char_code) { |
| 2661 inputs_[0] = context; | 2659 inputs_[0] = context; |
| 2662 inputs_[1] = char_code; | 2660 inputs_[1] = char_code; |
| 2663 } | 2661 } |
| 2664 | 2662 |
| 2665 LOperand* context() { return inputs_[0]; } | 2663 LOperand* context() { return inputs_[0]; } |
| 2666 LOperand* char_code() { return inputs_[1]; } | 2664 LOperand* char_code() { return inputs_[1]; } |
| 2667 | 2665 |
| 2668 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") | 2666 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") |
| 2669 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) | 2667 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) |
| 2670 }; | 2668 }; |
| 2671 | 2669 |
| 2672 | 2670 |
| 2673 class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> { | 2671 class LStringCompareAndBranch final : public LControlInstruction<3, 0> { |
| 2674 public: | 2672 public: |
| 2675 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) { | 2673 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) { |
| 2676 inputs_[0] = context; | 2674 inputs_[0] = context; |
| 2677 inputs_[1] = left; | 2675 inputs_[1] = left; |
| 2678 inputs_[2] = right; | 2676 inputs_[2] = right; |
| 2679 } | 2677 } |
| 2680 | 2678 |
| 2681 LOperand* context() { return inputs_[0]; } | 2679 LOperand* context() { return inputs_[0]; } |
| 2682 LOperand* left() { return inputs_[1]; } | 2680 LOperand* left() { return inputs_[1]; } |
| 2683 LOperand* right() { return inputs_[2]; } | 2681 LOperand* right() { return inputs_[2]; } |
| 2684 | 2682 |
| 2685 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, | 2683 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, |
| 2686 "string-compare-and-branch") | 2684 "string-compare-and-branch") |
| 2687 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) | 2685 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) |
| 2688 | 2686 |
| 2689 Token::Value op() const { return hydrogen()->token(); } | 2687 Token::Value op() const { return hydrogen()->token(); } |
| 2690 | 2688 |
| 2691 void PrintDataTo(StringStream* stream) OVERRIDE; | 2689 void PrintDataTo(StringStream* stream) override; |
| 2692 }; | 2690 }; |
| 2693 | 2691 |
| 2694 | 2692 |
| 2695 // Truncating conversion from a tagged value to an int32. | 2693 // Truncating conversion from a tagged value to an int32. |
| 2696 class LTaggedToI FINAL : public LTemplateInstruction<1, 1, 2> { | 2694 class LTaggedToI final : public LTemplateInstruction<1, 1, 2> { |
| 2697 public: | 2695 public: |
| 2698 explicit LTaggedToI(LOperand* value, LOperand* temp1, LOperand* temp2) { | 2696 explicit LTaggedToI(LOperand* value, LOperand* temp1, LOperand* temp2) { |
| 2699 inputs_[0] = value; | 2697 inputs_[0] = value; |
| 2700 temps_[0] = temp1; | 2698 temps_[0] = temp1; |
| 2701 temps_[1] = temp2; | 2699 temps_[1] = temp2; |
| 2702 } | 2700 } |
| 2703 | 2701 |
| 2704 LOperand* value() { return inputs_[0]; } | 2702 LOperand* value() { return inputs_[0]; } |
| 2705 LOperand* temp1() { return temps_[0]; } | 2703 LOperand* temp1() { return temps_[0]; } |
| 2706 LOperand* temp2() { return temps_[1]; } | 2704 LOperand* temp2() { return temps_[1]; } |
| 2707 | 2705 |
| 2708 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") | 2706 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") |
| 2709 DECLARE_HYDROGEN_ACCESSOR(Change) | 2707 DECLARE_HYDROGEN_ACCESSOR(Change) |
| 2710 | 2708 |
| 2711 bool truncating() { return hydrogen()->CanTruncateToInt32(); } | 2709 bool truncating() { return hydrogen()->CanTruncateToInt32(); } |
| 2712 }; | 2710 }; |
| 2713 | 2711 |
| 2714 | 2712 |
| 2715 class LShiftI FINAL : public LTemplateInstruction<1, 2, 0> { | 2713 class LShiftI final : public LTemplateInstruction<1, 2, 0> { |
| 2716 public: | 2714 public: |
| 2717 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) | 2715 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) |
| 2718 : op_(op), can_deopt_(can_deopt) { | 2716 : op_(op), can_deopt_(can_deopt) { |
| 2719 inputs_[0] = left; | 2717 inputs_[0] = left; |
| 2720 inputs_[1] = right; | 2718 inputs_[1] = right; |
| 2721 } | 2719 } |
| 2722 | 2720 |
| 2723 Token::Value op() const { return op_; } | 2721 Token::Value op() const { return op_; } |
| 2724 LOperand* left() { return inputs_[0]; } | 2722 LOperand* left() { return inputs_[0]; } |
| 2725 LOperand* right() { return inputs_[1]; } | 2723 LOperand* right() { return inputs_[1]; } |
| 2726 bool can_deopt() const { return can_deopt_; } | 2724 bool can_deopt() const { return can_deopt_; } |
| 2727 | 2725 |
| 2728 DECLARE_CONCRETE_INSTRUCTION(ShiftI, "shift-i") | 2726 DECLARE_CONCRETE_INSTRUCTION(ShiftI, "shift-i") |
| 2729 | 2727 |
| 2730 private: | 2728 private: |
| 2731 Token::Value op_; | 2729 Token::Value op_; |
| 2732 bool can_deopt_; | 2730 bool can_deopt_; |
| 2733 }; | 2731 }; |
| 2734 | 2732 |
| 2735 | 2733 |
| 2736 class LShiftS FINAL : public LTemplateInstruction<1, 2, 0> { | 2734 class LShiftS final : public LTemplateInstruction<1, 2, 0> { |
| 2737 public: | 2735 public: |
| 2738 LShiftS(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) | 2736 LShiftS(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) |
| 2739 : op_(op), can_deopt_(can_deopt) { | 2737 : op_(op), can_deopt_(can_deopt) { |
| 2740 inputs_[0] = left; | 2738 inputs_[0] = left; |
| 2741 inputs_[1] = right; | 2739 inputs_[1] = right; |
| 2742 } | 2740 } |
| 2743 | 2741 |
| 2744 Token::Value op() const { return op_; } | 2742 Token::Value op() const { return op_; } |
| 2745 LOperand* left() { return inputs_[0]; } | 2743 LOperand* left() { return inputs_[0]; } |
| 2746 LOperand* right() { return inputs_[1]; } | 2744 LOperand* right() { return inputs_[1]; } |
| 2747 bool can_deopt() const { return can_deopt_; } | 2745 bool can_deopt() const { return can_deopt_; } |
| 2748 | 2746 |
| 2749 DECLARE_CONCRETE_INSTRUCTION(ShiftS, "shift-s") | 2747 DECLARE_CONCRETE_INSTRUCTION(ShiftS, "shift-s") |
| 2750 | 2748 |
| 2751 private: | 2749 private: |
| 2752 Token::Value op_; | 2750 Token::Value op_; |
| 2753 bool can_deopt_; | 2751 bool can_deopt_; |
| 2754 }; | 2752 }; |
| 2755 | 2753 |
| 2756 | 2754 |
| 2757 class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 1> { | 2755 class LStoreCodeEntry final : public LTemplateInstruction<0, 2, 1> { |
| 2758 public: | 2756 public: |
| 2759 LStoreCodeEntry(LOperand* function, LOperand* code_object, | 2757 LStoreCodeEntry(LOperand* function, LOperand* code_object, |
| 2760 LOperand* temp) { | 2758 LOperand* temp) { |
| 2761 inputs_[0] = function; | 2759 inputs_[0] = function; |
| 2762 inputs_[1] = code_object; | 2760 inputs_[1] = code_object; |
| 2763 temps_[0] = temp; | 2761 temps_[0] = temp; |
| 2764 } | 2762 } |
| 2765 | 2763 |
| 2766 LOperand* function() { return inputs_[0]; } | 2764 LOperand* function() { return inputs_[0]; } |
| 2767 LOperand* code_object() { return inputs_[1]; } | 2765 LOperand* code_object() { return inputs_[1]; } |
| 2768 LOperand* temp() { return temps_[0]; } | 2766 LOperand* temp() { return temps_[0]; } |
| 2769 | 2767 |
| 2770 void PrintDataTo(StringStream* stream) OVERRIDE; | 2768 void PrintDataTo(StringStream* stream) override; |
| 2771 | 2769 |
| 2772 DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry") | 2770 DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry") |
| 2773 DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry) | 2771 DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry) |
| 2774 }; | 2772 }; |
| 2775 | 2773 |
| 2776 | 2774 |
| 2777 class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 1> { | 2775 class LStoreContextSlot final : public LTemplateInstruction<0, 2, 1> { |
| 2778 public: | 2776 public: |
| 2779 LStoreContextSlot(LOperand* context, LOperand* value, LOperand* temp) { | 2777 LStoreContextSlot(LOperand* context, LOperand* value, LOperand* temp) { |
| 2780 inputs_[0] = context; | 2778 inputs_[0] = context; |
| 2781 inputs_[1] = value; | 2779 inputs_[1] = value; |
| 2782 temps_[0] = temp; | 2780 temps_[0] = temp; |
| 2783 } | 2781 } |
| 2784 | 2782 |
| 2785 LOperand* context() { return inputs_[0]; } | 2783 LOperand* context() { return inputs_[0]; } |
| 2786 LOperand* value() { return inputs_[1]; } | 2784 LOperand* value() { return inputs_[1]; } |
| 2787 LOperand* temp() { return temps_[0]; } | 2785 LOperand* temp() { return temps_[0]; } |
| 2788 | 2786 |
| 2789 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") | 2787 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") |
| 2790 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) | 2788 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) |
| 2791 | 2789 |
| 2792 int slot_index() { return hydrogen()->slot_index(); } | 2790 int slot_index() { return hydrogen()->slot_index(); } |
| 2793 | 2791 |
| 2794 void PrintDataTo(StringStream* stream) OVERRIDE; | 2792 void PrintDataTo(StringStream* stream) override; |
| 2795 }; | 2793 }; |
| 2796 | 2794 |
| 2797 | 2795 |
| 2798 class LSubI FINAL : public LTemplateInstruction<1, 2, 0> { | 2796 class LSubI final : public LTemplateInstruction<1, 2, 0> { |
| 2799 public: | 2797 public: |
| 2800 LSubI(LOperand* left, LOperand* right) | 2798 LSubI(LOperand* left, LOperand* right) |
| 2801 : shift_(NO_SHIFT), shift_amount_(0) { | 2799 : shift_(NO_SHIFT), shift_amount_(0) { |
| 2802 inputs_[0] = left; | 2800 inputs_[0] = left; |
| 2803 inputs_[1] = right; | 2801 inputs_[1] = right; |
| 2804 } | 2802 } |
| 2805 | 2803 |
| 2806 LSubI(LOperand* left, LOperand* right, Shift shift, LOperand* shift_amount) | 2804 LSubI(LOperand* left, LOperand* right, Shift shift, LOperand* shift_amount) |
| 2807 : shift_(shift), shift_amount_(shift_amount) { | 2805 : shift_(shift), shift_amount_(shift_amount) { |
| 2808 inputs_[0] = left; | 2806 inputs_[0] = left; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 2832 } | 2830 } |
| 2833 | 2831 |
| 2834 LOperand* left() { return inputs_[0]; } | 2832 LOperand* left() { return inputs_[0]; } |
| 2835 LOperand* right() { return inputs_[1]; } | 2833 LOperand* right() { return inputs_[1]; } |
| 2836 | 2834 |
| 2837 DECLARE_CONCRETE_INSTRUCTION(SubS, "sub-s") | 2835 DECLARE_CONCRETE_INSTRUCTION(SubS, "sub-s") |
| 2838 DECLARE_HYDROGEN_ACCESSOR(Sub) | 2836 DECLARE_HYDROGEN_ACCESSOR(Sub) |
| 2839 }; | 2837 }; |
| 2840 | 2838 |
| 2841 | 2839 |
| 2842 class LThisFunction FINAL : public LTemplateInstruction<1, 0, 0> { | 2840 class LThisFunction final : public LTemplateInstruction<1, 0, 0> { |
| 2843 public: | 2841 public: |
| 2844 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") | 2842 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") |
| 2845 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) | 2843 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) |
| 2846 }; | 2844 }; |
| 2847 | 2845 |
| 2848 | 2846 |
| 2849 class LToFastProperties FINAL : public LTemplateInstruction<1, 1, 0> { | 2847 class LToFastProperties final : public LTemplateInstruction<1, 1, 0> { |
| 2850 public: | 2848 public: |
| 2851 explicit LToFastProperties(LOperand* value) { | 2849 explicit LToFastProperties(LOperand* value) { |
| 2852 inputs_[0] = value; | 2850 inputs_[0] = value; |
| 2853 } | 2851 } |
| 2854 | 2852 |
| 2855 LOperand* value() { return inputs_[0]; } | 2853 LOperand* value() { return inputs_[0]; } |
| 2856 | 2854 |
| 2857 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") | 2855 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") |
| 2858 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) | 2856 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) |
| 2859 }; | 2857 }; |
| 2860 | 2858 |
| 2861 | 2859 |
| 2862 class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 2> { | 2860 class LTransitionElementsKind final : public LTemplateInstruction<0, 2, 2> { |
| 2863 public: | 2861 public: |
| 2864 LTransitionElementsKind(LOperand* object, | 2862 LTransitionElementsKind(LOperand* object, |
| 2865 LOperand* context, | 2863 LOperand* context, |
| 2866 LOperand* temp1, | 2864 LOperand* temp1, |
| 2867 LOperand* temp2) { | 2865 LOperand* temp2) { |
| 2868 inputs_[0] = object; | 2866 inputs_[0] = object; |
| 2869 inputs_[1] = context; | 2867 inputs_[1] = context; |
| 2870 temps_[0] = temp1; | 2868 temps_[0] = temp1; |
| 2871 temps_[1] = temp2; | 2869 temps_[1] = temp2; |
| 2872 } | 2870 } |
| 2873 | 2871 |
| 2874 LOperand* object() { return inputs_[0]; } | 2872 LOperand* object() { return inputs_[0]; } |
| 2875 LOperand* context() { return inputs_[1]; } | 2873 LOperand* context() { return inputs_[1]; } |
| 2876 LOperand* temp1() { return temps_[0]; } | 2874 LOperand* temp1() { return temps_[0]; } |
| 2877 LOperand* temp2() { return temps_[1]; } | 2875 LOperand* temp2() { return temps_[1]; } |
| 2878 | 2876 |
| 2879 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, | 2877 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, |
| 2880 "transition-elements-kind") | 2878 "transition-elements-kind") |
| 2881 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) | 2879 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) |
| 2882 | 2880 |
| 2883 void PrintDataTo(StringStream* stream) OVERRIDE; | 2881 void PrintDataTo(StringStream* stream) override; |
| 2884 | 2882 |
| 2885 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } | 2883 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } |
| 2886 Handle<Map> transitioned_map() { | 2884 Handle<Map> transitioned_map() { |
| 2887 return hydrogen()->transitioned_map().handle(); | 2885 return hydrogen()->transitioned_map().handle(); |
| 2888 } | 2886 } |
| 2889 ElementsKind from_kind() const { return hydrogen()->from_kind(); } | 2887 ElementsKind from_kind() const { return hydrogen()->from_kind(); } |
| 2890 ElementsKind to_kind() const { return hydrogen()->to_kind(); } | 2888 ElementsKind to_kind() const { return hydrogen()->to_kind(); } |
| 2891 }; | 2889 }; |
| 2892 | 2890 |
| 2893 | 2891 |
| 2894 class LTrapAllocationMemento FINAL : public LTemplateInstruction<0, 1, 2> { | 2892 class LTrapAllocationMemento final : public LTemplateInstruction<0, 1, 2> { |
| 2895 public: | 2893 public: |
| 2896 LTrapAllocationMemento(LOperand* object, LOperand* temp1, LOperand* temp2) { | 2894 LTrapAllocationMemento(LOperand* object, LOperand* temp1, LOperand* temp2) { |
| 2897 inputs_[0] = object; | 2895 inputs_[0] = object; |
| 2898 temps_[0] = temp1; | 2896 temps_[0] = temp1; |
| 2899 temps_[1] = temp2; | 2897 temps_[1] = temp2; |
| 2900 } | 2898 } |
| 2901 | 2899 |
| 2902 LOperand* object() { return inputs_[0]; } | 2900 LOperand* object() { return inputs_[0]; } |
| 2903 LOperand* temp1() { return temps_[0]; } | 2901 LOperand* temp1() { return temps_[0]; } |
| 2904 LOperand* temp2() { return temps_[1]; } | 2902 LOperand* temp2() { return temps_[1]; } |
| 2905 | 2903 |
| 2906 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento, "trap-allocation-memento") | 2904 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento, "trap-allocation-memento") |
| 2907 }; | 2905 }; |
| 2908 | 2906 |
| 2909 | 2907 |
| 2910 class LTruncateDoubleToIntOrSmi FINAL | 2908 class LTruncateDoubleToIntOrSmi final : public LTemplateInstruction<1, 1, 0> { |
| 2911 : public LTemplateInstruction<1, 1, 0> { | |
| 2912 public: | 2909 public: |
| 2913 explicit LTruncateDoubleToIntOrSmi(LOperand* value) { | 2910 explicit LTruncateDoubleToIntOrSmi(LOperand* value) { |
| 2914 inputs_[0] = value; | 2911 inputs_[0] = value; |
| 2915 } | 2912 } |
| 2916 | 2913 |
| 2917 LOperand* value() { return inputs_[0]; } | 2914 LOperand* value() { return inputs_[0]; } |
| 2918 | 2915 |
| 2919 DECLARE_CONCRETE_INSTRUCTION(TruncateDoubleToIntOrSmi, | 2916 DECLARE_CONCRETE_INSTRUCTION(TruncateDoubleToIntOrSmi, |
| 2920 "truncate-double-to-int-or-smi") | 2917 "truncate-double-to-int-or-smi") |
| 2921 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) | 2918 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) |
| 2922 | 2919 |
| 2923 bool tag_result() { return hydrogen()->representation().IsSmi(); } | 2920 bool tag_result() { return hydrogen()->representation().IsSmi(); } |
| 2924 }; | 2921 }; |
| 2925 | 2922 |
| 2926 | 2923 |
| 2927 class LTypeof FINAL : public LTemplateInstruction<1, 2, 0> { | 2924 class LTypeof final : public LTemplateInstruction<1, 2, 0> { |
| 2928 public: | 2925 public: |
| 2929 LTypeof(LOperand* context, LOperand* value) { | 2926 LTypeof(LOperand* context, LOperand* value) { |
| 2930 inputs_[0] = context; | 2927 inputs_[0] = context; |
| 2931 inputs_[1] = value; | 2928 inputs_[1] = value; |
| 2932 } | 2929 } |
| 2933 | 2930 |
| 2934 LOperand* context() { return inputs_[0]; } | 2931 LOperand* context() { return inputs_[0]; } |
| 2935 LOperand* value() { return inputs_[1]; } | 2932 LOperand* value() { return inputs_[1]; } |
| 2936 | 2933 |
| 2937 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") | 2934 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") |
| 2938 }; | 2935 }; |
| 2939 | 2936 |
| 2940 | 2937 |
| 2941 class LTypeofIsAndBranch FINAL : public LControlInstruction<1, 2> { | 2938 class LTypeofIsAndBranch final : public LControlInstruction<1, 2> { |
| 2942 public: | 2939 public: |
| 2943 LTypeofIsAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) { | 2940 LTypeofIsAndBranch(LOperand* value, LOperand* temp1, LOperand* temp2) { |
| 2944 inputs_[0] = value; | 2941 inputs_[0] = value; |
| 2945 temps_[0] = temp1; | 2942 temps_[0] = temp1; |
| 2946 temps_[1] = temp2; | 2943 temps_[1] = temp2; |
| 2947 } | 2944 } |
| 2948 | 2945 |
| 2949 LOperand* value() { return inputs_[0]; } | 2946 LOperand* value() { return inputs_[0]; } |
| 2950 LOperand* temp1() { return temps_[0]; } | 2947 LOperand* temp1() { return temps_[0]; } |
| 2951 LOperand* temp2() { return temps_[1]; } | 2948 LOperand* temp2() { return temps_[1]; } |
| 2952 | 2949 |
| 2953 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") | 2950 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") |
| 2954 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch) | 2951 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch) |
| 2955 | 2952 |
| 2956 Handle<String> type_literal() const { return hydrogen()->type_literal(); } | 2953 Handle<String> type_literal() const { return hydrogen()->type_literal(); } |
| 2957 | 2954 |
| 2958 void PrintDataTo(StringStream* stream) OVERRIDE; | 2955 void PrintDataTo(StringStream* stream) override; |
| 2959 }; | 2956 }; |
| 2960 | 2957 |
| 2961 | 2958 |
| 2962 class LUint32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> { | 2959 class LUint32ToDouble final : public LTemplateInstruction<1, 1, 0> { |
| 2963 public: | 2960 public: |
| 2964 explicit LUint32ToDouble(LOperand* value) { | 2961 explicit LUint32ToDouble(LOperand* value) { |
| 2965 inputs_[0] = value; | 2962 inputs_[0] = value; |
| 2966 } | 2963 } |
| 2967 | 2964 |
| 2968 LOperand* value() { return inputs_[0]; } | 2965 LOperand* value() { return inputs_[0]; } |
| 2969 | 2966 |
| 2970 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double") | 2967 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double") |
| 2971 }; | 2968 }; |
| 2972 | 2969 |
| 2973 | 2970 |
| 2974 class LCheckMapValue FINAL : public LTemplateInstruction<0, 2, 1> { | 2971 class LCheckMapValue final : public LTemplateInstruction<0, 2, 1> { |
| 2975 public: | 2972 public: |
| 2976 LCheckMapValue(LOperand* value, LOperand* map, LOperand* temp) { | 2973 LCheckMapValue(LOperand* value, LOperand* map, LOperand* temp) { |
| 2977 inputs_[0] = value; | 2974 inputs_[0] = value; |
| 2978 inputs_[1] = map; | 2975 inputs_[1] = map; |
| 2979 temps_[0] = temp; | 2976 temps_[0] = temp; |
| 2980 } | 2977 } |
| 2981 | 2978 |
| 2982 LOperand* value() { return inputs_[0]; } | 2979 LOperand* value() { return inputs_[0]; } |
| 2983 LOperand* map() { return inputs_[1]; } | 2980 LOperand* map() { return inputs_[1]; } |
| 2984 LOperand* temp() { return temps_[0]; } | 2981 LOperand* temp() { return temps_[0]; } |
| 2985 | 2982 |
| 2986 DECLARE_CONCRETE_INSTRUCTION(CheckMapValue, "check-map-value") | 2983 DECLARE_CONCRETE_INSTRUCTION(CheckMapValue, "check-map-value") |
| 2987 }; | 2984 }; |
| 2988 | 2985 |
| 2989 | 2986 |
| 2990 class LLoadFieldByIndex FINAL : public LTemplateInstruction<1, 2, 0> { | 2987 class LLoadFieldByIndex final : public LTemplateInstruction<1, 2, 0> { |
| 2991 public: | 2988 public: |
| 2992 LLoadFieldByIndex(LOperand* object, LOperand* index) { | 2989 LLoadFieldByIndex(LOperand* object, LOperand* index) { |
| 2993 inputs_[0] = object; | 2990 inputs_[0] = object; |
| 2994 inputs_[1] = index; | 2991 inputs_[1] = index; |
| 2995 } | 2992 } |
| 2996 | 2993 |
| 2997 LOperand* object() { return inputs_[0]; } | 2994 LOperand* object() { return inputs_[0]; } |
| 2998 LOperand* index() { return inputs_[1]; } | 2995 LOperand* index() { return inputs_[1]; } |
| 2999 | 2996 |
| 3000 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") | 2997 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") |
| (...skipping 22 matching lines...) Expand all Loading... |
| 3023 LOperand* context() { return inputs_[0]; } | 3020 LOperand* context() { return inputs_[0]; } |
| 3024 LOperand* function() { return inputs_[1]; } | 3021 LOperand* function() { return inputs_[1]; } |
| 3025 | 3022 |
| 3026 Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); } | 3023 Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); } |
| 3027 | 3024 |
| 3028 DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context") | 3025 DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context") |
| 3029 DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext) | 3026 DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext) |
| 3030 }; | 3027 }; |
| 3031 | 3028 |
| 3032 | 3029 |
| 3033 class LWrapReceiver FINAL : public LTemplateInstruction<1, 2, 0> { | 3030 class LWrapReceiver final : public LTemplateInstruction<1, 2, 0> { |
| 3034 public: | 3031 public: |
| 3035 LWrapReceiver(LOperand* receiver, LOperand* function) { | 3032 LWrapReceiver(LOperand* receiver, LOperand* function) { |
| 3036 inputs_[0] = receiver; | 3033 inputs_[0] = receiver; |
| 3037 inputs_[1] = function; | 3034 inputs_[1] = function; |
| 3038 } | 3035 } |
| 3039 | 3036 |
| 3040 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") | 3037 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") |
| 3041 DECLARE_HYDROGEN_ACCESSOR(WrapReceiver) | 3038 DECLARE_HYDROGEN_ACCESSOR(WrapReceiver) |
| 3042 | 3039 |
| 3043 LOperand* receiver() { return inputs_[0]; } | 3040 LOperand* receiver() { return inputs_[0]; } |
| 3044 LOperand* function() { return inputs_[1]; } | 3041 LOperand* function() { return inputs_[1]; } |
| 3045 }; | 3042 }; |
| 3046 | 3043 |
| 3047 | 3044 |
| 3048 class LChunkBuilder; | 3045 class LChunkBuilder; |
| 3049 class LPlatformChunk FINAL : public LChunk { | 3046 class LPlatformChunk final : public LChunk { |
| 3050 public: | 3047 public: |
| 3051 LPlatformChunk(CompilationInfo* info, HGraph* graph) | 3048 LPlatformChunk(CompilationInfo* info, HGraph* graph) |
| 3052 : LChunk(info, graph) { } | 3049 : LChunk(info, graph) { } |
| 3053 | 3050 |
| 3054 int GetNextSpillIndex(); | 3051 int GetNextSpillIndex(); |
| 3055 LOperand* GetNextSpillSlot(RegisterKind kind); | 3052 LOperand* GetNextSpillSlot(RegisterKind kind); |
| 3056 }; | 3053 }; |
| 3057 | 3054 |
| 3058 | 3055 |
| 3059 class LChunkBuilder FINAL : public LChunkBuilderBase { | 3056 class LChunkBuilder final : public LChunkBuilderBase { |
| 3060 public: | 3057 public: |
| 3061 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) | 3058 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) |
| 3062 : LChunkBuilderBase(info, graph), | 3059 : LChunkBuilderBase(info, graph), |
| 3063 current_instruction_(NULL), | 3060 current_instruction_(NULL), |
| 3064 current_block_(NULL), | 3061 current_block_(NULL), |
| 3065 allocator_(allocator) {} | 3062 allocator_(allocator) {} |
| 3066 | 3063 |
| 3067 // Build the sequence for the graph. | 3064 // Build the sequence for the graph. |
| 3068 LPlatformChunk* Build(); | 3065 LPlatformChunk* Build(); |
| 3069 | 3066 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3214 | 3211 |
| 3215 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 3212 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 3216 }; | 3213 }; |
| 3217 | 3214 |
| 3218 #undef DECLARE_HYDROGEN_ACCESSOR | 3215 #undef DECLARE_HYDROGEN_ACCESSOR |
| 3219 #undef DECLARE_CONCRETE_INSTRUCTION | 3216 #undef DECLARE_CONCRETE_INSTRUCTION |
| 3220 | 3217 |
| 3221 } } // namespace v8::internal | 3218 } } // namespace v8::internal |
| 3222 | 3219 |
| 3223 #endif // V8_ARM64_LITHIUM_ARM64_H_ | 3220 #endif // V8_ARM64_LITHIUM_ARM64_H_ |
| OLD | NEW |