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