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