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