| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC_LITHIUM_PPC_H_ | 5 #ifndef V8_PPC_LITHIUM_PPC_H_ |
| 6 #define V8_PPC_LITHIUM_PPC_H_ | 6 #define V8_PPC_LITHIUM_PPC_H_ |
| 7 | 7 |
| 8 #include "src/hydrogen.h" | 8 #include "src/hydrogen.h" |
| 9 #include "src/lithium.h" | 9 #include "src/lithium.h" |
| 10 #include "src/lithium-allocator.h" | 10 #include "src/lithium-allocator.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 V(ToFastProperties) \ | 159 V(ToFastProperties) \ |
| 160 V(TransitionElementsKind) \ | 160 V(TransitionElementsKind) \ |
| 161 V(TrapAllocationMemento) \ | 161 V(TrapAllocationMemento) \ |
| 162 V(Typeof) \ | 162 V(Typeof) \ |
| 163 V(TypeofIsAndBranch) \ | 163 V(TypeofIsAndBranch) \ |
| 164 V(Uint32ToDouble) \ | 164 V(Uint32ToDouble) \ |
| 165 V(UnknownOSRValue) \ | 165 V(UnknownOSRValue) \ |
| 166 V(WrapReceiver) | 166 V(WrapReceiver) |
| 167 | 167 |
| 168 | 168 |
| 169 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 169 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
| 170 virtual Opcode opcode() const FINAL OVERRIDE { \ | 170 Opcode opcode() const FINAL { return LInstruction::k##type; } \ |
| 171 return LInstruction::k##type; \ | 171 void CompileToNative(LCodeGen* generator) FINAL; \ |
| 172 } \ | 172 const char* Mnemonic() const FINAL { return mnemonic; } \ |
| 173 virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \ | 173 static L##type* cast(LInstruction* instr) { \ |
| 174 virtual const char* Mnemonic() const FINAL OVERRIDE { return mnemonic; } \ | 174 DCHECK(instr->Is##type()); \ |
| 175 static L##type* cast(LInstruction* instr) { \ | 175 return reinterpret_cast<L##type*>(instr); \ |
| 176 DCHECK(instr->Is##type()); \ | |
| 177 return reinterpret_cast<L##type*>(instr); \ | |
| 178 } | 176 } |
| 179 | 177 |
| 180 | 178 |
| 181 #define DECLARE_HYDROGEN_ACCESSOR(type) \ | 179 #define DECLARE_HYDROGEN_ACCESSOR(type) \ |
| 182 H##type* hydrogen() const { return H##type::cast(hydrogen_value()); } | 180 H##type* hydrogen() const { return H##type::cast(hydrogen_value()); } |
| 183 | 181 |
| 184 | 182 |
| 185 class LInstruction : public ZoneObject { | 183 class LInstruction : public ZoneObject { |
| 186 public: | 184 public: |
| 187 LInstruction() | 185 LInstruction() |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 int bit_field_; | 276 int bit_field_; |
| 279 }; | 277 }; |
| 280 | 278 |
| 281 | 279 |
| 282 // R = number of result operands (0 or 1). | 280 // R = number of result operands (0 or 1). |
| 283 template <int R> | 281 template <int R> |
| 284 class LTemplateResultInstruction : public LInstruction { | 282 class LTemplateResultInstruction : public LInstruction { |
| 285 public: | 283 public: |
| 286 // Allow 0 or 1 output operands. | 284 // Allow 0 or 1 output operands. |
| 287 STATIC_ASSERT(R == 0 || R == 1); | 285 STATIC_ASSERT(R == 0 || R == 1); |
| 288 virtual bool HasResult() const FINAL OVERRIDE { | 286 bool HasResult() const FINAL { return R != 0 && result() != NULL; } |
| 289 return R != 0 && result() != NULL; | |
| 290 } | |
| 291 void set_result(LOperand* operand) { results_[0] = operand; } | 287 void set_result(LOperand* operand) { results_[0] = operand; } |
| 292 LOperand* result() const { return results_[0]; } | 288 LOperand* result() const { return results_[0]; } |
| 293 | 289 |
| 294 protected: | 290 protected: |
| 295 EmbeddedContainer<LOperand*, R> results_; | 291 EmbeddedContainer<LOperand*, R> results_; |
| 296 }; | 292 }; |
| 297 | 293 |
| 298 | 294 |
| 299 // R = number of result operands (0 or 1). | 295 // R = number of result operands (0 or 1). |
| 300 // I = number of input operands. | 296 // I = number of input operands. |
| 301 // T = number of temporary operands. | 297 // T = number of temporary operands. |
| 302 template <int R, int I, int T> | 298 template <int R, int I, int T> |
| 303 class LTemplateInstruction : public LTemplateResultInstruction<R> { | 299 class LTemplateInstruction : public LTemplateResultInstruction<R> { |
| 304 protected: | 300 protected: |
| 305 EmbeddedContainer<LOperand*, I> inputs_; | 301 EmbeddedContainer<LOperand*, I> inputs_; |
| 306 EmbeddedContainer<LOperand*, T> temps_; | 302 EmbeddedContainer<LOperand*, T> temps_; |
| 307 | 303 |
| 308 private: | 304 private: |
| 309 // Iterator support. | 305 // Iterator support. |
| 310 virtual int InputCount() FINAL OVERRIDE { return I; } | 306 int InputCount() FINAL { return I; } |
| 311 virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; } | 307 LOperand* InputAt(int i) FINAL { return inputs_[i]; } |
| 312 | 308 |
| 313 virtual int TempCount() FINAL OVERRIDE { return T; } | 309 int TempCount() FINAL { return T; } |
| 314 virtual LOperand* TempAt(int i) FINAL OVERRIDE { return temps_[i]; } | 310 LOperand* TempAt(int i) FINAL { return temps_[i]; } |
| 315 }; | 311 }; |
| 316 | 312 |
| 317 | 313 |
| 318 class LGap : public LTemplateInstruction<0, 0, 0> { | 314 class LGap : public LTemplateInstruction<0, 0, 0> { |
| 319 public: | 315 public: |
| 320 explicit LGap(HBasicBlock* block) : block_(block) { | 316 explicit LGap(HBasicBlock* block) : block_(block) { |
| 321 parallel_moves_[BEFORE] = NULL; | 317 parallel_moves_[BEFORE] = NULL; |
| 322 parallel_moves_[START] = NULL; | 318 parallel_moves_[START] = NULL; |
| 323 parallel_moves_[END] = NULL; | 319 parallel_moves_[END] = NULL; |
| 324 parallel_moves_[AFTER] = NULL; | 320 parallel_moves_[AFTER] = NULL; |
| 325 } | 321 } |
| 326 | 322 |
| 327 // Can't use the DECLARE-macro here because of sub-classes. | 323 // Can't use the DECLARE-macro here because of sub-classes. |
| 328 virtual bool IsGap() const OVERRIDE { return true; } | 324 bool IsGap() const OVERRIDE { return true; } |
| 329 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 325 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 330 static LGap* cast(LInstruction* instr) { | 326 static LGap* cast(LInstruction* instr) { |
| 331 DCHECK(instr->IsGap()); | 327 DCHECK(instr->IsGap()); |
| 332 return reinterpret_cast<LGap*>(instr); | 328 return reinterpret_cast<LGap*>(instr); |
| 333 } | 329 } |
| 334 | 330 |
| 335 bool IsRedundant() const; | 331 bool IsRedundant() const; |
| 336 | 332 |
| 337 HBasicBlock* block() const { return block_; } | 333 HBasicBlock* block() const { return block_; } |
| 338 | 334 |
| 339 enum InnerPosition { | 335 enum InnerPosition { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 359 private: | 355 private: |
| 360 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; | 356 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; |
| 361 HBasicBlock* block_; | 357 HBasicBlock* block_; |
| 362 }; | 358 }; |
| 363 | 359 |
| 364 | 360 |
| 365 class LInstructionGap FINAL : public LGap { | 361 class LInstructionGap FINAL : public LGap { |
| 366 public: | 362 public: |
| 367 explicit LInstructionGap(HBasicBlock* block) : LGap(block) {} | 363 explicit LInstructionGap(HBasicBlock* block) : LGap(block) {} |
| 368 | 364 |
| 369 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { | 365 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { |
| 370 return !IsRedundant(); | 366 return !IsRedundant(); |
| 371 } | 367 } |
| 372 | 368 |
| 373 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") | 369 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") |
| 374 }; | 370 }; |
| 375 | 371 |
| 376 | 372 |
| 377 class LGoto FINAL : public LTemplateInstruction<0, 0, 0> { | 373 class LGoto FINAL : public LTemplateInstruction<0, 0, 0> { |
| 378 public: | 374 public: |
| 379 explicit LGoto(HBasicBlock* block) : block_(block) {} | 375 explicit LGoto(HBasicBlock* block) : block_(block) {} |
| 380 | 376 |
| 381 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE; | 377 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE; |
| 382 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") | 378 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") |
| 383 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 379 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 384 virtual bool IsControl() const OVERRIDE { return true; } | 380 bool IsControl() const OVERRIDE { return true; } |
| 385 | 381 |
| 386 int block_id() const { return block_->block_id(); } | 382 int block_id() const { return block_->block_id(); } |
| 387 | 383 |
| 388 private: | 384 private: |
| 389 HBasicBlock* block_; | 385 HBasicBlock* block_; |
| 390 }; | 386 }; |
| 391 | 387 |
| 392 | 388 |
| 393 class LLazyBailout FINAL : public LTemplateInstruction<0, 0, 0> { | 389 class LLazyBailout FINAL : public LTemplateInstruction<0, 0, 0> { |
| 394 public: | 390 public: |
| (...skipping 20 matching lines...) Expand all Loading... |
| 415 | 411 |
| 416 class LDummyUse FINAL : public LTemplateInstruction<1, 1, 0> { | 412 class LDummyUse FINAL : public LTemplateInstruction<1, 1, 0> { |
| 417 public: | 413 public: |
| 418 explicit LDummyUse(LOperand* value) { inputs_[0] = value; } | 414 explicit LDummyUse(LOperand* value) { inputs_[0] = value; } |
| 419 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") | 415 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") |
| 420 }; | 416 }; |
| 421 | 417 |
| 422 | 418 |
| 423 class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> { | 419 class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> { |
| 424 public: | 420 public: |
| 425 virtual bool IsControl() const OVERRIDE { return true; } | 421 bool IsControl() const OVERRIDE { return true; } |
| 426 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") | 422 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") |
| 427 DECLARE_HYDROGEN_ACCESSOR(Deoptimize) | 423 DECLARE_HYDROGEN_ACCESSOR(Deoptimize) |
| 428 }; | 424 }; |
| 429 | 425 |
| 430 | 426 |
| 431 class LLabel FINAL : public LGap { | 427 class LLabel FINAL : public LGap { |
| 432 public: | 428 public: |
| 433 explicit LLabel(HBasicBlock* block) : LGap(block), replacement_(NULL) {} | 429 explicit LLabel(HBasicBlock* block) : LGap(block), replacement_(NULL) {} |
| 434 | 430 |
| 435 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { | 431 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; } |
| 436 return false; | |
| 437 } | |
| 438 DECLARE_CONCRETE_INSTRUCTION(Label, "label") | 432 DECLARE_CONCRETE_INSTRUCTION(Label, "label") |
| 439 | 433 |
| 440 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 434 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 441 | 435 |
| 442 int block_id() const { return block()->block_id(); } | 436 int block_id() const { return block()->block_id(); } |
| 443 bool is_loop_header() const { return block()->IsLoopHeader(); } | 437 bool is_loop_header() const { return block()->IsLoopHeader(); } |
| 444 bool is_osr_entry() const { return block()->is_osr_entry(); } | 438 bool is_osr_entry() const { return block()->is_osr_entry(); } |
| 445 Label* label() { return &label_; } | 439 Label* label() { return &label_; } |
| 446 LLabel* replacement() const { return replacement_; } | 440 LLabel* replacement() const { return replacement_; } |
| 447 void set_replacement(LLabel* label) { replacement_ = label; } | 441 void set_replacement(LLabel* label) { replacement_ = label; } |
| 448 bool HasReplacement() const { return replacement_ != NULL; } | 442 bool HasReplacement() const { return replacement_ != NULL; } |
| 449 | 443 |
| 450 private: | 444 private: |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 LOperand* receiver() { return inputs_[1]; } | 480 LOperand* receiver() { return inputs_[1]; } |
| 487 LOperand* name() { return inputs_[2]; } | 481 LOperand* name() { return inputs_[2]; } |
| 488 | 482 |
| 489 DECLARE_CONCRETE_INSTRUCTION(TailCallThroughMegamorphicCache, | 483 DECLARE_CONCRETE_INSTRUCTION(TailCallThroughMegamorphicCache, |
| 490 "tail-call-through-megamorphic-cache") | 484 "tail-call-through-megamorphic-cache") |
| 491 DECLARE_HYDROGEN_ACCESSOR(TailCallThroughMegamorphicCache) | 485 DECLARE_HYDROGEN_ACCESSOR(TailCallThroughMegamorphicCache) |
| 492 }; | 486 }; |
| 493 | 487 |
| 494 class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> { | 488 class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> { |
| 495 public: | 489 public: |
| 496 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { | 490 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; } |
| 497 return false; | |
| 498 } | |
| 499 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") | 491 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") |
| 500 }; | 492 }; |
| 501 | 493 |
| 502 | 494 |
| 503 template <int I, int T> | 495 template <int I, int T> |
| 504 class LControlInstruction : public LTemplateInstruction<0, I, T> { | 496 class LControlInstruction : public LTemplateInstruction<0, I, T> { |
| 505 public: | 497 public: |
| 506 LControlInstruction() : false_label_(NULL), true_label_(NULL) {} | 498 LControlInstruction() : false_label_(NULL), true_label_(NULL) {} |
| 507 | 499 |
| 508 virtual bool IsControl() const FINAL OVERRIDE { return true; } | 500 bool IsControl() const FINAL { return true; } |
| 509 | 501 |
| 510 int SuccessorCount() { return hydrogen()->SuccessorCount(); } | 502 int SuccessorCount() { return hydrogen()->SuccessorCount(); } |
| 511 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } | 503 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } |
| 512 | 504 |
| 513 int TrueDestination(LChunk* chunk) { | 505 int TrueDestination(LChunk* chunk) { |
| 514 return chunk->LookupDestination(true_block_id()); | 506 return chunk->LookupDestination(true_block_id()); |
| 515 } | 507 } |
| 516 int FalseDestination(LChunk* chunk) { | 508 int FalseDestination(LChunk* chunk) { |
| 517 return chunk->LookupDestination(false_block_id()); | 509 return chunk->LookupDestination(false_block_id()); |
| 518 } | 510 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 inputs_[1] = length; | 577 inputs_[1] = length; |
| 586 inputs_[2] = index; | 578 inputs_[2] = index; |
| 587 } | 579 } |
| 588 | 580 |
| 589 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") | 581 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") |
| 590 | 582 |
| 591 LOperand* arguments() { return inputs_[0]; } | 583 LOperand* arguments() { return inputs_[0]; } |
| 592 LOperand* length() { return inputs_[1]; } | 584 LOperand* length() { return inputs_[1]; } |
| 593 LOperand* index() { return inputs_[2]; } | 585 LOperand* index() { return inputs_[2]; } |
| 594 | 586 |
| 595 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 587 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 596 }; | 588 }; |
| 597 | 589 |
| 598 | 590 |
| 599 class LArgumentsLength FINAL : public LTemplateInstruction<1, 1, 0> { | 591 class LArgumentsLength FINAL : public LTemplateInstruction<1, 1, 0> { |
| 600 public: | 592 public: |
| 601 explicit LArgumentsLength(LOperand* elements) { inputs_[0] = elements; } | 593 explicit LArgumentsLength(LOperand* elements) { inputs_[0] = elements; } |
| 602 | 594 |
| 603 LOperand* elements() { return inputs_[0]; } | 595 LOperand* elements() { return inputs_[0]; } |
| 604 | 596 |
| 605 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") | 597 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 LOperand* left() { return inputs_[0]; } | 828 LOperand* left() { return inputs_[0]; } |
| 837 LOperand* right() { return inputs_[1]; } | 829 LOperand* right() { return inputs_[1]; } |
| 838 | 830 |
| 839 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch, | 831 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch, |
| 840 "compare-numeric-and-branch") | 832 "compare-numeric-and-branch") |
| 841 DECLARE_HYDROGEN_ACCESSOR(CompareNumericAndBranch) | 833 DECLARE_HYDROGEN_ACCESSOR(CompareNumericAndBranch) |
| 842 | 834 |
| 843 Token::Value op() const { return hydrogen()->token(); } | 835 Token::Value op() const { return hydrogen()->token(); } |
| 844 bool is_double() const { return hydrogen()->representation().IsDouble(); } | 836 bool is_double() const { return hydrogen()->representation().IsDouble(); } |
| 845 | 837 |
| 846 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 838 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 847 }; | 839 }; |
| 848 | 840 |
| 849 | 841 |
| 850 class LMathFloor FINAL : public LTemplateInstruction<1, 1, 0> { | 842 class LMathFloor FINAL : public LTemplateInstruction<1, 1, 0> { |
| 851 public: | 843 public: |
| 852 explicit LMathFloor(LOperand* value) { inputs_[0] = value; } | 844 explicit LMathFloor(LOperand* value) { inputs_[0] = value; } |
| 853 | 845 |
| 854 LOperand* value() { return inputs_[0]; } | 846 LOperand* value() { return inputs_[0]; } |
| 855 | 847 |
| 856 DECLARE_CONCRETE_INSTRUCTION(MathFloor, "math-floor") | 848 DECLARE_CONCRETE_INSTRUCTION(MathFloor, "math-floor") |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1006 inputs_[0] = value; | 998 inputs_[0] = value; |
| 1007 temps_[0] = temp; | 999 temps_[0] = temp; |
| 1008 } | 1000 } |
| 1009 | 1001 |
| 1010 LOperand* value() { return inputs_[0]; } | 1002 LOperand* value() { return inputs_[0]; } |
| 1011 LOperand* temp() { return temps_[0]; } | 1003 LOperand* temp() { return temps_[0]; } |
| 1012 | 1004 |
| 1013 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") | 1005 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") |
| 1014 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) | 1006 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) |
| 1015 | 1007 |
| 1016 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1008 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1017 }; | 1009 }; |
| 1018 | 1010 |
| 1019 | 1011 |
| 1020 class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> { | 1012 class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> { |
| 1021 public: | 1013 public: |
| 1022 LIsStringAndBranch(LOperand* value, LOperand* temp) { | 1014 LIsStringAndBranch(LOperand* value, LOperand* temp) { |
| 1023 inputs_[0] = value; | 1015 inputs_[0] = value; |
| 1024 temps_[0] = temp; | 1016 temps_[0] = temp; |
| 1025 } | 1017 } |
| 1026 | 1018 |
| 1027 LOperand* value() { return inputs_[0]; } | 1019 LOperand* value() { return inputs_[0]; } |
| 1028 LOperand* temp() { return temps_[0]; } | 1020 LOperand* temp() { return temps_[0]; } |
| 1029 | 1021 |
| 1030 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") | 1022 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") |
| 1031 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) | 1023 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) |
| 1032 | 1024 |
| 1033 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1025 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1034 }; | 1026 }; |
| 1035 | 1027 |
| 1036 | 1028 |
| 1037 class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> { | 1029 class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> { |
| 1038 public: | 1030 public: |
| 1039 explicit LIsSmiAndBranch(LOperand* value) { inputs_[0] = value; } | 1031 explicit LIsSmiAndBranch(LOperand* value) { inputs_[0] = value; } |
| 1040 | 1032 |
| 1041 LOperand* value() { return inputs_[0]; } | 1033 LOperand* value() { return inputs_[0]; } |
| 1042 | 1034 |
| 1043 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") | 1035 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") |
| 1044 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) | 1036 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) |
| 1045 | 1037 |
| 1046 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1038 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1047 }; | 1039 }; |
| 1048 | 1040 |
| 1049 | 1041 |
| 1050 class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> { | 1042 class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> { |
| 1051 public: | 1043 public: |
| 1052 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { | 1044 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { |
| 1053 inputs_[0] = value; | 1045 inputs_[0] = value; |
| 1054 temps_[0] = temp; | 1046 temps_[0] = temp; |
| 1055 } | 1047 } |
| 1056 | 1048 |
| 1057 LOperand* value() { return inputs_[0]; } | 1049 LOperand* value() { return inputs_[0]; } |
| 1058 LOperand* temp() { return temps_[0]; } | 1050 LOperand* temp() { return temps_[0]; } |
| 1059 | 1051 |
| 1060 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, | 1052 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, |
| 1061 "is-undetectable-and-branch") | 1053 "is-undetectable-and-branch") |
| 1062 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) | 1054 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) |
| 1063 | 1055 |
| 1064 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1056 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1065 }; | 1057 }; |
| 1066 | 1058 |
| 1067 | 1059 |
| 1068 class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> { | 1060 class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> { |
| 1069 public: | 1061 public: |
| 1070 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) { | 1062 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) { |
| 1071 inputs_[0] = context; | 1063 inputs_[0] = context; |
| 1072 inputs_[1] = left; | 1064 inputs_[1] = left; |
| 1073 inputs_[2] = right; | 1065 inputs_[2] = right; |
| 1074 } | 1066 } |
| 1075 | 1067 |
| 1076 LOperand* context() { return inputs_[0]; } | 1068 LOperand* context() { return inputs_[0]; } |
| 1077 LOperand* left() { return inputs_[1]; } | 1069 LOperand* left() { return inputs_[1]; } |
| 1078 LOperand* right() { return inputs_[2]; } | 1070 LOperand* right() { return inputs_[2]; } |
| 1079 | 1071 |
| 1080 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, | 1072 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, |
| 1081 "string-compare-and-branch") | 1073 "string-compare-and-branch") |
| 1082 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) | 1074 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) |
| 1083 | 1075 |
| 1084 Token::Value op() const { return hydrogen()->token(); } | 1076 Token::Value op() const { return hydrogen()->token(); } |
| 1085 | 1077 |
| 1086 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1078 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1087 }; | 1079 }; |
| 1088 | 1080 |
| 1089 | 1081 |
| 1090 class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 0> { | 1082 class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 0> { |
| 1091 public: | 1083 public: |
| 1092 explicit LHasInstanceTypeAndBranch(LOperand* value) { inputs_[0] = value; } | 1084 explicit LHasInstanceTypeAndBranch(LOperand* value) { inputs_[0] = value; } |
| 1093 | 1085 |
| 1094 LOperand* value() { return inputs_[0]; } | 1086 LOperand* value() { return inputs_[0]; } |
| 1095 | 1087 |
| 1096 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, | 1088 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, |
| 1097 "has-instance-type-and-branch") | 1089 "has-instance-type-and-branch") |
| 1098 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) | 1090 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) |
| 1099 | 1091 |
| 1100 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1092 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1101 }; | 1093 }; |
| 1102 | 1094 |
| 1103 | 1095 |
| 1104 class LGetCachedArrayIndex FINAL : public LTemplateInstruction<1, 1, 0> { | 1096 class LGetCachedArrayIndex FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1105 public: | 1097 public: |
| 1106 explicit LGetCachedArrayIndex(LOperand* value) { inputs_[0] = value; } | 1098 explicit LGetCachedArrayIndex(LOperand* value) { inputs_[0] = value; } |
| 1107 | 1099 |
| 1108 LOperand* value() { return inputs_[0]; } | 1100 LOperand* value() { return inputs_[0]; } |
| 1109 | 1101 |
| 1110 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") | 1102 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") |
| 1111 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) | 1103 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) |
| 1112 }; | 1104 }; |
| 1113 | 1105 |
| 1114 | 1106 |
| 1115 class LHasCachedArrayIndexAndBranch FINAL : public LControlInstruction<1, 0> { | 1107 class LHasCachedArrayIndexAndBranch FINAL : public LControlInstruction<1, 0> { |
| 1116 public: | 1108 public: |
| 1117 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { | 1109 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { |
| 1118 inputs_[0] = value; | 1110 inputs_[0] = value; |
| 1119 } | 1111 } |
| 1120 | 1112 |
| 1121 LOperand* value() { return inputs_[0]; } | 1113 LOperand* value() { return inputs_[0]; } |
| 1122 | 1114 |
| 1123 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, | 1115 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, |
| 1124 "has-cached-array-index-and-branch") | 1116 "has-cached-array-index-and-branch") |
| 1125 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch) | 1117 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch) |
| 1126 | 1118 |
| 1127 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1119 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1128 }; | 1120 }; |
| 1129 | 1121 |
| 1130 | 1122 |
| 1131 class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 1> { | 1123 class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 1> { |
| 1132 public: | 1124 public: |
| 1133 LClassOfTestAndBranch(LOperand* value, LOperand* temp) { | 1125 LClassOfTestAndBranch(LOperand* value, LOperand* temp) { |
| 1134 inputs_[0] = value; | 1126 inputs_[0] = value; |
| 1135 temps_[0] = temp; | 1127 temps_[0] = temp; |
| 1136 } | 1128 } |
| 1137 | 1129 |
| 1138 LOperand* value() { return inputs_[0]; } | 1130 LOperand* value() { return inputs_[0]; } |
| 1139 LOperand* temp() { return temps_[0]; } | 1131 LOperand* temp() { return temps_[0]; } |
| 1140 | 1132 |
| 1141 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, "class-of-test-and-branch") | 1133 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, "class-of-test-and-branch") |
| 1142 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) | 1134 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) |
| 1143 | 1135 |
| 1144 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1136 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1145 }; | 1137 }; |
| 1146 | 1138 |
| 1147 | 1139 |
| 1148 class LCmpT FINAL : public LTemplateInstruction<1, 3, 0> { | 1140 class LCmpT FINAL : public LTemplateInstruction<1, 3, 0> { |
| 1149 public: | 1141 public: |
| 1150 LCmpT(LOperand* context, LOperand* left, LOperand* right) { | 1142 LCmpT(LOperand* context, LOperand* left, LOperand* right) { |
| 1151 inputs_[0] = context; | 1143 inputs_[0] = context; |
| 1152 inputs_[1] = left; | 1144 inputs_[1] = left; |
| 1153 inputs_[2] = right; | 1145 inputs_[2] = right; |
| 1154 } | 1146 } |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1344 | 1336 |
| 1345 class LBranch FINAL : public LControlInstruction<1, 0> { | 1337 class LBranch FINAL : public LControlInstruction<1, 0> { |
| 1346 public: | 1338 public: |
| 1347 explicit LBranch(LOperand* value) { inputs_[0] = value; } | 1339 explicit LBranch(LOperand* value) { inputs_[0] = value; } |
| 1348 | 1340 |
| 1349 LOperand* value() { return inputs_[0]; } | 1341 LOperand* value() { return inputs_[0]; } |
| 1350 | 1342 |
| 1351 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") | 1343 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") |
| 1352 DECLARE_HYDROGEN_ACCESSOR(Branch) | 1344 DECLARE_HYDROGEN_ACCESSOR(Branch) |
| 1353 | 1345 |
| 1354 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1346 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1355 }; | 1347 }; |
| 1356 | 1348 |
| 1357 | 1349 |
| 1358 class LCmpMapAndBranch FINAL : public LControlInstruction<1, 1> { | 1350 class LCmpMapAndBranch FINAL : public LControlInstruction<1, 1> { |
| 1359 public: | 1351 public: |
| 1360 LCmpMapAndBranch(LOperand* value, LOperand* temp) { | 1352 LCmpMapAndBranch(LOperand* value, LOperand* temp) { |
| 1361 inputs_[0] = value; | 1353 inputs_[0] = value; |
| 1362 temps_[0] = temp; | 1354 temps_[0] = temp; |
| 1363 } | 1355 } |
| 1364 | 1356 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1484 public: | 1476 public: |
| 1485 LArithmeticD(Token::Value op, LOperand* left, LOperand* right) : op_(op) { | 1477 LArithmeticD(Token::Value op, LOperand* left, LOperand* right) : op_(op) { |
| 1486 inputs_[0] = left; | 1478 inputs_[0] = left; |
| 1487 inputs_[1] = right; | 1479 inputs_[1] = right; |
| 1488 } | 1480 } |
| 1489 | 1481 |
| 1490 Token::Value op() const { return op_; } | 1482 Token::Value op() const { return op_; } |
| 1491 LOperand* left() { return inputs_[0]; } | 1483 LOperand* left() { return inputs_[0]; } |
| 1492 LOperand* right() { return inputs_[1]; } | 1484 LOperand* right() { return inputs_[1]; } |
| 1493 | 1485 |
| 1494 virtual Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; } | 1486 Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; } |
| 1495 virtual void CompileToNative(LCodeGen* generator) OVERRIDE; | 1487 void CompileToNative(LCodeGen* generator) OVERRIDE; |
| 1496 virtual const char* Mnemonic() const OVERRIDE; | 1488 const char* Mnemonic() const OVERRIDE; |
| 1497 | 1489 |
| 1498 private: | 1490 private: |
| 1499 Token::Value op_; | 1491 Token::Value op_; |
| 1500 }; | 1492 }; |
| 1501 | 1493 |
| 1502 | 1494 |
| 1503 class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> { | 1495 class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> { |
| 1504 public: | 1496 public: |
| 1505 LArithmeticT(Token::Value op, LOperand* context, LOperand* left, | 1497 LArithmeticT(Token::Value op, LOperand* context, LOperand* left, |
| 1506 LOperand* right) | 1498 LOperand* right) |
| 1507 : op_(op) { | 1499 : op_(op) { |
| 1508 inputs_[0] = context; | 1500 inputs_[0] = context; |
| 1509 inputs_[1] = left; | 1501 inputs_[1] = left; |
| 1510 inputs_[2] = right; | 1502 inputs_[2] = right; |
| 1511 } | 1503 } |
| 1512 | 1504 |
| 1513 LOperand* context() { return inputs_[0]; } | 1505 LOperand* context() { return inputs_[0]; } |
| 1514 LOperand* left() { return inputs_[1]; } | 1506 LOperand* left() { return inputs_[1]; } |
| 1515 LOperand* right() { return inputs_[2]; } | 1507 LOperand* right() { return inputs_[2]; } |
| 1516 Token::Value op() const { return op_; } | 1508 Token::Value op() const { return op_; } |
| 1517 | 1509 |
| 1518 virtual Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticT; } | 1510 Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticT; } |
| 1519 virtual void CompileToNative(LCodeGen* generator) OVERRIDE; | 1511 void CompileToNative(LCodeGen* generator) OVERRIDE; |
| 1520 virtual const char* Mnemonic() const OVERRIDE; | 1512 const char* Mnemonic() const OVERRIDE; |
| 1521 | 1513 |
| 1522 private: | 1514 private: |
| 1523 Token::Value op_; | 1515 Token::Value op_; |
| 1524 }; | 1516 }; |
| 1525 | 1517 |
| 1526 | 1518 |
| 1527 class LReturn FINAL : public LTemplateInstruction<0, 3, 0> { | 1519 class LReturn FINAL : public LTemplateInstruction<0, 3, 0> { |
| 1528 public: | 1520 public: |
| 1529 LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) { | 1521 LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) { |
| 1530 inputs_[0] = value; | 1522 inputs_[0] = value; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1611 bool is_fixed_typed_array() const { | 1603 bool is_fixed_typed_array() const { |
| 1612 return hydrogen()->is_fixed_typed_array(); | 1604 return hydrogen()->is_fixed_typed_array(); |
| 1613 } | 1605 } |
| 1614 bool is_typed_elements() const { | 1606 bool is_typed_elements() const { |
| 1615 return is_external() || is_fixed_typed_array(); | 1607 return is_external() || is_fixed_typed_array(); |
| 1616 } | 1608 } |
| 1617 | 1609 |
| 1618 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") | 1610 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
| 1619 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) | 1611 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
| 1620 | 1612 |
| 1621 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1613 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1622 uint32_t base_offset() const { return hydrogen()->base_offset(); } | 1614 uint32_t base_offset() const { return hydrogen()->base_offset(); } |
| 1623 }; | 1615 }; |
| 1624 | 1616 |
| 1625 | 1617 |
| 1626 class LLoadKeyedGeneric FINAL : public LTemplateInstruction<1, 3, 1> { | 1618 class LLoadKeyedGeneric FINAL : public LTemplateInstruction<1, 3, 1> { |
| 1627 public: | 1619 public: |
| 1628 LLoadKeyedGeneric(LOperand* context, LOperand* object, LOperand* key, | 1620 LLoadKeyedGeneric(LOperand* context, LOperand* object, LOperand* key, |
| 1629 LOperand* vector) { | 1621 LOperand* vector) { |
| 1630 inputs_[0] = context; | 1622 inputs_[0] = context; |
| 1631 inputs_[1] = object; | 1623 inputs_[1] = object; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1690 public: | 1682 public: |
| 1691 explicit LLoadContextSlot(LOperand* context) { inputs_[0] = context; } | 1683 explicit LLoadContextSlot(LOperand* context) { inputs_[0] = context; } |
| 1692 | 1684 |
| 1693 LOperand* context() { return inputs_[0]; } | 1685 LOperand* context() { return inputs_[0]; } |
| 1694 | 1686 |
| 1695 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") | 1687 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") |
| 1696 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) | 1688 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) |
| 1697 | 1689 |
| 1698 int slot_index() { return hydrogen()->slot_index(); } | 1690 int slot_index() { return hydrogen()->slot_index(); } |
| 1699 | 1691 |
| 1700 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1692 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1701 }; | 1693 }; |
| 1702 | 1694 |
| 1703 | 1695 |
| 1704 class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 0> { | 1696 class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 0> { |
| 1705 public: | 1697 public: |
| 1706 LStoreContextSlot(LOperand* context, LOperand* value) { | 1698 LStoreContextSlot(LOperand* context, LOperand* value) { |
| 1707 inputs_[0] = context; | 1699 inputs_[0] = context; |
| 1708 inputs_[1] = value; | 1700 inputs_[1] = value; |
| 1709 } | 1701 } |
| 1710 | 1702 |
| 1711 LOperand* context() { return inputs_[0]; } | 1703 LOperand* context() { return inputs_[0]; } |
| 1712 LOperand* value() { return inputs_[1]; } | 1704 LOperand* value() { return inputs_[1]; } |
| 1713 | 1705 |
| 1714 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") | 1706 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") |
| 1715 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) | 1707 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) |
| 1716 | 1708 |
| 1717 int slot_index() { return hydrogen()->slot_index(); } | 1709 int slot_index() { return hydrogen()->slot_index(); } |
| 1718 | 1710 |
| 1719 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1711 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1720 }; | 1712 }; |
| 1721 | 1713 |
| 1722 | 1714 |
| 1723 class LPushArgument FINAL : public LTemplateInstruction<0, 1, 0> { | 1715 class LPushArgument FINAL : public LTemplateInstruction<0, 1, 0> { |
| 1724 public: | 1716 public: |
| 1725 explicit LPushArgument(LOperand* value) { inputs_[0] = value; } | 1717 explicit LPushArgument(LOperand* value) { inputs_[0] = value; } |
| 1726 | 1718 |
| 1727 LOperand* value() { return inputs_[0]; } | 1719 LOperand* value() { return inputs_[0]; } |
| 1728 | 1720 |
| 1729 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") | 1721 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1763 class LInnerAllocatedObject FINAL : public LTemplateInstruction<1, 2, 0> { | 1755 class LInnerAllocatedObject FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1764 public: | 1756 public: |
| 1765 LInnerAllocatedObject(LOperand* base_object, LOperand* offset) { | 1757 LInnerAllocatedObject(LOperand* base_object, LOperand* offset) { |
| 1766 inputs_[0] = base_object; | 1758 inputs_[0] = base_object; |
| 1767 inputs_[1] = offset; | 1759 inputs_[1] = offset; |
| 1768 } | 1760 } |
| 1769 | 1761 |
| 1770 LOperand* base_object() const { return inputs_[0]; } | 1762 LOperand* base_object() const { return inputs_[0]; } |
| 1771 LOperand* offset() const { return inputs_[1]; } | 1763 LOperand* offset() const { return inputs_[1]; } |
| 1772 | 1764 |
| 1773 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1765 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1774 | 1766 |
| 1775 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object") | 1767 DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object") |
| 1776 }; | 1768 }; |
| 1777 | 1769 |
| 1778 | 1770 |
| 1779 class LThisFunction FINAL : public LTemplateInstruction<1, 0, 0> { | 1771 class LThisFunction FINAL : public LTemplateInstruction<1, 0, 0> { |
| 1780 public: | 1772 public: |
| 1781 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") | 1773 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") |
| 1782 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) | 1774 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) |
| 1783 }; | 1775 }; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1803 | 1795 |
| 1804 class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> { | 1796 class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1805 public: | 1797 public: |
| 1806 explicit LCallJSFunction(LOperand* function) { inputs_[0] = function; } | 1798 explicit LCallJSFunction(LOperand* function) { inputs_[0] = function; } |
| 1807 | 1799 |
| 1808 LOperand* function() { return inputs_[0]; } | 1800 LOperand* function() { return inputs_[0]; } |
| 1809 | 1801 |
| 1810 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function") | 1802 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function") |
| 1811 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction) | 1803 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction) |
| 1812 | 1804 |
| 1813 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1805 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1814 | 1806 |
| 1815 int arity() const { return hydrogen()->argument_count() - 1; } | 1807 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1816 }; | 1808 }; |
| 1817 | 1809 |
| 1818 | 1810 |
| 1819 class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> { | 1811 class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> { |
| 1820 public: | 1812 public: |
| 1821 LCallWithDescriptor(CallInterfaceDescriptor descriptor, | 1813 LCallWithDescriptor(CallInterfaceDescriptor descriptor, |
| 1822 const ZoneList<LOperand*>& operands, Zone* zone) | 1814 const ZoneList<LOperand*>& operands, Zone* zone) |
| 1823 : descriptor_(descriptor), | 1815 : descriptor_(descriptor), |
| 1824 inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { | 1816 inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { |
| 1825 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); | 1817 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); |
| 1826 inputs_.AddAll(operands, zone); | 1818 inputs_.AddAll(operands, zone); |
| 1827 } | 1819 } |
| 1828 | 1820 |
| 1829 LOperand* target() const { return inputs_[0]; } | 1821 LOperand* target() const { return inputs_[0]; } |
| 1830 | 1822 |
| 1831 const CallInterfaceDescriptor descriptor() { return descriptor_; } | 1823 const CallInterfaceDescriptor descriptor() { return descriptor_; } |
| 1832 | 1824 |
| 1833 private: | 1825 private: |
| 1834 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") | 1826 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") |
| 1835 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) | 1827 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) |
| 1836 | 1828 |
| 1837 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1829 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1838 | 1830 |
| 1839 int arity() const { return hydrogen()->argument_count() - 1; } | 1831 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1840 | 1832 |
| 1841 CallInterfaceDescriptor descriptor_; | 1833 CallInterfaceDescriptor descriptor_; |
| 1842 ZoneList<LOperand*> inputs_; | 1834 ZoneList<LOperand*> inputs_; |
| 1843 | 1835 |
| 1844 // Iterator support. | 1836 // Iterator support. |
| 1845 virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); } | 1837 int InputCount() FINAL { return inputs_.length(); } |
| 1846 virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; } | 1838 LOperand* InputAt(int i) FINAL { return inputs_[i]; } |
| 1847 | 1839 |
| 1848 virtual int TempCount() FINAL OVERRIDE { return 0; } | 1840 int TempCount() FINAL { return 0; } |
| 1849 virtual LOperand* TempAt(int i) FINAL OVERRIDE { return NULL; } | 1841 LOperand* TempAt(int i) FINAL { return NULL; } |
| 1850 }; | 1842 }; |
| 1851 | 1843 |
| 1852 | 1844 |
| 1853 class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> { | 1845 class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1854 public: | 1846 public: |
| 1855 LInvokeFunction(LOperand* context, LOperand* function) { | 1847 LInvokeFunction(LOperand* context, LOperand* function) { |
| 1856 inputs_[0] = context; | 1848 inputs_[0] = context; |
| 1857 inputs_[1] = function; | 1849 inputs_[1] = function; |
| 1858 } | 1850 } |
| 1859 | 1851 |
| 1860 LOperand* context() { return inputs_[0]; } | 1852 LOperand* context() { return inputs_[0]; } |
| 1861 LOperand* function() { return inputs_[1]; } | 1853 LOperand* function() { return inputs_[1]; } |
| 1862 | 1854 |
| 1863 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") | 1855 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") |
| 1864 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) | 1856 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) |
| 1865 | 1857 |
| 1866 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1858 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1867 | 1859 |
| 1868 int arity() const { return hydrogen()->argument_count() - 1; } | 1860 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1869 }; | 1861 }; |
| 1870 | 1862 |
| 1871 | 1863 |
| 1872 class LCallFunction FINAL : public LTemplateInstruction<1, 2, 0> { | 1864 class LCallFunction FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1873 public: | 1865 public: |
| 1874 LCallFunction(LOperand* context, LOperand* function) { | 1866 LCallFunction(LOperand* context, LOperand* function) { |
| 1875 inputs_[0] = context; | 1867 inputs_[0] = context; |
| 1876 inputs_[1] = function; | 1868 inputs_[1] = function; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1892 inputs_[0] = context; | 1884 inputs_[0] = context; |
| 1893 inputs_[1] = constructor; | 1885 inputs_[1] = constructor; |
| 1894 } | 1886 } |
| 1895 | 1887 |
| 1896 LOperand* context() { return inputs_[0]; } | 1888 LOperand* context() { return inputs_[0]; } |
| 1897 LOperand* constructor() { return inputs_[1]; } | 1889 LOperand* constructor() { return inputs_[1]; } |
| 1898 | 1890 |
| 1899 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") | 1891 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") |
| 1900 DECLARE_HYDROGEN_ACCESSOR(CallNew) | 1892 DECLARE_HYDROGEN_ACCESSOR(CallNew) |
| 1901 | 1893 |
| 1902 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1894 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1903 | 1895 |
| 1904 int arity() const { return hydrogen()->argument_count() - 1; } | 1896 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1905 }; | 1897 }; |
| 1906 | 1898 |
| 1907 | 1899 |
| 1908 class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> { | 1900 class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1909 public: | 1901 public: |
| 1910 LCallNewArray(LOperand* context, LOperand* constructor) { | 1902 LCallNewArray(LOperand* context, LOperand* constructor) { |
| 1911 inputs_[0] = context; | 1903 inputs_[0] = context; |
| 1912 inputs_[1] = constructor; | 1904 inputs_[1] = constructor; |
| 1913 } | 1905 } |
| 1914 | 1906 |
| 1915 LOperand* context() { return inputs_[0]; } | 1907 LOperand* context() { return inputs_[0]; } |
| 1916 LOperand* constructor() { return inputs_[1]; } | 1908 LOperand* constructor() { return inputs_[1]; } |
| 1917 | 1909 |
| 1918 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") | 1910 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") |
| 1919 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) | 1911 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) |
| 1920 | 1912 |
| 1921 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 1913 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 1922 | 1914 |
| 1923 int arity() const { return hydrogen()->argument_count() - 1; } | 1915 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1924 }; | 1916 }; |
| 1925 | 1917 |
| 1926 | 1918 |
| 1927 class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> { | 1919 class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1928 public: | 1920 public: |
| 1929 explicit LCallRuntime(LOperand* context) { inputs_[0] = context; } | 1921 explicit LCallRuntime(LOperand* context) { inputs_[0] = context; } |
| 1930 | 1922 |
| 1931 LOperand* context() { return inputs_[0]; } | 1923 LOperand* context() { return inputs_[0]; } |
| 1932 | 1924 |
| 1933 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") | 1925 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") |
| 1934 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) | 1926 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) |
| 1935 | 1927 |
| 1936 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE { | 1928 bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE { |
| 1937 return save_doubles() == kDontSaveFPRegs; | 1929 return save_doubles() == kDontSaveFPRegs; |
| 1938 } | 1930 } |
| 1939 | 1931 |
| 1940 const Runtime::Function* function() const { return hydrogen()->function(); } | 1932 const Runtime::Function* function() const { return hydrogen()->function(); } |
| 1941 int arity() const { return hydrogen()->argument_count(); } | 1933 int arity() const { return hydrogen()->argument_count(); } |
| 1942 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } | 1934 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } |
| 1943 }; | 1935 }; |
| 1944 | 1936 |
| 1945 | 1937 |
| 1946 class LInteger32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> { | 1938 class LInteger32ToDouble FINAL : public LTemplateInstruction<1, 1, 0> { |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2105 temps_[0] = temp; | 2097 temps_[0] = temp; |
| 2106 } | 2098 } |
| 2107 | 2099 |
| 2108 LOperand* object() { return inputs_[0]; } | 2100 LOperand* object() { return inputs_[0]; } |
| 2109 LOperand* value() { return inputs_[1]; } | 2101 LOperand* value() { return inputs_[1]; } |
| 2110 LOperand* temp() { return temps_[0]; } | 2102 LOperand* temp() { return temps_[0]; } |
| 2111 | 2103 |
| 2112 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") | 2104 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") |
| 2113 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) | 2105 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) |
| 2114 | 2106 |
| 2115 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 2107 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 2116 | 2108 |
| 2117 Representation representation() const { | 2109 Representation representation() const { |
| 2118 return hydrogen()->field_representation(); | 2110 return hydrogen()->field_representation(); |
| 2119 } | 2111 } |
| 2120 }; | 2112 }; |
| 2121 | 2113 |
| 2122 | 2114 |
| 2123 class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> { | 2115 class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> { |
| 2124 public: | 2116 public: |
| 2125 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { | 2117 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { |
| 2126 inputs_[0] = context; | 2118 inputs_[0] = context; |
| 2127 inputs_[1] = object; | 2119 inputs_[1] = object; |
| 2128 inputs_[2] = value; | 2120 inputs_[2] = value; |
| 2129 } | 2121 } |
| 2130 | 2122 |
| 2131 LOperand* context() { return inputs_[0]; } | 2123 LOperand* context() { return inputs_[0]; } |
| 2132 LOperand* object() { return inputs_[1]; } | 2124 LOperand* object() { return inputs_[1]; } |
| 2133 LOperand* value() { return inputs_[2]; } | 2125 LOperand* value() { return inputs_[2]; } |
| 2134 | 2126 |
| 2135 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 2127 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |
| 2136 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 2128 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |
| 2137 | 2129 |
| 2138 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 2130 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 2139 | 2131 |
| 2140 Handle<Object> name() const { return hydrogen()->name(); } | 2132 Handle<Object> name() const { return hydrogen()->name(); } |
| 2141 StrictMode strict_mode() { return hydrogen()->strict_mode(); } | 2133 StrictMode strict_mode() { return hydrogen()->strict_mode(); } |
| 2142 }; | 2134 }; |
| 2143 | 2135 |
| 2144 | 2136 |
| 2145 class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> { | 2137 class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> { |
| 2146 public: | 2138 public: |
| 2147 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { | 2139 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { |
| 2148 inputs_[0] = object; | 2140 inputs_[0] = object; |
| 2149 inputs_[1] = key; | 2141 inputs_[1] = key; |
| 2150 inputs_[2] = value; | 2142 inputs_[2] = value; |
| 2151 } | 2143 } |
| 2152 | 2144 |
| 2153 bool is_external() const { return hydrogen()->is_external(); } | 2145 bool is_external() const { return hydrogen()->is_external(); } |
| 2154 bool is_fixed_typed_array() const { | 2146 bool is_fixed_typed_array() const { |
| 2155 return hydrogen()->is_fixed_typed_array(); | 2147 return hydrogen()->is_fixed_typed_array(); |
| 2156 } | 2148 } |
| 2157 bool is_typed_elements() const { | 2149 bool is_typed_elements() const { |
| 2158 return is_external() || is_fixed_typed_array(); | 2150 return is_external() || is_fixed_typed_array(); |
| 2159 } | 2151 } |
| 2160 LOperand* elements() { return inputs_[0]; } | 2152 LOperand* elements() { return inputs_[0]; } |
| 2161 LOperand* key() { return inputs_[1]; } | 2153 LOperand* key() { return inputs_[1]; } |
| 2162 LOperand* value() { return inputs_[2]; } | 2154 LOperand* value() { return inputs_[2]; } |
| 2163 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } | 2155 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } |
| 2164 | 2156 |
| 2165 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") | 2157 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") |
| 2166 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) | 2158 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) |
| 2167 | 2159 |
| 2168 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 2160 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 2169 bool NeedsCanonicalization() { | 2161 bool NeedsCanonicalization() { |
| 2170 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() || | 2162 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() || |
| 2171 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) { | 2163 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) { |
| 2172 return false; | 2164 return false; |
| 2173 } | 2165 } |
| 2174 return hydrogen()->NeedsCanonicalization(); | 2166 return hydrogen()->NeedsCanonicalization(); |
| 2175 } | 2167 } |
| 2176 uint32_t base_offset() const { return hydrogen()->base_offset(); } | 2168 uint32_t base_offset() const { return hydrogen()->base_offset(); } |
| 2177 }; | 2169 }; |
| 2178 | 2170 |
| 2179 | 2171 |
| 2180 class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> { | 2172 class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> { |
| 2181 public: | 2173 public: |
| 2182 LStoreKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key, | 2174 LStoreKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key, |
| 2183 LOperand* value) { | 2175 LOperand* value) { |
| 2184 inputs_[0] = context; | 2176 inputs_[0] = context; |
| 2185 inputs_[1] = obj; | 2177 inputs_[1] = obj; |
| 2186 inputs_[2] = key; | 2178 inputs_[2] = key; |
| 2187 inputs_[3] = value; | 2179 inputs_[3] = value; |
| 2188 } | 2180 } |
| 2189 | 2181 |
| 2190 LOperand* context() { return inputs_[0]; } | 2182 LOperand* context() { return inputs_[0]; } |
| 2191 LOperand* object() { return inputs_[1]; } | 2183 LOperand* object() { return inputs_[1]; } |
| 2192 LOperand* key() { return inputs_[2]; } | 2184 LOperand* key() { return inputs_[2]; } |
| 2193 LOperand* value() { return inputs_[3]; } | 2185 LOperand* value() { return inputs_[3]; } |
| 2194 | 2186 |
| 2195 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") | 2187 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") |
| 2196 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) | 2188 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) |
| 2197 | 2189 |
| 2198 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 2190 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 2199 | 2191 |
| 2200 StrictMode strict_mode() { return hydrogen()->strict_mode(); } | 2192 StrictMode strict_mode() { return hydrogen()->strict_mode(); } |
| 2201 }; | 2193 }; |
| 2202 | 2194 |
| 2203 | 2195 |
| 2204 class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 1> { | 2196 class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 1> { |
| 2205 public: | 2197 public: |
| 2206 LTransitionElementsKind(LOperand* object, LOperand* context, | 2198 LTransitionElementsKind(LOperand* object, LOperand* context, |
| 2207 LOperand* new_map_temp) { | 2199 LOperand* new_map_temp) { |
| 2208 inputs_[0] = object; | 2200 inputs_[0] = object; |
| 2209 inputs_[1] = context; | 2201 inputs_[1] = context; |
| 2210 temps_[0] = new_map_temp; | 2202 temps_[0] = new_map_temp; |
| 2211 } | 2203 } |
| 2212 | 2204 |
| 2213 LOperand* context() { return inputs_[1]; } | 2205 LOperand* context() { return inputs_[1]; } |
| 2214 LOperand* object() { return inputs_[0]; } | 2206 LOperand* object() { return inputs_[0]; } |
| 2215 LOperand* new_map_temp() { return temps_[0]; } | 2207 LOperand* new_map_temp() { return temps_[0]; } |
| 2216 | 2208 |
| 2217 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, | 2209 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, |
| 2218 "transition-elements-kind") | 2210 "transition-elements-kind") |
| 2219 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) | 2211 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) |
| 2220 | 2212 |
| 2221 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 2213 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 2222 | 2214 |
| 2223 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } | 2215 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } |
| 2224 Handle<Map> transitioned_map() { | 2216 Handle<Map> transitioned_map() { |
| 2225 return hydrogen()->transitioned_map().handle(); | 2217 return hydrogen()->transitioned_map().handle(); |
| 2226 } | 2218 } |
| 2227 ElementsKind from_kind() { return hydrogen()->from_kind(); } | 2219 ElementsKind from_kind() { return hydrogen()->from_kind(); } |
| 2228 ElementsKind to_kind() { return hydrogen()->to_kind(); } | 2220 ElementsKind to_kind() { return hydrogen()->to_kind(); } |
| 2229 }; | 2221 }; |
| 2230 | 2222 |
| 2231 | 2223 |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2476 public: | 2468 public: |
| 2477 explicit LTypeofIsAndBranch(LOperand* value) { inputs_[0] = value; } | 2469 explicit LTypeofIsAndBranch(LOperand* value) { inputs_[0] = value; } |
| 2478 | 2470 |
| 2479 LOperand* value() { return inputs_[0]; } | 2471 LOperand* value() { return inputs_[0]; } |
| 2480 | 2472 |
| 2481 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") | 2473 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") |
| 2482 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch) | 2474 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch) |
| 2483 | 2475 |
| 2484 Handle<String> type_literal() { return hydrogen()->type_literal(); } | 2476 Handle<String> type_literal() { return hydrogen()->type_literal(); } |
| 2485 | 2477 |
| 2486 virtual void PrintDataTo(StringStream* stream) OVERRIDE; | 2478 void PrintDataTo(StringStream* stream) OVERRIDE; |
| 2487 }; | 2479 }; |
| 2488 | 2480 |
| 2489 | 2481 |
| 2490 class LIsConstructCallAndBranch FINAL : public LControlInstruction<0, 1> { | 2482 class LIsConstructCallAndBranch FINAL : public LControlInstruction<0, 1> { |
| 2491 public: | 2483 public: |
| 2492 explicit LIsConstructCallAndBranch(LOperand* temp) { temps_[0] = temp; } | 2484 explicit LIsConstructCallAndBranch(LOperand* temp) { temps_[0] = temp; } |
| 2493 | 2485 |
| 2494 LOperand* temp() { return temps_[0]; } | 2486 LOperand* temp() { return temps_[0]; } |
| 2495 | 2487 |
| 2496 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, | 2488 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, |
| 2497 "is-construct-call-and-branch") | 2489 "is-construct-call-and-branch") |
| 2498 }; | 2490 }; |
| 2499 | 2491 |
| 2500 | 2492 |
| 2501 class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> { | 2493 class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> { |
| 2502 public: | 2494 public: |
| 2503 LOsrEntry() {} | 2495 LOsrEntry() {} |
| 2504 | 2496 |
| 2505 virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { | 2497 bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; } |
| 2506 return false; | |
| 2507 } | |
| 2508 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") | 2498 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") |
| 2509 }; | 2499 }; |
| 2510 | 2500 |
| 2511 | 2501 |
| 2512 class LStackCheck FINAL : public LTemplateInstruction<0, 1, 0> { | 2502 class LStackCheck FINAL : public LTemplateInstruction<0, 1, 0> { |
| 2513 public: | 2503 public: |
| 2514 explicit LStackCheck(LOperand* context) { inputs_[0] = context; } | 2504 explicit LStackCheck(LOperand* context) { inputs_[0] = context; } |
| 2515 | 2505 |
| 2516 LOperand* context() { return inputs_[0]; } | 2506 LOperand* context() { return inputs_[0]; } |
| 2517 | 2507 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2693 | 2683 |
| 2694 // An input operand in a register or a constant operand. | 2684 // An input operand in a register or a constant operand. |
| 2695 MUST_USE_RESULT LOperand* UseRegisterOrConstant(HValue* value); | 2685 MUST_USE_RESULT LOperand* UseRegisterOrConstant(HValue* value); |
| 2696 MUST_USE_RESULT LOperand* UseRegisterOrConstantAtStart(HValue* value); | 2686 MUST_USE_RESULT LOperand* UseRegisterOrConstantAtStart(HValue* value); |
| 2697 | 2687 |
| 2698 // An input operand in a constant operand. | 2688 // An input operand in a constant operand. |
| 2699 MUST_USE_RESULT LOperand* UseConstant(HValue* value); | 2689 MUST_USE_RESULT LOperand* UseConstant(HValue* value); |
| 2700 | 2690 |
| 2701 // An input operand in register, stack slot or a constant operand. | 2691 // An input operand in register, stack slot or a constant operand. |
| 2702 // Will not be moved to a register even if one is freely available. | 2692 // Will not be moved to a register even if one is freely available. |
| 2703 virtual MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE; | 2693 MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE; |
| 2704 | 2694 |
| 2705 // Temporary operand that must be in a register. | 2695 // Temporary operand that must be in a register. |
| 2706 MUST_USE_RESULT LUnallocated* TempRegister(); | 2696 MUST_USE_RESULT LUnallocated* TempRegister(); |
| 2707 MUST_USE_RESULT LUnallocated* TempDoubleRegister(); | 2697 MUST_USE_RESULT LUnallocated* TempDoubleRegister(); |
| 2708 MUST_USE_RESULT LOperand* FixedTemp(Register reg); | 2698 MUST_USE_RESULT LOperand* FixedTemp(Register reg); |
| 2709 MUST_USE_RESULT LOperand* FixedTemp(DoubleRegister reg); | 2699 MUST_USE_RESULT LOperand* FixedTemp(DoubleRegister reg); |
| 2710 | 2700 |
| 2711 // Methods for setting up define-use relationships. | 2701 // Methods for setting up define-use relationships. |
| 2712 // Return the same instruction that they are passed. | 2702 // Return the same instruction that they are passed. |
| 2713 LInstruction* Define(LTemplateResultInstruction<1>* instr, | 2703 LInstruction* Define(LTemplateResultInstruction<1>* instr, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2747 | 2737 |
| 2748 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2738 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2749 }; | 2739 }; |
| 2750 | 2740 |
| 2751 #undef DECLARE_HYDROGEN_ACCESSOR | 2741 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2752 #undef DECLARE_CONCRETE_INSTRUCTION | 2742 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2753 } | 2743 } |
| 2754 } // namespace v8::internal | 2744 } // namespace v8::internal |
| 2755 | 2745 |
| 2756 #endif // V8_PPC_LITHIUM_PPC_H_ | 2746 #endif // V8_PPC_LITHIUM_PPC_H_ |
| OLD | NEW |