OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 ICU(StoreIC_Miss) \ | 42 ICU(StoreIC_Miss) \ |
43 ICU(SharedStoreIC_ExtendStorage) \ | 43 ICU(SharedStoreIC_ExtendStorage) \ |
44 ICU(KeyedStoreIC_Miss) \ | 44 ICU(KeyedStoreIC_Miss) \ |
45 /* Utilities for IC stubs. */ \ | 45 /* Utilities for IC stubs. */ \ |
46 ICU(LoadCallbackProperty) \ | 46 ICU(LoadCallbackProperty) \ |
47 ICU(StoreCallbackProperty) \ | 47 ICU(StoreCallbackProperty) \ |
48 ICU(LoadInterceptorProperty) \ | 48 ICU(LoadInterceptorProperty) \ |
49 ICU(StoreInterceptorProperty) | 49 ICU(StoreInterceptorProperty) |
50 | 50 |
51 // | 51 // |
52 // IC is the base class for LoadIC, StoreIC and CallIC. | 52 // IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC, |
| 53 // and KeyedStoreIC. |
53 // | 54 // |
54 class IC { | 55 class IC { |
55 public: | 56 public: |
56 | 57 |
57 // The ids for utility called from the generated code. | 58 // The ids for utility called from the generated code. |
58 enum UtilityId { | 59 enum UtilityId { |
59 #define CONST_NAME(name) k##name, | 60 #define CONST_NAME(name) k##name, |
60 IC_UTIL_LIST(CONST_NAME) | 61 IC_UTIL_LIST(CONST_NAME) |
61 #undef CONST_NAME | 62 #undef CONST_NAME |
62 kUtilityCount | 63 kUtilityCount |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 static void GenerateMiss(MacroAssembler* masm); | 213 static void GenerateMiss(MacroAssembler* masm); |
213 static void GenerateMegamorphic(MacroAssembler* masm); | 214 static void GenerateMegamorphic(MacroAssembler* masm); |
214 static void GenerateNormal(MacroAssembler* masm); | 215 static void GenerateNormal(MacroAssembler* masm); |
215 | 216 |
216 // Specialized code generator routines. | 217 // Specialized code generator routines. |
217 static void GenerateArrayLength(MacroAssembler* masm); | 218 static void GenerateArrayLength(MacroAssembler* masm); |
218 static void GenerateStringLength(MacroAssembler* masm); | 219 static void GenerateStringLength(MacroAssembler* masm); |
219 static void GenerateFunctionPrototype(MacroAssembler* masm); | 220 static void GenerateFunctionPrototype(MacroAssembler* masm); |
220 | 221 |
221 // The offset from the inlined patch site to the start of the | 222 // The offset from the inlined patch site to the start of the |
222 // inlined load instruction. It is 7 bytes (test eax, imm) plus | 223 // inlined load instruction. It is architecture-dependent, and not |
223 // 6 bytes (jne slow_label). | 224 // used on ARM. |
224 static const int kOffsetToLoadInstruction; | 225 static const int kOffsetToLoadInstruction; |
225 | 226 |
226 private: | 227 private: |
227 static void Generate(MacroAssembler* masm, const ExternalReference& f); | 228 static void Generate(MacroAssembler* masm, const ExternalReference& f); |
228 | 229 |
229 // Update the inline cache and the global stub cache based on the | 230 // Update the inline cache and the global stub cache based on the |
230 // lookup result. | 231 // lookup result. |
231 void UpdateCaches(LookupResult* lookup, | 232 void UpdateCaches(LookupResult* lookup, |
232 State state, | 233 State state, |
233 Handle<Object> object, | 234 Handle<Object> object, |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 // version of keyed store. | 390 // version of keyed store. |
390 static bool PatchInlinedStore(Address address, Object* map); | 391 static bool PatchInlinedStore(Address address, Object* map); |
391 | 392 |
392 friend class IC; | 393 friend class IC; |
393 }; | 394 }; |
394 | 395 |
395 | 396 |
396 } } // namespace v8::internal | 397 } } // namespace v8::internal |
397 | 398 |
398 #endif // V8_IC_H_ | 399 #endif // V8_IC_H_ |
OLD | NEW |