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