| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 } else { | 553 } else { |
| 554 PrintF("\n"); | 554 PrintF("\n"); |
| 555 } | 555 } |
| 556 } | 556 } |
| 557 #endif | 557 #endif |
| 558 }; | 558 }; |
| 559 | 559 |
| 560 | 560 |
| 561 class CEntryStub : public CodeStub { | 561 class CEntryStub : public CodeStub { |
| 562 public: | 562 public: |
| 563 explicit CEntryStub(int result_size, | 563 explicit CEntryStub(int result_size) : result_size_(result_size) { } |
| 564 ExitFrame::Mode mode = ExitFrame::MODE_NORMAL) | |
| 565 : result_size_(result_size), mode_(mode) { } | |
| 566 | 564 |
| 567 void Generate(MacroAssembler* masm); | 565 void Generate(MacroAssembler* masm); |
| 568 | 566 |
| 569 private: | 567 private: |
| 570 void GenerateCore(MacroAssembler* masm, | 568 void GenerateCore(MacroAssembler* masm, |
| 571 Label* throw_normal_exception, | 569 Label* throw_normal_exception, |
| 572 Label* throw_termination_exception, | 570 Label* throw_termination_exception, |
| 573 Label* throw_out_of_memory_exception, | 571 Label* throw_out_of_memory_exception, |
| 574 bool do_gc, | 572 bool do_gc, |
| 575 bool always_allocate_scope, | 573 bool always_allocate_scope, |
| 576 int alignment_skew = 0); | 574 int alignment_skew = 0); |
| 577 void GenerateThrowTOS(MacroAssembler* masm); | 575 void GenerateThrowTOS(MacroAssembler* masm); |
| 578 void GenerateThrowUncatchable(MacroAssembler* masm, | 576 void GenerateThrowUncatchable(MacroAssembler* masm, |
| 579 UncatchableExceptionType type); | 577 UncatchableExceptionType type); |
| 580 | 578 |
| 581 // Number of pointers/values returned. | 579 // Number of pointers/values returned. |
| 582 const int result_size_; | 580 const int result_size_; |
| 583 const ExitFrame::Mode mode_; | |
| 584 | 581 |
| 585 // Minor key encoding | 582 // Minor key encoding |
| 586 class ExitFrameModeBits: public BitField<ExitFrame::Mode, 0, 1> {}; | |
| 587 class IndirectResultBits: public BitField<bool, 1, 1> {}; | 583 class IndirectResultBits: public BitField<bool, 1, 1> {}; |
| 588 | 584 |
| 589 Major MajorKey() { return CEntry; } | 585 Major MajorKey() { return CEntry; } |
| 590 // Minor key must differ if different result_size_ values means different | 586 // Minor key must differ if different result_size_ values means different |
| 591 // code is generated. | 587 // code is generated. |
| 592 int MinorKey(); | 588 int MinorKey(); |
| 593 | 589 |
| 594 const char* GetName() { return "CEntryStub"; } | 590 const char* GetName() { return "CEntryStub"; } |
| 595 }; | 591 }; |
| 596 | 592 |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 StringCharFromCodeGenerator char_from_code_generator_; | 896 StringCharFromCodeGenerator char_from_code_generator_; |
| 901 | 897 |
| 902 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); | 898 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); |
| 903 }; | 899 }; |
| 904 | 900 |
| 905 | 901 |
| 906 } // namespace internal | 902 } // namespace internal |
| 907 } // namespace v8 | 903 } // namespace v8 |
| 908 | 904 |
| 909 #endif // V8_CODEGEN_H_ | 905 #endif // V8_CODEGEN_H_ |
| OLD | NEW |