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