| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 UNREACHABLE(); | 347 UNREACHABLE(); |
| 348 return Handle<Code>::null(); | 348 return Handle<Code>::null(); |
| 349 } | 349 } |
| 350 | 350 |
| 351 virtual Handle<Code> megamorphic_stub() { | 351 virtual Handle<Code> megamorphic_stub() { |
| 352 return isolate()->builtins()->LoadIC_Megamorphic(); | 352 return isolate()->builtins()->LoadIC_Megamorphic(); |
| 353 } | 353 } |
| 354 | 354 |
| 355 // Update the inline cache and the global stub cache based on the | 355 // Update the inline cache and the global stub cache based on the |
| 356 // lookup result. | 356 // lookup result. |
| 357 virtual void UpdateLoadCaches(LookupResult* lookup, | 357 void UpdateCaches(LookupResult* lookup, |
| 358 State state, | 358 State state, |
| 359 Handle<Object> object, | 359 Handle<Object> object, |
| 360 Handle<String> name); | 360 Handle<String> name); |
| 361 virtual Handle<Code> ComputeLoadMonomorphic(LookupResult* lookup, |
| 362 Handle<JSObject> receiver, |
| 363 Handle<String> name); |
| 364 virtual void UpdateMegamorphicCache(Map* map, String* name, Code* code); |
| 361 | 365 |
| 362 private: | 366 private: |
| 363 // Stub accessors. | 367 // Stub accessors. |
| 364 static Handle<Code> initialize_stub() { | 368 static Handle<Code> initialize_stub() { |
| 365 return Isolate::Current()->builtins()->LoadIC_Initialize(); | 369 return Isolate::Current()->builtins()->LoadIC_Initialize(); |
| 366 } | 370 } |
| 367 virtual Handle<Code> pre_monomorphic_stub() { | 371 virtual Handle<Code> pre_monomorphic_stub() { |
| 368 return isolate()->builtins()->LoadIC_PreMonomorphic(); | 372 return isolate()->builtins()->LoadIC_PreMonomorphic(); |
| 369 } | 373 } |
| 370 | 374 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 Handle<Code> LoadElementStub(Handle<JSObject> receiver); | 422 Handle<Code> LoadElementStub(Handle<JSObject> receiver); |
| 419 | 423 |
| 420 virtual Handle<Code> megamorphic_stub() { | 424 virtual Handle<Code> megamorphic_stub() { |
| 421 return isolate()->builtins()->KeyedLoadIC_Generic(); | 425 return isolate()->builtins()->KeyedLoadIC_Generic(); |
| 422 } | 426 } |
| 423 virtual Handle<Code> generic_stub() const { | 427 virtual Handle<Code> generic_stub() const { |
| 424 return isolate()->builtins()->KeyedLoadIC_Generic(); | 428 return isolate()->builtins()->KeyedLoadIC_Generic(); |
| 425 } | 429 } |
| 426 | 430 |
| 427 // Update the inline cache. | 431 // Update the inline cache. |
| 428 virtual void UpdateLoadCaches(LookupResult* lookup, | 432 virtual Handle<Code> ComputeLoadMonomorphic(LookupResult* lookup, |
| 429 State state, | 433 Handle<JSObject> receiver, |
| 430 Handle<Object> object, | 434 Handle<String> name); |
| 431 Handle<String> name); | 435 virtual void UpdateMegamorphicCache(Map* map, String* name, Code* code) { } |
| 432 | 436 |
| 433 private: | 437 private: |
| 434 // Stub accessors. | 438 // Stub accessors. |
| 435 static Handle<Code> initialize_stub() { | 439 static Handle<Code> initialize_stub() { |
| 436 return Isolate::Current()->builtins()->KeyedLoadIC_Initialize(); | 440 return Isolate::Current()->builtins()->KeyedLoadIC_Initialize(); |
| 437 } | 441 } |
| 438 virtual Handle<Code> pre_monomorphic_stub() { | 442 virtual Handle<Code> pre_monomorphic_stub() { |
| 439 return isolate()->builtins()->KeyedLoadIC_PreMonomorphic(); | 443 return isolate()->builtins()->KeyedLoadIC_PreMonomorphic(); |
| 440 } | 444 } |
| 441 Handle<Code> indexed_interceptor_stub() { | 445 Handle<Code> indexed_interceptor_stub() { |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 | 788 |
| 785 // Helper for BinaryOpIC and CompareIC. | 789 // Helper for BinaryOpIC and CompareIC. |
| 786 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 790 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
| 787 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); | 791 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); |
| 788 | 792 |
| 789 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_Miss); | 793 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_Miss); |
| 790 | 794 |
| 791 } } // namespace v8::internal | 795 } } // namespace v8::internal |
| 792 | 796 |
| 793 #endif // V8_IC_H_ | 797 #endif // V8_IC_H_ |
| OLD | NEW |