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