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