OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 namespace v8 { | 34 namespace v8 { |
35 namespace internal { | 35 namespace internal { |
36 | 36 |
37 | 37 |
38 // IC_UTIL_LIST defines all utility functions called from generated | 38 // IC_UTIL_LIST defines all utility functions called from generated |
39 // inline caching code. The argument for the macro, ICU, is the function name. | 39 // inline caching code. The argument for the macro, ICU, is the function name. |
40 #define IC_UTIL_LIST(ICU) \ | 40 #define IC_UTIL_LIST(ICU) \ |
41 ICU(LoadIC_Miss) \ | 41 ICU(LoadIC_Miss) \ |
42 ICU(KeyedLoadIC_Miss) \ | 42 ICU(KeyedLoadIC_Miss) \ |
43 ICU(KeyedLoadIC_MissForceGeneric) \ | |
44 ICU(CallIC_Miss) \ | 43 ICU(CallIC_Miss) \ |
45 ICU(KeyedCallIC_Miss) \ | 44 ICU(KeyedCallIC_Miss) \ |
46 ICU(StoreIC_Miss) \ | 45 ICU(StoreIC_Miss) \ |
47 ICU(StoreIC_ArrayLength) \ | 46 ICU(StoreIC_ArrayLength) \ |
48 ICU(StoreIC_Slow) \ | 47 ICU(StoreIC_Slow) \ |
49 ICU(SharedStoreIC_ExtendStorage) \ | 48 ICU(SharedStoreIC_ExtendStorage) \ |
50 ICU(KeyedStoreIC_Miss) \ | 49 ICU(KeyedStoreIC_Miss) \ |
51 ICU(KeyedStoreIC_Slow) \ | 50 ICU(KeyedStoreIC_Slow) \ |
52 /* Utilities for IC stubs. */ \ | 51 /* Utilities for IC stubs. */ \ |
53 ICU(StoreCallbackProperty) \ | 52 ICU(StoreCallbackProperty) \ |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 bool inobject = true, | 461 bool inobject = true, |
463 Representation representation = | 462 Representation representation = |
464 Representation::Tagged()); | 463 Representation::Tagged()); |
465 | 464 |
466 static void Clear(Isolate* isolate, Address address, Code* target); | 465 static void Clear(Isolate* isolate, Address address, Code* target); |
467 | 466 |
468 friend class IC; | 467 friend class IC; |
469 }; | 468 }; |
470 | 469 |
471 | 470 |
472 enum ICMissMode { | |
473 MISS_FORCE_GENERIC, | |
474 MISS | |
475 }; | |
476 | |
477 | |
478 class KeyedLoadIC: public LoadIC { | 471 class KeyedLoadIC: public LoadIC { |
479 public: | 472 public: |
480 explicit KeyedLoadIC(FrameDepth depth, Isolate* isolate) | 473 explicit KeyedLoadIC(FrameDepth depth, Isolate* isolate) |
481 : LoadIC(depth, isolate) { | 474 : LoadIC(depth, isolate) { |
482 ASSERT(target()->is_keyed_load_stub()); | 475 ASSERT(target()->is_keyed_load_stub()); |
483 } | 476 } |
484 | 477 |
485 MUST_USE_RESULT MaybeObject* LoadForceGeneric(Handle<Object> object, | |
486 Handle<Object> key); | |
487 | |
488 MUST_USE_RESULT MaybeObject* Load(Handle<Object> object, | 478 MUST_USE_RESULT MaybeObject* Load(Handle<Object> object, |
489 Handle<Object> key); | 479 Handle<Object> key); |
490 | 480 |
491 // Code generator routines. | 481 // Code generator routines. |
492 static void GenerateMiss(MacroAssembler* masm, ICMissMode force_generic); | 482 static void GenerateMiss(MacroAssembler* masm); |
493 static void GenerateRuntimeGetProperty(MacroAssembler* masm); | 483 static void GenerateRuntimeGetProperty(MacroAssembler* masm); |
494 static void GenerateInitialize(MacroAssembler* masm) { | 484 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
495 GenerateMiss(masm, MISS); | |
496 } | |
497 static void GeneratePreMonomorphic(MacroAssembler* masm) { | 485 static void GeneratePreMonomorphic(MacroAssembler* masm) { |
498 GenerateMiss(masm, MISS); | 486 GenerateMiss(masm); |
499 } | 487 } |
500 static void GenerateGeneric(MacroAssembler* masm); | 488 static void GenerateGeneric(MacroAssembler* masm); |
501 static void GenerateString(MacroAssembler* masm); | 489 static void GenerateString(MacroAssembler* masm); |
502 static void GenerateIndexedInterceptor(MacroAssembler* masm); | 490 static void GenerateIndexedInterceptor(MacroAssembler* masm); |
503 static void GenerateNonStrictArguments(MacroAssembler* masm); | 491 static void GenerateNonStrictArguments(MacroAssembler* masm); |
504 | 492 |
505 // Bit mask to be tested against bit field for the cases when | 493 // Bit mask to be tested against bit field for the cases when |
506 // generic stub should go into slow case. | 494 // generic stub should go into slow case. |
507 // Access check is necessary explicitly since generic stub does not perform | 495 // Access check is necessary explicitly since generic stub does not perform |
508 // map checks. | 496 // map checks. |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedCallIC_MissFromStubFailure); | 895 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedCallIC_MissFromStubFailure); |
908 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); | 896 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); |
909 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); | 897 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); |
910 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 898 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
911 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); | 899 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |
912 | 900 |
913 | 901 |
914 } } // namespace v8::internal | 902 } } // namespace v8::internal |
915 | 903 |
916 #endif // V8_IC_H_ | 904 #endif // V8_IC_H_ |
OLD | NEW |