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