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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Object* 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) { |
120 return static_cast<Major>(code_stub->major_key()); | 120 return static_cast<Major>(code_stub->major_key()); |
121 } | 121 } |
122 | 122 |
123 static const char* MajorName(Major major_key, bool allow_unknown_keys); | 123 static const char* MajorName(Major major_key, bool allow_unknown_keys); |
124 | 124 |
125 virtual ~CodeStub() {} | 125 virtual ~CodeStub() {} |
126 | 126 |
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 private: | 786 private: |
787 StringCharCodeAtGenerator char_code_at_generator_; | 787 StringCharCodeAtGenerator char_code_at_generator_; |
788 StringCharFromCodeGenerator char_from_code_generator_; | 788 StringCharFromCodeGenerator char_from_code_generator_; |
789 | 789 |
790 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); | 790 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); |
791 }; | 791 }; |
792 | 792 |
793 } } // namespace v8::internal | 793 } } // namespace v8::internal |
794 | 794 |
795 #endif // V8_CODE_STUBS_H_ | 795 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |