| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 public: | 273 public: |
| 274 KeyedLoadIC() : IC(NO_EXTRA_FRAME) { ASSERT(target()->is_keyed_load_stub()); } | 274 KeyedLoadIC() : IC(NO_EXTRA_FRAME) { ASSERT(target()->is_keyed_load_stub()); } |
| 275 | 275 |
| 276 Object* Load(State state, Handle<Object> object, Handle<Object> key); | 276 Object* Load(State state, Handle<Object> object, Handle<Object> key); |
| 277 | 277 |
| 278 // Code generator routines. | 278 // Code generator routines. |
| 279 static void GenerateMiss(MacroAssembler* masm); | 279 static void GenerateMiss(MacroAssembler* masm); |
| 280 static void GenerateInitialize(MacroAssembler* masm); | 280 static void GenerateInitialize(MacroAssembler* masm); |
| 281 static void GeneratePreMonomorphic(MacroAssembler* masm); | 281 static void GeneratePreMonomorphic(MacroAssembler* masm); |
| 282 static void GenerateGeneric(MacroAssembler* masm); | 282 static void GenerateGeneric(MacroAssembler* masm); |
| 283 static void GenerateString(MacroAssembler* masm); |
| 283 | 284 |
| 284 // Generators for external array types. See objects.h. | 285 // Generators for external array types. See objects.h. |
| 285 // These are similar to the generic IC; they optimize the case of | 286 // These are similar to the generic IC; they optimize the case of |
| 286 // operating upon external array types but fall back to the runtime | 287 // operating upon external array types but fall back to the runtime |
| 287 // for all other types. | 288 // for all other types. |
| 288 static void GenerateExternalArray(MacroAssembler* masm, | 289 static void GenerateExternalArray(MacroAssembler* masm, |
| 289 ExternalArrayType array_type); | 290 ExternalArrayType array_type); |
| 290 | 291 |
| 291 // Clear the use of the inlined version. | 292 // Clear the use of the inlined version. |
| 292 static void ClearInlinedVersion(Address address); | 293 static void ClearInlinedVersion(Address address); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 306 } | 307 } |
| 307 static Code* megamorphic_stub() { | 308 static Code* megamorphic_stub() { |
| 308 return Builtins::builtin(Builtins::KeyedLoadIC_Generic); | 309 return Builtins::builtin(Builtins::KeyedLoadIC_Generic); |
| 309 } | 310 } |
| 310 static Code* generic_stub() { | 311 static Code* generic_stub() { |
| 311 return Builtins::builtin(Builtins::KeyedLoadIC_Generic); | 312 return Builtins::builtin(Builtins::KeyedLoadIC_Generic); |
| 312 } | 313 } |
| 313 static Code* pre_monomorphic_stub() { | 314 static Code* pre_monomorphic_stub() { |
| 314 return Builtins::builtin(Builtins::KeyedLoadIC_PreMonomorphic); | 315 return Builtins::builtin(Builtins::KeyedLoadIC_PreMonomorphic); |
| 315 } | 316 } |
| 317 static Code* string_stub() { |
| 318 return Builtins::builtin(Builtins::KeyedLoadIC_String); |
| 319 } |
| 316 static Code* external_array_stub(JSObject::ElementsKind elements_kind); | 320 static Code* external_array_stub(JSObject::ElementsKind elements_kind); |
| 317 | 321 |
| 318 static void Clear(Address address, Code* target); | 322 static void Clear(Address address, Code* target); |
| 319 | 323 |
| 320 // Support for patching the map that is checked in an inlined | 324 // Support for patching the map that is checked in an inlined |
| 321 // version of keyed load. | 325 // version of keyed load. |
| 322 static bool PatchInlinedLoad(Address address, Object* map); | 326 static bool PatchInlinedLoad(Address address, Object* map); |
| 323 | 327 |
| 324 friend class IC; | 328 friend class IC; |
| 325 }; | 329 }; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 // The map is the new map that the inlined code should check against. | 427 // The map is the new map that the inlined code should check against. |
| 424 static bool PatchInlinedStore(Address address, Object* map); | 428 static bool PatchInlinedStore(Address address, Object* map); |
| 425 | 429 |
| 426 friend class IC; | 430 friend class IC; |
| 427 }; | 431 }; |
| 428 | 432 |
| 429 | 433 |
| 430 } } // namespace v8::internal | 434 } } // namespace v8::internal |
| 431 | 435 |
| 432 #endif // V8_IC_H_ | 436 #endif // V8_IC_H_ |
| OLD | NEW |