| 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 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 #ifndef V8_IC_H_ | 28 #ifndef V8_IC_H_ |
| 29 #define V8_IC_H_ | 29 #define V8_IC_H_ |
| 30 | 30 |
| 31 #include "assembler.h" | 31 #include "assembler.h" |
| 32 | 32 |
| 33 namespace v8 { namespace internal { | 33 namespace v8 { namespace internal { |
| 34 | 34 |
| 35 // IC_UTIL_LIST defines all utility functions called from generated | 35 // IC_UTIL_LIST defines all utility functions called from generated |
| 36 // inline caching code. The argument for the macro, ICU, is the function name. | 36 // inline caching code. The argument for the macro, ICU, is the function name. |
| 37 #define IC_UTIL_LIST(ICU) \ | 37 #define IC_UTIL_LIST(ICU) \ |
| 38 ICU(LoadIC_Miss) \ | 38 ICU(LoadIC_Miss) \ |
| 39 ICU(KeyedLoadIC_Miss) \ | 39 ICU(KeyedLoadIC_Miss) \ |
| 40 ICU(CallIC_Miss) \ | 40 ICU(CallIC_Miss) \ |
| 41 ICU(StoreIC_Miss) \ | 41 ICU(StoreIC_Miss) \ |
| 42 ICU(StoreIC_ExtendStorage) \ | 42 ICU(SharedStoreIC_ExtendStorage) \ |
| 43 ICU(KeyedStoreIC_Miss) \ | 43 ICU(KeyedStoreIC_Miss) \ |
| 44 /* Utilities for IC stubs. */ \ | 44 /* Utilities for IC stubs. */ \ |
| 45 ICU(LoadCallbackProperty) \ | 45 ICU(LoadCallbackProperty) \ |
| 46 ICU(StoreCallbackProperty) \ | 46 ICU(StoreCallbackProperty) \ |
| 47 ICU(LoadInterceptorProperty) \ | 47 ICU(LoadInterceptorProperty) \ |
| 48 ICU(StoreInterceptorProperty) | 48 ICU(StoreInterceptorProperty) |
| 49 | 49 |
| 50 // | 50 // |
| 51 // IC is the base class for LoadIC, StoreIC and CallIC. | 51 // IC is the base class for LoadIC, StoreIC and CallIC. |
| 52 // | 52 // |
| 53 class IC { | 53 class IC { |
| 54 public: | 54 public: |
| 55 | 55 |
| 56 // The ids for utility called from the generated code. | 56 // The ids for utility called from the generated code. |
| 57 enum UtilityId { | 57 enum UtilityId { |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 | 326 |
| 327 Object* Store(State state, | 327 Object* Store(State state, |
| 328 Handle<Object> object, | 328 Handle<Object> object, |
| 329 Handle<Object> name, | 329 Handle<Object> name, |
| 330 Handle<Object> value); | 330 Handle<Object> value); |
| 331 | 331 |
| 332 // Code generators for stub routines. Only called once at startup. | 332 // Code generators for stub routines. Only called once at startup. |
| 333 static void GenerateInitialize(MacroAssembler* masm); | 333 static void GenerateInitialize(MacroAssembler* masm); |
| 334 static void GenerateMiss(MacroAssembler* masm); | 334 static void GenerateMiss(MacroAssembler* masm); |
| 335 static void GenerateGeneric(MacroAssembler* masm); | 335 static void GenerateGeneric(MacroAssembler* masm); |
| 336 static void GenerateExtendStorage(MacroAssembler* masm); |
| 336 | 337 |
| 337 private: | 338 private: |
| 338 static void Generate(MacroAssembler* masm, const ExternalReference& f); | 339 static void Generate(MacroAssembler* masm, const ExternalReference& f); |
| 339 | 340 |
| 340 // Update the inline cache. | 341 // Update the inline cache. |
| 341 void UpdateCaches(LookupResult* lookup, | 342 void UpdateCaches(LookupResult* lookup, |
| 342 State state, | 343 State state, |
| 343 Handle<JSObject> receiver, | 344 Handle<JSObject> receiver, |
| 344 Handle<String> name, | 345 Handle<String> name, |
| 345 Handle<Object> value); | 346 Handle<Object> value); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 356 } | 357 } |
| 357 | 358 |
| 358 static void Clear(Address address, Code* target); | 359 static void Clear(Address address, Code* target); |
| 359 friend class IC; | 360 friend class IC; |
| 360 }; | 361 }; |
| 361 | 362 |
| 362 | 363 |
| 363 } } // namespace v8::internal | 364 } } // namespace v8::internal |
| 364 | 365 |
| 365 #endif // V8_IC_H_ | 366 #endif // V8_IC_H_ |
| OLD | NEW |