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