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