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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 ICU(CallIC_Miss) \ | 46 ICU(CallIC_Miss) \ |
47 ICU(StoreIC_Miss) \ | 47 ICU(StoreIC_Miss) \ |
48 ICU(SharedStoreIC_ExtendStorage) \ | 48 ICU(SharedStoreIC_ExtendStorage) \ |
49 ICU(KeyedStoreIC_Miss) \ | 49 ICU(KeyedStoreIC_Miss) \ |
50 /* Utilities for IC stubs. */ \ | 50 /* Utilities for IC stubs. */ \ |
51 ICU(LoadCallbackProperty) \ | 51 ICU(LoadCallbackProperty) \ |
52 ICU(StoreCallbackProperty) \ | 52 ICU(StoreCallbackProperty) \ |
53 ICU(LoadPropertyWithInterceptorOnly) \ | 53 ICU(LoadPropertyWithInterceptorOnly) \ |
54 ICU(LoadPropertyWithInterceptorForLoad) \ | 54 ICU(LoadPropertyWithInterceptorForLoad) \ |
55 ICU(LoadPropertyWithInterceptorForCall) \ | 55 ICU(LoadPropertyWithInterceptorForCall) \ |
| 56 ICU(KeyedLoadPropertyWithInterceptor) \ |
56 ICU(StoreInterceptorProperty) | 57 ICU(StoreInterceptorProperty) |
57 | 58 |
58 // | 59 // |
59 // IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC, | 60 // IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC, |
60 // and KeyedStoreIC. | 61 // and KeyedStoreIC. |
61 // | 62 // |
62 class IC { | 63 class IC { |
63 public: | 64 public: |
64 | 65 |
65 // The ids for utility called from the generated code. | 66 // The ids for utility called from the generated code. |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 } | 287 } |
287 static void GenerateGeneric(MacroAssembler* masm); | 288 static void GenerateGeneric(MacroAssembler* masm); |
288 static void GenerateString(MacroAssembler* masm); | 289 static void GenerateString(MacroAssembler* masm); |
289 | 290 |
290 // Generators for external array types. See objects.h. | 291 // Generators for external array types. See objects.h. |
291 // These are similar to the generic IC; they optimize the case of | 292 // These are similar to the generic IC; they optimize the case of |
292 // operating upon external array types but fall back to the runtime | 293 // operating upon external array types but fall back to the runtime |
293 // for all other types. | 294 // for all other types. |
294 static void GenerateExternalArray(MacroAssembler* masm, | 295 static void GenerateExternalArray(MacroAssembler* masm, |
295 ExternalArrayType array_type); | 296 ExternalArrayType array_type); |
| 297 static void GenerateIndexedInterceptor(MacroAssembler* masm); |
296 | 298 |
297 // Clear the use of the inlined version. | 299 // Clear the use of the inlined version. |
298 static void ClearInlinedVersion(Address address); | 300 static void ClearInlinedVersion(Address address); |
299 | 301 |
300 private: | 302 private: |
301 // Bit mask to be tested against bit field for the cases when | 303 // Bit mask to be tested against bit field for the cases when |
302 // generic stub should go into slow case. | 304 // generic stub should go into slow case. |
303 // Access check is necessary explicitly since generic stub does not perform | 305 // Access check is necessary explicitly since generic stub does not perform |
304 // map checks. | 306 // map checks. |
305 static const int kSlowCaseBitFieldMask = | 307 static const int kSlowCaseBitFieldMask = |
(...skipping 16 matching lines...) Expand all Loading... |
322 return Builtins::builtin(Builtins::KeyedLoadIC_Generic); | 324 return Builtins::builtin(Builtins::KeyedLoadIC_Generic); |
323 } | 325 } |
324 static Code* pre_monomorphic_stub() { | 326 static Code* pre_monomorphic_stub() { |
325 return Builtins::builtin(Builtins::KeyedLoadIC_PreMonomorphic); | 327 return Builtins::builtin(Builtins::KeyedLoadIC_PreMonomorphic); |
326 } | 328 } |
327 static Code* string_stub() { | 329 static Code* string_stub() { |
328 return Builtins::builtin(Builtins::KeyedLoadIC_String); | 330 return Builtins::builtin(Builtins::KeyedLoadIC_String); |
329 } | 331 } |
330 static Code* external_array_stub(JSObject::ElementsKind elements_kind); | 332 static Code* external_array_stub(JSObject::ElementsKind elements_kind); |
331 | 333 |
| 334 static Code* indexed_interceptor_stub() { |
| 335 return Builtins::builtin(Builtins::KeyedLoadIC_IndexedInterceptor); |
| 336 } |
| 337 |
332 static void Clear(Address address, Code* target); | 338 static void Clear(Address address, Code* target); |
333 | 339 |
334 // Support for patching the map that is checked in an inlined | 340 // Support for patching the map that is checked in an inlined |
335 // version of keyed load. | 341 // version of keyed load. |
336 static bool PatchInlinedLoad(Address address, Object* map); | 342 static bool PatchInlinedLoad(Address address, Object* map); |
337 | 343 |
338 friend class IC; | 344 friend class IC; |
339 }; | 345 }; |
340 | 346 |
341 | 347 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 // The map is the new map that the inlined code should check against. | 438 // The map is the new map that the inlined code should check against. |
433 static bool PatchInlinedStore(Address address, Object* map); | 439 static bool PatchInlinedStore(Address address, Object* map); |
434 | 440 |
435 friend class IC; | 441 friend class IC; |
436 }; | 442 }; |
437 | 443 |
438 | 444 |
439 } } // namespace v8::internal | 445 } } // namespace v8::internal |
440 | 446 |
441 #endif // V8_IC_H_ | 447 #endif // V8_IC_H_ |
OLD | NEW |