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