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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
517 | 517 |
518 Major MajorKey() { return CEntry; } | 518 Major MajorKey() { return CEntry; } |
519 // Minor key must differ if different result_size_ values means different | 519 // Minor key must differ if different result_size_ values means different |
520 // code is generated. | 520 // code is generated. |
521 int MinorKey(); | 521 int MinorKey(); |
522 | 522 |
523 const char* GetName() { return "CEntryStub"; } | 523 const char* GetName() { return "CEntryStub"; } |
524 }; | 524 }; |
525 | 525 |
526 | 526 |
527 class ApiGetterEntryStub : public CodeStub { | |
528 public: | |
529 ApiGetterEntryStub(Handle<AccessorInfo> info, | |
530 ApiFunction* fun) | |
531 : info_(info), | |
532 fun_(fun) { } | |
533 void Generate(MacroAssembler* masm); | |
534 virtual bool has_custom_cache() { return true; } | |
535 virtual bool GetCustomCache(Code** code_out); | |
antonm
2010/11/10 14:53:54
looks like these were the only stubs with custom c
SeRya
2010/11/11 15:50:39
Done.
| |
536 virtual void SetCustomCache(Code* value); | |
537 | |
538 static const int kStackSpace = 5; | |
539 static const int kArgc = 2; | |
540 private: | |
541 Handle<AccessorInfo> info() { return info_; } | |
542 ApiFunction* fun() { return fun_; } | |
543 Major MajorKey() { return NoCache; } | |
544 int MinorKey() { return 0; } | |
545 const char* GetName() { return "ApiGetterEntryStub"; } | |
546 // The accessor info associated with the function. | |
547 Handle<AccessorInfo> info_; | |
548 // The function to be called. | |
549 ApiFunction* fun_; | |
550 }; | |
551 | |
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 | |
579 class JSEntryStub : public CodeStub { | 527 class JSEntryStub : public CodeStub { |
580 public: | 528 public: |
581 JSEntryStub() { } | 529 JSEntryStub() { } |
582 | 530 |
583 void Generate(MacroAssembler* masm) { GenerateBody(masm, false); } | 531 void Generate(MacroAssembler* masm) { GenerateBody(masm, false); } |
584 | 532 |
585 protected: | 533 protected: |
586 void GenerateBody(MacroAssembler* masm, bool is_construct); | 534 void GenerateBody(MacroAssembler* masm, bool is_construct); |
587 | 535 |
588 private: | 536 private: |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
853 private: | 801 private: |
854 StringCharCodeAtGenerator char_code_at_generator_; | 802 StringCharCodeAtGenerator char_code_at_generator_; |
855 StringCharFromCodeGenerator char_from_code_generator_; | 803 StringCharFromCodeGenerator char_from_code_generator_; |
856 | 804 |
857 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); | 805 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); |
858 }; | 806 }; |
859 | 807 |
860 } } // namespace v8::internal | 808 } } // namespace v8::internal |
861 | 809 |
862 #endif // V8_CODE_STUBS_H_ | 810 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |