| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 NoCache, // marker for stubs that do custom caching | 99 NoCache, // marker for stubs that do custom caching |
| 100 NUMBER_OF_IDS | 100 NUMBER_OF_IDS |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 // Retrieve the code for the stub. Generate the code if needed. | 103 // Retrieve the code for the stub. Generate the code if needed. |
| 104 Handle<Code> GetCode(); | 104 Handle<Code> GetCode(); |
| 105 | 105 |
| 106 // Retrieve the code for the stub if already generated. Do not | 106 // Retrieve the code for the stub if already generated. Do not |
| 107 // generate the code if not already generated and instead return a | 107 // generate the code if not already generated and instead return a |
| 108 // retry after GC Failure object. | 108 // retry after GC Failure object. |
| 109 Object* TryGetCode(); | 109 MUST_USE_RESULT MaybeObject* TryGetCode(); |
| 110 | 110 |
| 111 static Major MajorKeyFromKey(uint32_t key) { | 111 static Major MajorKeyFromKey(uint32_t key) { |
| 112 return static_cast<Major>(MajorKeyBits::decode(key)); | 112 return static_cast<Major>(MajorKeyBits::decode(key)); |
| 113 } | 113 } |
| 114 static int MinorKeyFromKey(uint32_t key) { | 114 static int MinorKeyFromKey(uint32_t key) { |
| 115 return MinorKeyBits::decode(key); | 115 return MinorKeyBits::decode(key); |
| 116 } | 116 } |
| 117 | 117 |
| 118 // Gets the major key from a code object that is a code stub or binary op IC. | 118 // Gets the major key from a code object that is a code stub or binary op IC. |
| 119 static Major GetMajorKey(Code* code_stub) { | 119 static Major GetMajorKey(Code* code_stub) { |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 ApiGetterEntryStub(Handle<AccessorInfo> info, | 529 ApiGetterEntryStub(Handle<AccessorInfo> info, |
| 530 ApiFunction* fun) | 530 ApiFunction* fun) |
| 531 : info_(info), | 531 : info_(info), |
| 532 fun_(fun) { } | 532 fun_(fun) { } |
| 533 void Generate(MacroAssembler* masm); | 533 void Generate(MacroAssembler* masm); |
| 534 virtual bool has_custom_cache() { return true; } | 534 virtual bool has_custom_cache() { return true; } |
| 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 = 4; | 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 "ApiEntryStub"; } |
| 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_; |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 private: | 827 private: |
| 828 StringCharCodeAtGenerator char_code_at_generator_; | 828 StringCharCodeAtGenerator char_code_at_generator_; |
| 829 StringCharFromCodeGenerator char_from_code_generator_; | 829 StringCharFromCodeGenerator char_from_code_generator_; |
| 830 | 830 |
| 831 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); | 831 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); |
| 832 }; | 832 }; |
| 833 | 833 |
| 834 } } // namespace v8::internal | 834 } } // namespace v8::internal |
| 835 | 835 |
| 836 #endif // V8_CODE_STUBS_H_ | 836 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |