| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_X87_LITHIUM_X87_H_ | 5 #ifndef V8_X87_LITHIUM_X87_H_ |
| 6 #define V8_X87_LITHIUM_X87_H_ | 6 #define V8_X87_LITHIUM_X87_H_ |
| 7 | 7 |
| 8 #include "src/hydrogen.h" | 8 #include "src/hydrogen.h" |
| 9 #include "src/lithium.h" | 9 #include "src/lithium.h" |
| 10 #include "src/lithium-allocator.h" | 10 #include "src/lithium-allocator.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 V(ToFastProperties) \ | 161 V(ToFastProperties) \ |
| 162 V(TransitionElementsKind) \ | 162 V(TransitionElementsKind) \ |
| 163 V(TrapAllocationMemento) \ | 163 V(TrapAllocationMemento) \ |
| 164 V(Typeof) \ | 164 V(Typeof) \ |
| 165 V(TypeofIsAndBranch) \ | 165 V(TypeofIsAndBranch) \ |
| 166 V(Uint32ToDouble) \ | 166 V(Uint32ToDouble) \ |
| 167 V(UnknownOSRValue) \ | 167 V(UnknownOSRValue) \ |
| 168 V(WrapReceiver) | 168 V(WrapReceiver) |
| 169 | 169 |
| 170 | 170 |
| 171 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 171 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
| 172 virtual Opcode opcode() const FINAL OVERRIDE { \ | 172 Opcode opcode() const FINAL { return LInstruction::k##type; } \ |
| 173 return LInstruction::k##type; \ | 173 void CompileToNative(LCodeGen* generator) FINAL; \ |
| 174 } \ | 174 const char* Mnemonic() const FINAL { return mnemonic; } \ |
| 175 virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \ | 175 static L##type* cast(LInstruction* instr) { \ |
| 176 virtual const char* Mnemonic() const FINAL OVERRIDE { \ | 176 DCHECK(instr->Is##type()); \ |
| 177 return mnemonic; \ | 177 return reinterpret_cast<L##type*>(instr); \ |
| 178 } \ | |
| 179 static L##type* cast(LInstruction* instr) { \ | |
| 180 DCHECK(instr->Is##type()); \ | |
| 181 return reinterpret_cast<L##type*>(instr); \ | |
| 182 } | 178 } |
| 183 | 179 |
| 184 | 180 |
| 185 #define DECLARE_HYDROGEN_ACCESSOR(type) \ | 181 #define DECLARE_HYDROGEN_ACCESSOR(type) \ |
| 186 H##type* hydrogen() const { \ | 182 H##type* hydrogen() const { \ |
| 187 return H##type::cast(hydrogen_value()); \ | 183 return H##type::cast(hydrogen_value()); \ |
| 188 } | 184 } |
| 189 | 185 |
| 190 | 186 |
| 191 class LInstruction : public ZoneObject { | 187 class LInstruction : public ZoneObject { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 int bit_field_; | 286 int bit_field_; |
| 291 }; | 287 }; |
| 292 | 288 |
| 293 | 289 |
| 294 // R = number of result operands (0 or 1). | 290 // R = number of result operands (0 or 1). |
| 295 template<int R> | 291 template<int R> |
| 296 class LTemplateResultInstruction : public LInstruction { | 292 class LTemplateResultInstruction : public LInstruction { |
| 297 public: | 293 public: |
| 298 // Allow 0 or 1 output operands. | 294 // Allow 0 or 1 output operands. |
| 299 STATIC_ASSERT(R == 0 || R == 1); | 295 STATIC_ASSERT(R == 0 || R == 1); |
| 300 virtual bool HasResult() const FINAL OVERRIDE { | 296 bool HasResult() const FINAL { return R != 0 && result() != NULL; } |
| 301 return R != 0 && result() != NULL; | |
| 302 } | |
| 303 void set_result(LOperand* operand) { results_[0] = operand; } | 297 void set_result(LOperand* operand) { results_[0] = operand; } |
| 304 LOperand* result() const { return results_[0]; } | 298 LOperand* result() const OVERRIDE { return results_[0]; } |
| 305 | 299 |
| 306 protected: | 300 protected: |
| 307 EmbeddedContainer<LOperand*, R> results_; | 301 EmbeddedContainer<LOperand*, R> results_; |
| 308 }; | 302 }; |
| 309 | 303 |
| 310 | 304 |
| 311 // R = number of result operands (0 or 1). | 305 // R = number of result operands (0 or 1). |
| 312 // I = number of input operands. | 306 // I = number of input operands. |
| 313 // T = number of temporary operands. | 307 // T = number of temporary operands. |
| 314 template<int R, int I, int T> | 308 template<int R, int I, int T> |
| 315 class LTemplateInstruction : public LTemplateResultInstruction<R> { | 309 class LTemplateInstruction : public LTemplateResultInstruction<R> { |
| 316 protected: | 310 protected: |
| 317 EmbeddedContainer<LOperand*, I> inputs_; | 311 EmbeddedContainer<LOperand*, I> inputs_; |
| 318 EmbeddedContainer<LOperand*, T> temps_; | 312 EmbeddedContainer<LOperand*, T> temps_; |
| 319 | 313 |
| 320 private: | 314 private: |
| 321 // Iterator support. | 315 // Iterator support. |
| 322 virtual int InputCount() FINAL OVERRIDE { return I; } | 316 int InputCount() FINAL { return I; } |
| 323 virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; } | 317 LOperand* InputAt(int i) FINAL { return inputs_[i]; } |
| 324 | 318 |
| 325 virtual int TempCount() FINAL OVERRIDE { return T; } | 319 int TempCount() FINAL { return T; } |
| 326 virtual LOperand* TempAt(int i) FINAL OVERRIDE { return temps_[i]; } | 320 LOperand* TempAt(int i) FINAL { return temps_[i]; } |
| 327 }; | 321 }; |
| 328 | 322 |
| 329 | 323 |
| 330 class LGap : public LTemplateInstruction<0, 0, 0> { | 324 class LGap : public LTemplateInstruction<0, 0, 0> { |
| 331 public: | 325 public: |
| 332 explicit LGap(HBasicBlock* block) : block_(block) { | 326 explicit LGap(HBasicBlock* block) : block_(block) { |
| 333 parallel_moves_[BEFORE] = NULL; | 327 parallel_moves_[BEFORE] = NULL; |
| 334 parallel_moves_[START] = NULL; | 328 parallel_moves_[START] = NULL; |
| 335 parallel_moves_[END] = NULL; | 329 parallel_moves_[END] = NULL; |
| 336 parallel_moves_[AFTER] = NULL; | 330 parallel_moves_[AFTER] = NULL; |
| 337 } | 331 } |
| 338 | 332 |
| 339 // Can't use the DECLARE-macro here because of sub-classes. | 333 // Can't use the DECLARE-macro here because of sub-classes. |
| 340 virtual bool IsGap() const FINAL OVERRIDE { return true; } | 334 bool IsGap() const FINAL { return true; } |
| 341 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 335 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 342 static LGap* cast(LInstruction* instr) { | 336 static LGap* cast(LInstruction* instr) { |
| 343 DCHECK(instr->IsGap()); | 337 DCHECK(instr->IsGap()); |
| 344 return reinterpret_cast<LGap*>(instr); | 338 return reinterpret_cast<LGap*>(instr); |
| 345 } | 339 } |
| 346 | 340 |
| 347 bool IsRedundant() const; | 341 bool IsRedundant() const; |
| 348 | 342 |
| 349 HBasicBlock* block() const { return block_; } | 343 HBasicBlock* block() const { return block_; } |
| 350 | 344 |
| 351 enum InnerPosition { | 345 enum InnerPosition { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 371 private: | 365 private: |
| 372 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; | 366 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; |
| 373 HBasicBlock* block_; | 367 HBasicBlock* block_; |
| 374 }; | 368 }; |
| 375 | 369 |
| 376 | 370 |
| 377 class LInstructionGap FINAL : public LGap { | 371 class LInstructionGap FINAL : public LGap { |
| 378 public: | 372 public: |
| 379 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } | 373 explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } |
| 380 | 374 |
| 381 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { | 375 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { |
| 382 return !IsRedundant(); | 376 return !IsRedundant(); |
| 383 } | 377 } |
| 384 | 378 |
| 385 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") | 379 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") |
| 386 }; | 380 }; |
| 387 | 381 |
| 388 | 382 |
| 389 class LClobberDoubles FINAL : public LTemplateInstruction<0, 0, 0> { | 383 class LClobberDoubles FINAL : public LTemplateInstruction<0, 0, 0> { |
| 390 public: | 384 public: |
| 391 explicit LClobberDoubles(Isolate* isolate) { } | 385 explicit LClobberDoubles(Isolate* isolate) { } |
| 392 | 386 |
| 393 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE { | 387 bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE { return true; } |
| 394 return true; | |
| 395 } | |
| 396 | 388 |
| 397 DECLARE_CONCRETE_INSTRUCTION(ClobberDoubles, "clobber-d") | 389 DECLARE_CONCRETE_INSTRUCTION(ClobberDoubles, "clobber-d") |
| 398 }; | 390 }; |
| 399 | 391 |
| 400 | 392 |
| 401 class LGoto FINAL : public LTemplateInstruction<0, 0, 0> { | 393 class LGoto FINAL : public LTemplateInstruction<0, 0, 0> { |
| 402 public: | 394 public: |
| 403 explicit LGoto(HBasicBlock* block) : block_(block) { } | 395 explicit LGoto(HBasicBlock* block) : block_(block) { } |
| 404 | 396 |
| 405 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE; | 397 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE; |
| 406 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") | 398 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") |
| 407 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 399 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 408 virtual bool IsControl() const OVERRIDE { return true; } | 400 bool IsControl() const OVERRIDE { return true; } |
| 409 | 401 |
| 410 int block_id() const { return block_->block_id(); } | 402 int block_id() const { return block_->block_id(); } |
| 411 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE { | 403 bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE { |
| 412 return false; | 404 return false; |
| 413 } | 405 } |
| 414 | 406 |
| 415 bool jumps_to_join() const { return block_->predecessors()->length() > 1; } | 407 bool jumps_to_join() const { return block_->predecessors()->length() > 1; } |
| 416 HBasicBlock* block() const { return block_; } | 408 HBasicBlock* block() const { return block_; } |
| 417 | 409 |
| 418 private: | 410 private: |
| 419 HBasicBlock* block_; | 411 HBasicBlock* block_; |
| 420 }; | 412 }; |
| 421 | 413 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 437 public: | 429 public: |
| 438 explicit LDummyUse(LOperand* value) { | 430 explicit LDummyUse(LOperand* value) { |
| 439 inputs_[0] = value; | 431 inputs_[0] = value; |
| 440 } | 432 } |
| 441 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") | 433 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") |
| 442 }; | 434 }; |
| 443 | 435 |
| 444 | 436 |
| 445 class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> { | 437 class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> { |
| 446 public: | 438 public: |
| 447 virtual bool IsControl() const OVERRIDE { return true; } | 439 bool IsControl() const OVERRIDE { return true; } |
| 448 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") | 440 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") |
| 449 DECLARE_HYDROGEN_ACCESSOR(Deoptimize) | 441 DECLARE_HYDROGEN_ACCESSOR(Deoptimize) |
| 450 }; | 442 }; |
| 451 | 443 |
| 452 | 444 |
| 453 class LLabel FINAL : public LGap { | 445 class LLabel FINAL : public LGap { |
| 454 public: | 446 public: |
| 455 explicit LLabel(HBasicBlock* block) | 447 explicit LLabel(HBasicBlock* block) |
| 456 : LGap(block), replacement_(NULL) { } | 448 : LGap(block), replacement_(NULL) { } |
| 457 | 449 |
| 458 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { | 450 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; } |
| 459 return false; | |
| 460 } | |
| 461 DECLARE_CONCRETE_INSTRUCTION(Label, "label") | 451 DECLARE_CONCRETE_INSTRUCTION(Label, "label") |
| 462 | 452 |
| 463 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 453 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 464 | 454 |
| 465 int block_id() const { return block()->block_id(); } | 455 int block_id() const { return block()->block_id(); } |
| 466 bool is_loop_header() const { return block()->IsLoopHeader(); } | 456 bool is_loop_header() const { return block()->IsLoopHeader(); } |
| 467 bool is_osr_entry() const { return block()->is_osr_entry(); } | 457 bool is_osr_entry() const { return block()->is_osr_entry(); } |
| 468 Label* label() { return &label_; } | 458 Label* label() { return &label_; } |
| 469 LLabel* replacement() const { return replacement_; } | 459 LLabel* replacement() const { return replacement_; } |
| 470 void set_replacement(LLabel* label) { replacement_ = label; } | 460 void set_replacement(LLabel* label) { replacement_ = label; } |
| 471 bool HasReplacement() const { return replacement_ != NULL; } | 461 bool HasReplacement() const { return replacement_ != NULL; } |
| 472 | 462 |
| 473 private: | 463 private: |
| 474 Label label_; | 464 Label label_; |
| 475 LLabel* replacement_; | 465 LLabel* replacement_; |
| 476 }; | 466 }; |
| 477 | 467 |
| 478 | 468 |
| 479 class LParameter FINAL : public LTemplateInstruction<1, 0, 0> { | 469 class LParameter FINAL : public LTemplateInstruction<1, 0, 0> { |
| 480 public: | 470 public: |
| 481 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { | 471 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; } |
| 482 return false; | |
| 483 } | |
| 484 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") | 472 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") |
| 485 }; | 473 }; |
| 486 | 474 |
| 487 | 475 |
| 488 class LCallStub FINAL : public LTemplateInstruction<1, 1, 0> { | 476 class LCallStub FINAL : public LTemplateInstruction<1, 1, 0> { |
| 489 public: | 477 public: |
| 490 explicit LCallStub(LOperand* context) { | 478 explicit LCallStub(LOperand* context) { |
| 491 inputs_[0] = context; | 479 inputs_[0] = context; |
| 492 } | 480 } |
| 493 | 481 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 514 LOperand* name() { return inputs_[2]; } | 502 LOperand* name() { return inputs_[2]; } |
| 515 | 503 |
| 516 DECLARE_CONCRETE_INSTRUCTION(TailCallThroughMegamorphicCache, | 504 DECLARE_CONCRETE_INSTRUCTION(TailCallThroughMegamorphicCache, |
| 517 "tail-call-through-megamorphic-cache") | 505 "tail-call-through-megamorphic-cache") |
| 518 DECLARE_HYDROGEN_ACCESSOR(TailCallThroughMegamorphicCache) | 506 DECLARE_HYDROGEN_ACCESSOR(TailCallThroughMegamorphicCache) |
| 519 }; | 507 }; |
| 520 | 508 |
| 521 | 509 |
| 522 class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> { | 510 class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> { |
| 523 public: | 511 public: |
| 524 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { | 512 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; } |
| 525 return false; | |
| 526 } | |
| 527 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") | 513 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") |
| 528 }; | 514 }; |
| 529 | 515 |
| 530 | 516 |
| 531 template<int I, int T> | 517 template<int I, int T> |
| 532 class LControlInstruction: public LTemplateInstruction<0, I, T> { | 518 class LControlInstruction: public LTemplateInstruction<0, I, T> { |
| 533 public: | 519 public: |
| 534 LControlInstruction() : false_label_(NULL), true_label_(NULL) { } | 520 LControlInstruction() : false_label_(NULL), true_label_(NULL) { } |
| 535 | 521 |
| 536 virtual bool IsControl() const FINAL OVERRIDE { return true; } | 522 bool IsControl() const FINAL { return true; } |
| 537 | 523 |
| 538 int SuccessorCount() { return hydrogen()->SuccessorCount(); } | 524 int SuccessorCount() { return hydrogen()->SuccessorCount(); } |
| 539 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } | 525 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } |
| 540 | 526 |
| 541 int TrueDestination(LChunk* chunk) { | 527 int TrueDestination(LChunk* chunk) { |
| 542 return chunk->LookupDestination(true_block_id()); | 528 return chunk->LookupDestination(true_block_id()); |
| 543 } | 529 } |
| 544 int FalseDestination(LChunk* chunk) { | 530 int FalseDestination(LChunk* chunk) { |
| 545 return chunk->LookupDestination(false_block_id()); | 531 return chunk->LookupDestination(false_block_id()); |
| 546 } | 532 } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 inputs_[1] = length; | 605 inputs_[1] = length; |
| 620 inputs_[2] = index; | 606 inputs_[2] = index; |
| 621 } | 607 } |
| 622 | 608 |
| 623 LOperand* arguments() { return inputs_[0]; } | 609 LOperand* arguments() { return inputs_[0]; } |
| 624 LOperand* length() { return inputs_[1]; } | 610 LOperand* length() { return inputs_[1]; } |
| 625 LOperand* index() { return inputs_[2]; } | 611 LOperand* index() { return inputs_[2]; } |
| 626 | 612 |
| 627 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") | 613 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") |
| 628 | 614 |
| 629 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 615 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 630 }; | 616 }; |
| 631 | 617 |
| 632 | 618 |
| 633 class LArgumentsLength FINAL : public LTemplateInstruction<1, 1, 0> { | 619 class LArgumentsLength FINAL : public LTemplateInstruction<1, 1, 0> { |
| 634 public: | 620 public: |
| 635 explicit LArgumentsLength(LOperand* elements) { | 621 explicit LArgumentsLength(LOperand* elements) { |
| 636 inputs_[0] = elements; | 622 inputs_[0] = elements; |
| 637 } | 623 } |
| 638 | 624 |
| 639 LOperand* elements() { return inputs_[0]; } | 625 LOperand* elements() { return inputs_[0]; } |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 | 854 |
| 869 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch, | 855 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch, |
| 870 "compare-numeric-and-branch") | 856 "compare-numeric-and-branch") |
| 871 DECLARE_HYDROGEN_ACCESSOR(CompareNumericAndBranch) | 857 DECLARE_HYDROGEN_ACCESSOR(CompareNumericAndBranch) |
| 872 | 858 |
| 873 Token::Value op() const { return hydrogen()->token(); } | 859 Token::Value op() const { return hydrogen()->token(); } |
| 874 bool is_double() const { | 860 bool is_double() const { |
| 875 return hydrogen()->representation().IsDouble(); | 861 return hydrogen()->representation().IsDouble(); |
| 876 } | 862 } |
| 877 | 863 |
| 878 virtual void PrintDataTo(StringStream* stream); | 864 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 879 }; | 865 }; |
| 880 | 866 |
| 881 | 867 |
| 882 class LMathFloor FINAL : public LTemplateInstruction<1, 1, 0> { | 868 class LMathFloor FINAL : public LTemplateInstruction<1, 1, 0> { |
| 883 public: | 869 public: |
| 884 explicit LMathFloor(LOperand* value) { | 870 explicit LMathFloor(LOperand* value) { |
| 885 inputs_[0] = value; | 871 inputs_[0] = value; |
| 886 } | 872 } |
| 887 | 873 |
| 888 LOperand* value() { return inputs_[0]; } | 874 LOperand* value() { return inputs_[0]; } |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1045 LIsObjectAndBranch(LOperand* value, LOperand* temp) { | 1031 LIsObjectAndBranch(LOperand* value, LOperand* temp) { |
| 1046 inputs_[0] = value; | 1032 inputs_[0] = value; |
| 1047 temps_[0] = temp; | 1033 temps_[0] = temp; |
| 1048 } | 1034 } |
| 1049 | 1035 |
| 1050 LOperand* value() { return inputs_[0]; } | 1036 LOperand* value() { return inputs_[0]; } |
| 1051 LOperand* temp() { return temps_[0]; } | 1037 LOperand* temp() { return temps_[0]; } |
| 1052 | 1038 |
| 1053 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") | 1039 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") |
| 1054 | 1040 |
| 1055 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1041 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1056 }; | 1042 }; |
| 1057 | 1043 |
| 1058 | 1044 |
| 1059 class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> { | 1045 class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> { |
| 1060 public: | 1046 public: |
| 1061 LIsStringAndBranch(LOperand* value, LOperand* temp) { | 1047 LIsStringAndBranch(LOperand* value, LOperand* temp) { |
| 1062 inputs_[0] = value; | 1048 inputs_[0] = value; |
| 1063 temps_[0] = temp; | 1049 temps_[0] = temp; |
| 1064 } | 1050 } |
| 1065 | 1051 |
| 1066 LOperand* value() { return inputs_[0]; } | 1052 LOperand* value() { return inputs_[0]; } |
| 1067 LOperand* temp() { return temps_[0]; } | 1053 LOperand* temp() { return temps_[0]; } |
| 1068 | 1054 |
| 1069 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") | 1055 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") |
| 1070 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) | 1056 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) |
| 1071 | 1057 |
| 1072 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1058 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1073 }; | 1059 }; |
| 1074 | 1060 |
| 1075 | 1061 |
| 1076 class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> { | 1062 class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> { |
| 1077 public: | 1063 public: |
| 1078 explicit LIsSmiAndBranch(LOperand* value) { | 1064 explicit LIsSmiAndBranch(LOperand* value) { |
| 1079 inputs_[0] = value; | 1065 inputs_[0] = value; |
| 1080 } | 1066 } |
| 1081 | 1067 |
| 1082 LOperand* value() { return inputs_[0]; } | 1068 LOperand* value() { return inputs_[0]; } |
| 1083 | 1069 |
| 1084 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") | 1070 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") |
| 1085 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) | 1071 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) |
| 1086 | 1072 |
| 1087 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1073 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1088 }; | 1074 }; |
| 1089 | 1075 |
| 1090 | 1076 |
| 1091 class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> { | 1077 class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> { |
| 1092 public: | 1078 public: |
| 1093 LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { | 1079 LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { |
| 1094 inputs_[0] = value; | 1080 inputs_[0] = value; |
| 1095 temps_[0] = temp; | 1081 temps_[0] = temp; |
| 1096 } | 1082 } |
| 1097 | 1083 |
| 1098 LOperand* value() { return inputs_[0]; } | 1084 LOperand* value() { return inputs_[0]; } |
| 1099 LOperand* temp() { return temps_[0]; } | 1085 LOperand* temp() { return temps_[0]; } |
| 1100 | 1086 |
| 1101 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, | 1087 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, |
| 1102 "is-undetectable-and-branch") | 1088 "is-undetectable-and-branch") |
| 1103 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) | 1089 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) |
| 1104 | 1090 |
| 1105 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1091 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1106 }; | 1092 }; |
| 1107 | 1093 |
| 1108 | 1094 |
| 1109 class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> { | 1095 class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> { |
| 1110 public: | 1096 public: |
| 1111 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) { | 1097 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) { |
| 1112 inputs_[0] = context; | 1098 inputs_[0] = context; |
| 1113 inputs_[1] = left; | 1099 inputs_[1] = left; |
| 1114 inputs_[2] = right; | 1100 inputs_[2] = right; |
| 1115 } | 1101 } |
| 1116 | 1102 |
| 1117 LOperand* context() { return inputs_[1]; } | 1103 LOperand* context() { return inputs_[1]; } |
| 1118 LOperand* left() { return inputs_[1]; } | 1104 LOperand* left() { return inputs_[1]; } |
| 1119 LOperand* right() { return inputs_[2]; } | 1105 LOperand* right() { return inputs_[2]; } |
| 1120 | 1106 |
| 1121 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, | 1107 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, |
| 1122 "string-compare-and-branch") | 1108 "string-compare-and-branch") |
| 1123 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) | 1109 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) |
| 1124 | 1110 |
| 1125 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1111 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1126 | 1112 |
| 1127 Token::Value op() const { return hydrogen()->token(); } | 1113 Token::Value op() const { return hydrogen()->token(); } |
| 1128 }; | 1114 }; |
| 1129 | 1115 |
| 1130 | 1116 |
| 1131 class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 1> { | 1117 class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 1> { |
| 1132 public: | 1118 public: |
| 1133 LHasInstanceTypeAndBranch(LOperand* value, LOperand* temp) { | 1119 LHasInstanceTypeAndBranch(LOperand* value, LOperand* temp) { |
| 1134 inputs_[0] = value; | 1120 inputs_[0] = value; |
| 1135 temps_[0] = temp; | 1121 temps_[0] = temp; |
| 1136 } | 1122 } |
| 1137 | 1123 |
| 1138 LOperand* value() { return inputs_[0]; } | 1124 LOperand* value() { return inputs_[0]; } |
| 1139 LOperand* temp() { return temps_[0]; } | 1125 LOperand* temp() { return temps_[0]; } |
| 1140 | 1126 |
| 1141 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, | 1127 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, |
| 1142 "has-instance-type-and-branch") | 1128 "has-instance-type-and-branch") |
| 1143 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) | 1129 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) |
| 1144 | 1130 |
| 1145 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1131 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1146 }; | 1132 }; |
| 1147 | 1133 |
| 1148 | 1134 |
| 1149 class LGetCachedArrayIndex FINAL : public LTemplateInstruction<1, 1, 0> { | 1135 class LGetCachedArrayIndex FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1150 public: | 1136 public: |
| 1151 explicit LGetCachedArrayIndex(LOperand* value) { | 1137 explicit LGetCachedArrayIndex(LOperand* value) { |
| 1152 inputs_[0] = value; | 1138 inputs_[0] = value; |
| 1153 } | 1139 } |
| 1154 | 1140 |
| 1155 LOperand* value() { return inputs_[0]; } | 1141 LOperand* value() { return inputs_[0]; } |
| 1156 | 1142 |
| 1157 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") | 1143 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") |
| 1158 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) | 1144 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) |
| 1159 }; | 1145 }; |
| 1160 | 1146 |
| 1161 | 1147 |
| 1162 class LHasCachedArrayIndexAndBranch FINAL | 1148 class LHasCachedArrayIndexAndBranch FINAL |
| 1163 : public LControlInstruction<1, 0> { | 1149 : public LControlInstruction<1, 0> { |
| 1164 public: | 1150 public: |
| 1165 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { | 1151 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { |
| 1166 inputs_[0] = value; | 1152 inputs_[0] = value; |
| 1167 } | 1153 } |
| 1168 | 1154 |
| 1169 LOperand* value() { return inputs_[0]; } | 1155 LOperand* value() { return inputs_[0]; } |
| 1170 | 1156 |
| 1171 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, | 1157 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, |
| 1172 "has-cached-array-index-and-branch") | 1158 "has-cached-array-index-and-branch") |
| 1173 | 1159 |
| 1174 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1160 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1175 }; | 1161 }; |
| 1176 | 1162 |
| 1177 | 1163 |
| 1178 class LIsConstructCallAndBranch FINAL : public LControlInstruction<0, 1> { | 1164 class LIsConstructCallAndBranch FINAL : public LControlInstruction<0, 1> { |
| 1179 public: | 1165 public: |
| 1180 explicit LIsConstructCallAndBranch(LOperand* temp) { | 1166 explicit LIsConstructCallAndBranch(LOperand* temp) { |
| 1181 temps_[0] = temp; | 1167 temps_[0] = temp; |
| 1182 } | 1168 } |
| 1183 | 1169 |
| 1184 LOperand* temp() { return temps_[0]; } | 1170 LOperand* temp() { return temps_[0]; } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1197 } | 1183 } |
| 1198 | 1184 |
| 1199 LOperand* value() { return inputs_[0]; } | 1185 LOperand* value() { return inputs_[0]; } |
| 1200 LOperand* temp() { return temps_[0]; } | 1186 LOperand* temp() { return temps_[0]; } |
| 1201 LOperand* temp2() { return temps_[1]; } | 1187 LOperand* temp2() { return temps_[1]; } |
| 1202 | 1188 |
| 1203 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, | 1189 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, |
| 1204 "class-of-test-and-branch") | 1190 "class-of-test-and-branch") |
| 1205 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) | 1191 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) |
| 1206 | 1192 |
| 1207 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1193 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1208 }; | 1194 }; |
| 1209 | 1195 |
| 1210 | 1196 |
| 1211 class LCmpT FINAL : public LTemplateInstruction<1, 3, 0> { | 1197 class LCmpT FINAL : public LTemplateInstruction<1, 3, 0> { |
| 1212 public: | 1198 public: |
| 1213 LCmpT(LOperand* context, LOperand* left, LOperand* right) { | 1199 LCmpT(LOperand* context, LOperand* left, LOperand* right) { |
| 1214 inputs_[0] = context; | 1200 inputs_[0] = context; |
| 1215 inputs_[1] = left; | 1201 inputs_[1] = left; |
| 1216 inputs_[2] = right; | 1202 inputs_[2] = right; |
| 1217 } | 1203 } |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1392 inputs_[0] = value; | 1378 inputs_[0] = value; |
| 1393 temps_[0] = temp; | 1379 temps_[0] = temp; |
| 1394 } | 1380 } |
| 1395 | 1381 |
| 1396 LOperand* value() { return inputs_[0]; } | 1382 LOperand* value() { return inputs_[0]; } |
| 1397 LOperand* temp() { return temps_[0]; } | 1383 LOperand* temp() { return temps_[0]; } |
| 1398 | 1384 |
| 1399 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") | 1385 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") |
| 1400 DECLARE_HYDROGEN_ACCESSOR(Branch) | 1386 DECLARE_HYDROGEN_ACCESSOR(Branch) |
| 1401 | 1387 |
| 1402 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1388 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1403 }; | 1389 }; |
| 1404 | 1390 |
| 1405 | 1391 |
| 1406 class LCmpMapAndBranch FINAL : public LControlInstruction<1, 0> { | 1392 class LCmpMapAndBranch FINAL : public LControlInstruction<1, 0> { |
| 1407 public: | 1393 public: |
| 1408 explicit LCmpMapAndBranch(LOperand* value) { | 1394 explicit LCmpMapAndBranch(LOperand* value) { |
| 1409 inputs_[0] = value; | 1395 inputs_[0] = value; |
| 1410 } | 1396 } |
| 1411 | 1397 |
| 1412 LOperand* value() { return inputs_[0]; } | 1398 LOperand* value() { return inputs_[0]; } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1545 : op_(op) { | 1531 : op_(op) { |
| 1546 inputs_[0] = left; | 1532 inputs_[0] = left; |
| 1547 inputs_[1] = right; | 1533 inputs_[1] = right; |
| 1548 } | 1534 } |
| 1549 | 1535 |
| 1550 LOperand* left() { return inputs_[0]; } | 1536 LOperand* left() { return inputs_[0]; } |
| 1551 LOperand* right() { return inputs_[1]; } | 1537 LOperand* right() { return inputs_[1]; } |
| 1552 | 1538 |
| 1553 Token::Value op() const { return op_; } | 1539 Token::Value op() const { return op_; } |
| 1554 | 1540 |
| 1555 virtual Opcode opcode() const OVERRIDE { | 1541 Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; } |
| 1556 return LInstruction::kArithmeticD; | 1542 void CompileToNative(LCodeGen* generator) OVERRIDE; |
| 1557 } | 1543 const char* Mnemonic() const OVERRIDE; |
| 1558 virtual void CompileToNative(LCodeGen* generator) OVERRIDE; | |
| 1559 virtual const char* Mnemonic() const OVERRIDE; | |
| 1560 | 1544 |
| 1561 private: | 1545 private: |
| 1562 Token::Value op_; | 1546 Token::Value op_; |
| 1563 }; | 1547 }; |
| 1564 | 1548 |
| 1565 | 1549 |
| 1566 class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> { | 1550 class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> { |
| 1567 public: | 1551 public: |
| 1568 LArithmeticT(Token::Value op, | 1552 LArithmeticT(Token::Value op, |
| 1569 LOperand* context, | 1553 LOperand* context, |
| 1570 LOperand* left, | 1554 LOperand* left, |
| 1571 LOperand* right) | 1555 LOperand* right) |
| 1572 : op_(op) { | 1556 : op_(op) { |
| 1573 inputs_[0] = context; | 1557 inputs_[0] = context; |
| 1574 inputs_[1] = left; | 1558 inputs_[1] = left; |
| 1575 inputs_[2] = right; | 1559 inputs_[2] = right; |
| 1576 } | 1560 } |
| 1577 | 1561 |
| 1578 LOperand* context() { return inputs_[0]; } | 1562 LOperand* context() { return inputs_[0]; } |
| 1579 LOperand* left() { return inputs_[1]; } | 1563 LOperand* left() { return inputs_[1]; } |
| 1580 LOperand* right() { return inputs_[2]; } | 1564 LOperand* right() { return inputs_[2]; } |
| 1581 | 1565 |
| 1582 virtual Opcode opcode() const OVERRIDE { | 1566 Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticT; } |
| 1583 return LInstruction::kArithmeticT; | 1567 void CompileToNative(LCodeGen* generator) OVERRIDE; |
| 1584 } | 1568 const char* Mnemonic() const OVERRIDE; |
| 1585 virtual void CompileToNative(LCodeGen* generator) OVERRIDE; | |
| 1586 virtual const char* Mnemonic() const OVERRIDE; | |
| 1587 | 1569 |
| 1588 Token::Value op() const { return op_; } | 1570 Token::Value op() const { return op_; } |
| 1589 | 1571 |
| 1590 private: | 1572 private: |
| 1591 Token::Value op_; | 1573 Token::Value op_; |
| 1592 }; | 1574 }; |
| 1593 | 1575 |
| 1594 | 1576 |
| 1595 class LReturn FINAL : public LTemplateInstruction<0, 3, 0> { | 1577 class LReturn FINAL : public LTemplateInstruction<0, 3, 0> { |
| 1596 public: | 1578 public: |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1689 bool is_fixed_typed_array() const { | 1671 bool is_fixed_typed_array() const { |
| 1690 return hydrogen()->is_fixed_typed_array(); | 1672 return hydrogen()->is_fixed_typed_array(); |
| 1691 } | 1673 } |
| 1692 bool is_typed_elements() const { | 1674 bool is_typed_elements() const { |
| 1693 return is_external() || is_fixed_typed_array(); | 1675 return is_external() || is_fixed_typed_array(); |
| 1694 } | 1676 } |
| 1695 | 1677 |
| 1696 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") | 1678 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
| 1697 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) | 1679 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
| 1698 | 1680 |
| 1699 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1681 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1700 uint32_t base_offset() const { return hydrogen()->base_offset(); } | 1682 uint32_t base_offset() const { return hydrogen()->base_offset(); } |
| 1701 bool key_is_smi() { | 1683 bool key_is_smi() { |
| 1702 return hydrogen()->key()->representation().IsTagged(); | 1684 return hydrogen()->key()->representation().IsTagged(); |
| 1703 } | 1685 } |
| 1704 }; | 1686 }; |
| 1705 | 1687 |
| 1706 | 1688 |
| 1707 inline static bool ExternalArrayOpRequiresTemp( | 1689 inline static bool ExternalArrayOpRequiresTemp( |
| 1708 Representation key_representation, | 1690 Representation key_representation, |
| 1709 ElementsKind elements_kind) { | 1691 ElementsKind elements_kind) { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1787 inputs_[0] = context; | 1769 inputs_[0] = context; |
| 1788 } | 1770 } |
| 1789 | 1771 |
| 1790 LOperand* context() { return inputs_[0]; } | 1772 LOperand* context() { return inputs_[0]; } |
| 1791 | 1773 |
| 1792 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") | 1774 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") |
| 1793 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) | 1775 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) |
| 1794 | 1776 |
| 1795 int slot_index() { return hydrogen()->slot_index(); } | 1777 int slot_index() { return hydrogen()->slot_index(); } |
| 1796 | 1778 |
| 1797 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1779 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1798 }; | 1780 }; |
| 1799 | 1781 |
| 1800 | 1782 |
| 1801 class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 1> { | 1783 class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 1> { |
| 1802 public: | 1784 public: |
| 1803 LStoreContextSlot(LOperand* context, LOperand* value, LOperand* temp) { | 1785 LStoreContextSlot(LOperand* context, LOperand* value, LOperand* temp) { |
| 1804 inputs_[0] = context; | 1786 inputs_[0] = context; |
| 1805 inputs_[1] = value; | 1787 inputs_[1] = value; |
| 1806 temps_[0] = temp; | 1788 temps_[0] = temp; |
| 1807 } | 1789 } |
| 1808 | 1790 |
| 1809 LOperand* context() { return inputs_[0]; } | 1791 LOperand* context() { return inputs_[0]; } |
| 1810 LOperand* value() { return inputs_[1]; } | 1792 LOperand* value() { return inputs_[1]; } |
| 1811 LOperand* temp() { return temps_[0]; } | 1793 LOperand* temp() { return temps_[0]; } |
| 1812 | 1794 |
| 1813 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") | 1795 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") |
| 1814 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) | 1796 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) |
| 1815 | 1797 |
| 1816 int slot_index() { return hydrogen()->slot_index(); } | 1798 int slot_index() { return hydrogen()->slot_index(); } |
| 1817 | 1799 |
| 1818 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1800 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1819 }; | 1801 }; |
| 1820 | 1802 |
| 1821 | 1803 |
| 1822 class LPushArgument FINAL : public LTemplateInstruction<0, 1, 0> { | 1804 class LPushArgument FINAL : public LTemplateInstruction<0, 1, 0> { |
| 1823 public: | 1805 public: |
| 1824 explicit LPushArgument(LOperand* value) { | 1806 explicit LPushArgument(LOperand* value) { |
| 1825 inputs_[0] = value; | 1807 inputs_[0] = value; |
| 1826 } | 1808 } |
| 1827 | 1809 |
| 1828 LOperand* value() { return inputs_[0]; } | 1810 LOperand* value() { return inputs_[0]; } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1847 class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 0> { | 1829 class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 0> { |
| 1848 public: | 1830 public: |
| 1849 LStoreCodeEntry(LOperand* function, LOperand* code_object) { | 1831 LStoreCodeEntry(LOperand* function, LOperand* code_object) { |
| 1850 inputs_[0] = function; | 1832 inputs_[0] = function; |
| 1851 inputs_[1] = code_object; | 1833 inputs_[1] = code_object; |
| 1852 } | 1834 } |
| 1853 | 1835 |
| 1854 LOperand* function() { return inputs_[0]; } | 1836 LOperand* function() { return inputs_[0]; } |
| 1855 LOperand* code_object() { return inputs_[1]; } | 1837 LOperand* code_object() { return inputs_[1]; } |
| 1856 | 1838 |
| 1857 virtual void PrintDataTo(StringStream* stream); | 1839 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1858 | 1840 |
| 1859 DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry") | 1841 DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry") |
| 1860 DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry) | 1842 DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry) |
| 1861 }; | 1843 }; |
| 1862 | 1844 |
| 1863 | 1845 |
| 1864 class LInnerAllocatedObject FINAL: public LTemplateInstruction<1, 2, 0> { | 1846 class LInnerAllocatedObject FINAL: public LTemplateInstruction<1, 2, 0> { |
| 1865 public: | 1847 public: |
| 1866 LInnerAllocatedObject(LOperand* base_object, LOperand* offset) { | 1848 LInnerAllocatedObject(LOperand* base_object, LOperand* offset) { |
| 1867 inputs_[0] = base_object; | 1849 inputs_[0] = base_object; |
| 1868 inputs_[1] = offset; | 1850 inputs_[1] = offset; |
| 1869 } | 1851 } |
| 1870 | 1852 |
| 1871 LOperand* base_object() const { return inputs_[0]; } | 1853 LOperand* base_object() const { return inputs_[0]; } |
| 1872 LOperand* offset() const { return inputs_[1]; } | 1854 LOperand* offset() const { return inputs_[1]; } |
| 1873 | 1855 |
| 1874 virtual void PrintDataTo(StringStream* stream); | 1856 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1875 | 1857 |
| 1876 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object") | 1858 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object") |
| 1877 }; | 1859 }; |
| 1878 | 1860 |
| 1879 | 1861 |
| 1880 class LThisFunction FINAL : public LTemplateInstruction<1, 0, 0> { | 1862 class LThisFunction FINAL : public LTemplateInstruction<1, 0, 0> { |
| 1881 public: | 1863 public: |
| 1882 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") | 1864 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") |
| 1883 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) | 1865 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) |
| 1884 }; | 1866 }; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1908 public: | 1890 public: |
| 1909 explicit LCallJSFunction(LOperand* function) { | 1891 explicit LCallJSFunction(LOperand* function) { |
| 1910 inputs_[0] = function; | 1892 inputs_[0] = function; |
| 1911 } | 1893 } |
| 1912 | 1894 |
| 1913 LOperand* function() { return inputs_[0]; } | 1895 LOperand* function() { return inputs_[0]; } |
| 1914 | 1896 |
| 1915 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function") | 1897 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function") |
| 1916 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction) | 1898 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction) |
| 1917 | 1899 |
| 1918 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1900 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1919 | 1901 |
| 1920 int arity() const { return hydrogen()->argument_count() - 1; } | 1902 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1921 }; | 1903 }; |
| 1922 | 1904 |
| 1923 | 1905 |
| 1924 class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> { | 1906 class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> { |
| 1925 public: | 1907 public: |
| 1926 LCallWithDescriptor(CallInterfaceDescriptor descriptor, | 1908 LCallWithDescriptor(CallInterfaceDescriptor descriptor, |
| 1927 const ZoneList<LOperand*>& operands, Zone* zone) | 1909 const ZoneList<LOperand*>& operands, Zone* zone) |
| 1928 : inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { | 1910 : inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { |
| 1929 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); | 1911 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); |
| 1930 inputs_.AddAll(operands, zone); | 1912 inputs_.AddAll(operands, zone); |
| 1931 } | 1913 } |
| 1932 | 1914 |
| 1933 LOperand* target() const { return inputs_[0]; } | 1915 LOperand* target() const { return inputs_[0]; } |
| 1934 | 1916 |
| 1935 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) | 1917 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) |
| 1936 | 1918 |
| 1937 private: | 1919 private: |
| 1938 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") | 1920 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") |
| 1939 | 1921 |
| 1940 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1922 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1941 | 1923 |
| 1942 int arity() const { return hydrogen()->argument_count() - 1; } | 1924 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1943 | 1925 |
| 1944 ZoneList<LOperand*> inputs_; | 1926 ZoneList<LOperand*> inputs_; |
| 1945 | 1927 |
| 1946 // Iterator support. | 1928 // Iterator support. |
| 1947 virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); } | 1929 int InputCount() FINAL { return inputs_.length(); } |
| 1948 virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; } | 1930 LOperand* InputAt(int i) FINAL { return inputs_[i]; } |
| 1949 | 1931 |
| 1950 virtual int TempCount() FINAL OVERRIDE { return 0; } | 1932 int TempCount() FINAL { return 0; } |
| 1951 virtual LOperand* TempAt(int i) FINAL OVERRIDE { return NULL; } | 1933 LOperand* TempAt(int i) FINAL { return NULL; } |
| 1952 }; | 1934 }; |
| 1953 | 1935 |
| 1954 | 1936 |
| 1955 class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> { | 1937 class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1956 public: | 1938 public: |
| 1957 LInvokeFunction(LOperand* context, LOperand* function) { | 1939 LInvokeFunction(LOperand* context, LOperand* function) { |
| 1958 inputs_[0] = context; | 1940 inputs_[0] = context; |
| 1959 inputs_[1] = function; | 1941 inputs_[1] = function; |
| 1960 } | 1942 } |
| 1961 | 1943 |
| 1962 LOperand* context() { return inputs_[0]; } | 1944 LOperand* context() { return inputs_[0]; } |
| 1963 LOperand* function() { return inputs_[1]; } | 1945 LOperand* function() { return inputs_[1]; } |
| 1964 | 1946 |
| 1965 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") | 1947 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") |
| 1966 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) | 1948 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) |
| 1967 | 1949 |
| 1968 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1950 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1969 | 1951 |
| 1970 int arity() const { return hydrogen()->argument_count() - 1; } | 1952 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1971 }; | 1953 }; |
| 1972 | 1954 |
| 1973 | 1955 |
| 1974 class LCallFunction FINAL : public LTemplateInstruction<1, 2, 0> { | 1956 class LCallFunction FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1975 public: | 1957 public: |
| 1976 explicit LCallFunction(LOperand* context, LOperand* function) { | 1958 explicit LCallFunction(LOperand* context, LOperand* function) { |
| 1977 inputs_[0] = context; | 1959 inputs_[0] = context; |
| 1978 inputs_[1] = function; | 1960 inputs_[1] = function; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1994 inputs_[0] = context; | 1976 inputs_[0] = context; |
| 1995 inputs_[1] = constructor; | 1977 inputs_[1] = constructor; |
| 1996 } | 1978 } |
| 1997 | 1979 |
| 1998 LOperand* context() { return inputs_[0]; } | 1980 LOperand* context() { return inputs_[0]; } |
| 1999 LOperand* constructor() { return inputs_[1]; } | 1981 LOperand* constructor() { return inputs_[1]; } |
| 2000 | 1982 |
| 2001 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") | 1983 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") |
| 2002 DECLARE_HYDROGEN_ACCESSOR(CallNew) | 1984 DECLARE_HYDROGEN_ACCESSOR(CallNew) |
| 2003 | 1985 |
| 2004 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1986 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 2005 | 1987 |
| 2006 int arity() const { return hydrogen()->argument_count() - 1; } | 1988 int arity() const { return hydrogen()->argument_count() - 1; } |
| 2007 }; | 1989 }; |
| 2008 | 1990 |
| 2009 | 1991 |
| 2010 class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> { | 1992 class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> { |
| 2011 public: | 1993 public: |
| 2012 LCallNewArray(LOperand* context, LOperand* constructor) { | 1994 LCallNewArray(LOperand* context, LOperand* constructor) { |
| 2013 inputs_[0] = context; | 1995 inputs_[0] = context; |
| 2014 inputs_[1] = constructor; | 1996 inputs_[1] = constructor; |
| 2015 } | 1997 } |
| 2016 | 1998 |
| 2017 LOperand* context() { return inputs_[0]; } | 1999 LOperand* context() { return inputs_[0]; } |
| 2018 LOperand* constructor() { return inputs_[1]; } | 2000 LOperand* constructor() { return inputs_[1]; } |
| 2019 | 2001 |
| 2020 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") | 2002 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") |
| 2021 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) | 2003 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) |
| 2022 | 2004 |
| 2023 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 2005 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 2024 | 2006 |
| 2025 int arity() const { return hydrogen()->argument_count() - 1; } | 2007 int arity() const { return hydrogen()->argument_count() - 1; } |
| 2026 }; | 2008 }; |
| 2027 | 2009 |
| 2028 | 2010 |
| 2029 class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> { | 2011 class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> { |
| 2030 public: | 2012 public: |
| 2031 explicit LCallRuntime(LOperand* context) { | 2013 explicit LCallRuntime(LOperand* context) { |
| 2032 inputs_[0] = context; | 2014 inputs_[0] = context; |
| 2033 } | 2015 } |
| 2034 | 2016 |
| 2035 LOperand* context() { return inputs_[0]; } | 2017 LOperand* context() { return inputs_[0]; } |
| 2036 | 2018 |
| 2037 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") | 2019 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") |
| 2038 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) | 2020 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) |
| 2039 | 2021 |
| 2040 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE { | 2022 bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE { |
| 2041 return save_doubles() == kDontSaveFPRegs; | 2023 return save_doubles() == kDontSaveFPRegs; |
| 2042 } | 2024 } |
| 2043 | 2025 |
| 2044 const Runtime::Function* function() const { return hydrogen()->function(); } | 2026 const Runtime::Function* function() const { return hydrogen()->function(); } |
| 2045 int arity() const { return hydrogen()->argument_count(); } | 2027 int arity() const { return hydrogen()->argument_count(); } |
| 2046 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } | 2028 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } |
| 2047 }; | 2029 }; |
| 2048 | 2030 |
| 2049 | 2031 |
| 2050 class LInteger32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> { | 2032 class LInteger32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> { |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2218 } | 2200 } |
| 2219 | 2201 |
| 2220 LOperand* object() { return inputs_[0]; } | 2202 LOperand* object() { return inputs_[0]; } |
| 2221 LOperand* value() { return inputs_[1]; } | 2203 LOperand* value() { return inputs_[1]; } |
| 2222 LOperand* temp() { return temps_[0]; } | 2204 LOperand* temp() { return temps_[0]; } |
| 2223 LOperand* temp_map() { return temps_[1]; } | 2205 LOperand* temp_map() { return temps_[1]; } |
| 2224 | 2206 |
| 2225 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") | 2207 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") |
| 2226 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) | 2208 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) |
| 2227 | 2209 |
| 2228 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 2210 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 2229 }; | 2211 }; |
| 2230 | 2212 |
| 2231 | 2213 |
| 2232 class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> { | 2214 class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> { |
| 2233 public: | 2215 public: |
| 2234 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { | 2216 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { |
| 2235 inputs_[0] = context; | 2217 inputs_[0] = context; |
| 2236 inputs_[1] = object; | 2218 inputs_[1] = object; |
| 2237 inputs_[2] = value; | 2219 inputs_[2] = value; |
| 2238 } | 2220 } |
| 2239 | 2221 |
| 2240 LOperand* context() { return inputs_[0]; } | 2222 LOperand* context() { return inputs_[0]; } |
| 2241 LOperand* object() { return inputs_[1]; } | 2223 LOperand* object() { return inputs_[1]; } |
| 2242 LOperand* value() { return inputs_[2]; } | 2224 LOperand* value() { return inputs_[2]; } |
| 2243 | 2225 |
| 2244 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 2226 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |
| 2245 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 2227 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |
| 2246 | 2228 |
| 2247 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 2229 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 2248 Handle<Object> name() const { return hydrogen()->name(); } | 2230 Handle<Object> name() const { return hydrogen()->name(); } |
| 2249 StrictMode strict_mode() { return hydrogen()->strict_mode(); } | 2231 StrictMode strict_mode() { return hydrogen()->strict_mode(); } |
| 2250 }; | 2232 }; |
| 2251 | 2233 |
| 2252 | 2234 |
| 2253 class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> { | 2235 class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> { |
| 2254 public: | 2236 public: |
| 2255 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) { | 2237 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) { |
| 2256 inputs_[0] = obj; | 2238 inputs_[0] = obj; |
| 2257 inputs_[1] = key; | 2239 inputs_[1] = key; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2268 LOperand* elements() { return inputs_[0]; } | 2250 LOperand* elements() { return inputs_[0]; } |
| 2269 LOperand* key() { return inputs_[1]; } | 2251 LOperand* key() { return inputs_[1]; } |
| 2270 LOperand* value() { return inputs_[2]; } | 2252 LOperand* value() { return inputs_[2]; } |
| 2271 ElementsKind elements_kind() const { | 2253 ElementsKind elements_kind() const { |
| 2272 return hydrogen()->elements_kind(); | 2254 return hydrogen()->elements_kind(); |
| 2273 } | 2255 } |
| 2274 | 2256 |
| 2275 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") | 2257 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") |
| 2276 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) | 2258 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) |
| 2277 | 2259 |
| 2278 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 2260 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 2279 uint32_t base_offset() const { return hydrogen()->base_offset(); } | 2261 uint32_t base_offset() const { return hydrogen()->base_offset(); } |
| 2280 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } | 2262 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } |
| 2281 }; | 2263 }; |
| 2282 | 2264 |
| 2283 | 2265 |
| 2284 class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> { | 2266 class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> { |
| 2285 public: | 2267 public: |
| 2286 LStoreKeyedGeneric(LOperand* context, | 2268 LStoreKeyedGeneric(LOperand* context, |
| 2287 LOperand* object, | 2269 LOperand* object, |
| 2288 LOperand* key, | 2270 LOperand* key, |
| 2289 LOperand* value) { | 2271 LOperand* value) { |
| 2290 inputs_[0] = context; | 2272 inputs_[0] = context; |
| 2291 inputs_[1] = object; | 2273 inputs_[1] = object; |
| 2292 inputs_[2] = key; | 2274 inputs_[2] = key; |
| 2293 inputs_[3] = value; | 2275 inputs_[3] = value; |
| 2294 } | 2276 } |
| 2295 | 2277 |
| 2296 LOperand* context() { return inputs_[0]; } | 2278 LOperand* context() { return inputs_[0]; } |
| 2297 LOperand* object() { return inputs_[1]; } | 2279 LOperand* object() { return inputs_[1]; } |
| 2298 LOperand* key() { return inputs_[2]; } | 2280 LOperand* key() { return inputs_[2]; } |
| 2299 LOperand* value() { return inputs_[3]; } | 2281 LOperand* value() { return inputs_[3]; } |
| 2300 | 2282 |
| 2301 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") | 2283 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") |
| 2302 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) | 2284 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) |
| 2303 | 2285 |
| 2304 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 2286 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 2305 | 2287 |
| 2306 StrictMode strict_mode() { return hydrogen()->strict_mode(); } | 2288 StrictMode strict_mode() { return hydrogen()->strict_mode(); } |
| 2307 }; | 2289 }; |
| 2308 | 2290 |
| 2309 | 2291 |
| 2310 class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 2> { | 2292 class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 2> { |
| 2311 public: | 2293 public: |
| 2312 LTransitionElementsKind(LOperand* object, | 2294 LTransitionElementsKind(LOperand* object, |
| 2313 LOperand* context, | 2295 LOperand* context, |
| 2314 LOperand* new_map_temp, | 2296 LOperand* new_map_temp, |
| 2315 LOperand* temp) { | 2297 LOperand* temp) { |
| 2316 inputs_[0] = object; | 2298 inputs_[0] = object; |
| 2317 inputs_[1] = context; | 2299 inputs_[1] = context; |
| 2318 temps_[0] = new_map_temp; | 2300 temps_[0] = new_map_temp; |
| 2319 temps_[1] = temp; | 2301 temps_[1] = temp; |
| 2320 } | 2302 } |
| 2321 | 2303 |
| 2322 LOperand* context() { return inputs_[1]; } | 2304 LOperand* context() { return inputs_[1]; } |
| 2323 LOperand* object() { return inputs_[0]; } | 2305 LOperand* object() { return inputs_[0]; } |
| 2324 LOperand* new_map_temp() { return temps_[0]; } | 2306 LOperand* new_map_temp() { return temps_[0]; } |
| 2325 LOperand* temp() { return temps_[1]; } | 2307 LOperand* temp() { return temps_[1]; } |
| 2326 | 2308 |
| 2327 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, | 2309 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, |
| 2328 "transition-elements-kind") | 2310 "transition-elements-kind") |
| 2329 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) | 2311 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) |
| 2330 | 2312 |
| 2331 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 2313 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 2332 | 2314 |
| 2333 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } | 2315 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } |
| 2334 Handle<Map> transitioned_map() { | 2316 Handle<Map> transitioned_map() { |
| 2335 return hydrogen()->transitioned_map().handle(); | 2317 return hydrogen()->transitioned_map().handle(); |
| 2336 } | 2318 } |
| 2337 ElementsKind from_kind() { return hydrogen()->from_kind(); } | 2319 ElementsKind from_kind() { return hydrogen()->from_kind(); } |
| 2338 ElementsKind to_kind() { return hydrogen()->to_kind(); } | 2320 ElementsKind to_kind() { return hydrogen()->to_kind(); } |
| 2339 }; | 2321 }; |
| 2340 | 2322 |
| 2341 | 2323 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2621 inputs_[0] = value; | 2603 inputs_[0] = value; |
| 2622 } | 2604 } |
| 2623 | 2605 |
| 2624 LOperand* value() { return inputs_[0]; } | 2606 LOperand* value() { return inputs_[0]; } |
| 2625 | 2607 |
| 2626 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") | 2608 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") |
| 2627 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch) | 2609 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch) |
| 2628 | 2610 |
| 2629 Handle<String> type_literal() { return hydrogen()->type_literal(); } | 2611 Handle<String> type_literal() { return hydrogen()->type_literal(); } |
| 2630 | 2612 |
| 2631 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 2613 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 2632 }; | 2614 }; |
| 2633 | 2615 |
| 2634 | 2616 |
| 2635 class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> { | 2617 class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> { |
| 2636 public: | 2618 public: |
| 2637 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { | 2619 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; } |
| 2638 return false; | |
| 2639 } | |
| 2640 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") | 2620 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") |
| 2641 }; | 2621 }; |
| 2642 | 2622 |
| 2643 | 2623 |
| 2644 class LStackCheck FINAL : public LTemplateInstruction<0, 1, 0> { | 2624 class LStackCheck FINAL : public LTemplateInstruction<0, 1, 0> { |
| 2645 public: | 2625 public: |
| 2646 explicit LStackCheck(LOperand* context) { | 2626 explicit LStackCheck(LOperand* context) { |
| 2647 inputs_[0] = context; | 2627 inputs_[0] = context; |
| 2648 } | 2628 } |
| 2649 | 2629 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2836 | 2816 |
| 2837 // An input operand in a register or a constant operand. | 2817 // An input operand in a register or a constant operand. |
| 2838 MUST_USE_RESULT LOperand* UseRegisterOrConstant(HValue* value); | 2818 MUST_USE_RESULT LOperand* UseRegisterOrConstant(HValue* value); |
| 2839 MUST_USE_RESULT LOperand* UseRegisterOrConstantAtStart(HValue* value); | 2819 MUST_USE_RESULT LOperand* UseRegisterOrConstantAtStart(HValue* value); |
| 2840 | 2820 |
| 2841 // An input operand in a constant operand. | 2821 // An input operand in a constant operand. |
| 2842 MUST_USE_RESULT LOperand* UseConstant(HValue* value); | 2822 MUST_USE_RESULT LOperand* UseConstant(HValue* value); |
| 2843 | 2823 |
| 2844 // An input operand in register, stack slot or a constant operand. | 2824 // An input operand in register, stack slot or a constant operand. |
| 2845 // Will not be moved to a register even if one is freely available. | 2825 // Will not be moved to a register even if one is freely available. |
| 2846 virtual MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE; | 2826 MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE; |
| 2847 | 2827 |
| 2848 // Temporary operand that must be in a register. | 2828 // Temporary operand that must be in a register. |
| 2849 MUST_USE_RESULT LUnallocated* TempRegister(); | 2829 MUST_USE_RESULT LUnallocated* TempRegister(); |
| 2850 MUST_USE_RESULT LOperand* FixedTemp(Register reg); | 2830 MUST_USE_RESULT LOperand* FixedTemp(Register reg); |
| 2851 | 2831 |
| 2852 // Methods for setting up define-use relationships. | 2832 // Methods for setting up define-use relationships. |
| 2853 // Return the same instruction that they are passed. | 2833 // Return the same instruction that they are passed. |
| 2854 LInstruction* Define(LTemplateResultInstruction<1>* instr, | 2834 LInstruction* Define(LTemplateResultInstruction<1>* instr, |
| 2855 LUnallocated* result); | 2835 LUnallocated* result); |
| 2856 LInstruction* DefineAsRegister(LTemplateResultInstruction<1>* instr); | 2836 LInstruction* DefineAsRegister(LTemplateResultInstruction<1>* instr); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2900 | 2880 |
| 2901 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2881 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2902 }; | 2882 }; |
| 2903 | 2883 |
| 2904 #undef DECLARE_HYDROGEN_ACCESSOR | 2884 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2905 #undef DECLARE_CONCRETE_INSTRUCTION | 2885 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2906 | 2886 |
| 2907 } } // namespace v8::internal | 2887 } } // namespace v8::internal |
| 2908 | 2888 |
| 2909 #endif // V8_X87_LITHIUM_X87_H_ | 2889 #endif // V8_X87_LITHIUM_X87_H_ |
| OLD | NEW |