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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 Handle<Object> object, | 349 Handle<Object> object, |
350 Handle<Object> name, | 350 Handle<Object> name, |
351 Handle<Object> value); | 351 Handle<Object> value); |
352 | 352 |
353 // Code generators for stub routines. Only called once at startup. | 353 // Code generators for stub routines. Only called once at startup. |
354 static void GenerateInitialize(MacroAssembler* masm); | 354 static void GenerateInitialize(MacroAssembler* masm); |
355 static void GenerateMiss(MacroAssembler* masm); | 355 static void GenerateMiss(MacroAssembler* masm); |
356 static void GenerateGeneric(MacroAssembler* masm); | 356 static void GenerateGeneric(MacroAssembler* masm); |
357 static void GenerateExtendStorage(MacroAssembler* masm); | 357 static void GenerateExtendStorage(MacroAssembler* masm); |
358 | 358 |
| 359 // Clear the inlined version so the IC is always hit. |
| 360 static void ClearInlinedVersion(Address address); |
| 361 |
| 362 // Restore the inlined version so the fast case can get hit. |
| 363 static void RestoreInlinedVersion(Address address); |
| 364 |
359 private: | 365 private: |
360 static void Generate(MacroAssembler* masm, const ExternalReference& f); | 366 static void Generate(MacroAssembler* masm, const ExternalReference& f); |
361 | 367 |
362 // Update the inline cache. | 368 // Update the inline cache. |
363 void UpdateCaches(LookupResult* lookup, | 369 void UpdateCaches(LookupResult* lookup, |
364 State state, | 370 State state, |
365 Handle<JSObject> receiver, | 371 Handle<JSObject> receiver, |
366 Handle<String> name, | 372 Handle<String> name, |
367 Handle<Object> value); | 373 Handle<Object> value); |
368 | 374 |
369 // Stub accessors. | 375 // Stub accessors. |
370 static Code* initialize_stub() { | 376 static Code* initialize_stub() { |
371 return Builtins::builtin(Builtins::KeyedStoreIC_Initialize); | 377 return Builtins::builtin(Builtins::KeyedStoreIC_Initialize); |
372 } | 378 } |
373 static Code* megamorphic_stub() { | 379 static Code* megamorphic_stub() { |
374 return Builtins::builtin(Builtins::KeyedStoreIC_Generic); | 380 return Builtins::builtin(Builtins::KeyedStoreIC_Generic); |
375 } | 381 } |
376 static Code* generic_stub() { | 382 static Code* generic_stub() { |
377 return Builtins::builtin(Builtins::KeyedStoreIC_Generic); | 383 return Builtins::builtin(Builtins::KeyedStoreIC_Generic); |
378 } | 384 } |
379 | 385 |
380 static void Clear(Address address, Code* target); | 386 static void Clear(Address address, Code* target); |
| 387 |
| 388 // Support for patching the map that is checked in an inlined |
| 389 // version of keyed store. |
| 390 static bool PatchInlinedStore(Address address, Object* map); |
| 391 |
381 friend class IC; | 392 friend class IC; |
382 }; | 393 }; |
383 | 394 |
384 | 395 |
385 } } // namespace v8::internal | 396 } } // namespace v8::internal |
386 | 397 |
387 #endif // V8_IC_H_ | 398 #endif // V8_IC_H_ |
OLD | NEW |