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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 virtual bool GetCustomCache(Code** code_out); | 535 virtual bool GetCustomCache(Code** code_out); |
536 virtual void SetCustomCache(Code* value); | 536 virtual void SetCustomCache(Code* value); |
537 | 537 |
538 static const int kStackSpace = 5; | 538 static const int kStackSpace = 5; |
539 static const int kArgc = 2; | 539 static const int kArgc = 2; |
540 private: | 540 private: |
541 Handle<AccessorInfo> info() { return info_; } | 541 Handle<AccessorInfo> info() { return info_; } |
542 ApiFunction* fun() { return fun_; } | 542 ApiFunction* fun() { return fun_; } |
543 Major MajorKey() { return NoCache; } | 543 Major MajorKey() { return NoCache; } |
544 int MinorKey() { return 0; } | 544 int MinorKey() { return 0; } |
545 const char* GetName() { return "ApiEntryStub"; } | 545 const char* GetName() { return "ApiGetterEntryStub"; } |
546 // The accessor info associated with the function. | 546 // The accessor info associated with the function. |
547 Handle<AccessorInfo> info_; | 547 Handle<AccessorInfo> info_; |
548 // The function to be called. | 548 // The function to be called. |
549 ApiFunction* fun_; | 549 ApiFunction* fun_; |
550 }; | 550 }; |
551 | 551 |
552 | 552 |
| 553 class ApiCallEntryStub : public CodeStub { |
| 554 public: |
| 555 ApiCallEntryStub(Handle<CallHandlerInfo> info, |
| 556 ApiFunction* fun) |
| 557 : info_(info), |
| 558 fun_(fun) { } |
| 559 void Generate(MacroAssembler* masm); |
| 560 virtual bool has_custom_cache() { return true; } |
| 561 virtual bool GetCustomCache(Code** code_out); |
| 562 virtual void SetCustomCache(Code* value); |
| 563 |
| 564 static const int kStackSpace = 0; |
| 565 static const int kArgc = 5; |
| 566 private: |
| 567 Handle<CallHandlerInfo> info() { return info_; } |
| 568 ApiFunction* fun() { return fun_; } |
| 569 Major MajorKey() { return NoCache; } |
| 570 int MinorKey() { return 0; } |
| 571 const char* GetName() { return "ApiCallEntryStub"; } |
| 572 // The call handler info associated with the function. |
| 573 Handle<CallHandlerInfo> info_; |
| 574 // The function to be called. |
| 575 ApiFunction* fun_; |
| 576 }; |
| 577 |
| 578 |
553 class JSEntryStub : public CodeStub { | 579 class JSEntryStub : public CodeStub { |
554 public: | 580 public: |
555 JSEntryStub() { } | 581 JSEntryStub() { } |
556 | 582 |
557 void Generate(MacroAssembler* masm) { GenerateBody(masm, false); } | 583 void Generate(MacroAssembler* masm) { GenerateBody(masm, false); } |
558 | 584 |
559 protected: | 585 protected: |
560 void GenerateBody(MacroAssembler* masm, bool is_construct); | 586 void GenerateBody(MacroAssembler* masm, bool is_construct); |
561 | 587 |
562 private: | 588 private: |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 private: | 853 private: |
828 StringCharCodeAtGenerator char_code_at_generator_; | 854 StringCharCodeAtGenerator char_code_at_generator_; |
829 StringCharFromCodeGenerator char_from_code_generator_; | 855 StringCharFromCodeGenerator char_from_code_generator_; |
830 | 856 |
831 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); | 857 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); |
832 }; | 858 }; |
833 | 859 |
834 } } // namespace v8::internal | 860 } } // namespace v8::internal |
835 | 861 |
836 #endif // V8_CODE_STUBS_H_ | 862 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |