| 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 ASSERT(target()->is_store_stub() || target()->is_keyed_store_stub()); | 504 ASSERT(target()->is_store_stub() || target()->is_keyed_store_stub()); |
| 505 } | 505 } |
| 506 | 506 |
| 507 // Code generators for stub routines. Only called once at startup. | 507 // Code generators for stub routines. Only called once at startup. |
| 508 static void GenerateSlow(MacroAssembler* masm); | 508 static void GenerateSlow(MacroAssembler* masm); |
| 509 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } | 509 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
| 510 static void GenerateMiss(MacroAssembler* masm); | 510 static void GenerateMiss(MacroAssembler* masm); |
| 511 static void GenerateMegamorphic(MacroAssembler* masm, | 511 static void GenerateMegamorphic(MacroAssembler* masm, |
| 512 StrictModeFlag strict_mode); | 512 StrictModeFlag strict_mode); |
| 513 static void GenerateNormal(MacroAssembler* masm); | 513 static void GenerateNormal(MacroAssembler* masm); |
| 514 static void GenerateRuntimeSetProperty(MacroAssembler* masm, | 514 static void GenerateGlobalProxy(MacroAssembler* masm, |
| 515 StrictModeFlag strict_mode); | 515 StrictModeFlag strict_mode); |
| 516 | 516 |
| 517 MUST_USE_RESULT MaybeObject* Store( | 517 MUST_USE_RESULT MaybeObject* Store( |
| 518 State state, | 518 State state, |
| 519 StrictModeFlag strict_mode, | 519 StrictModeFlag strict_mode, |
| 520 Handle<Object> object, | 520 Handle<Object> object, |
| 521 Handle<String> name, | 521 Handle<String> name, |
| 522 Handle<Object> value, | 522 Handle<Object> value, |
| 523 JSReceiver::StoreFromKeyed store_mode = | 523 JSReceiver::StoreFromKeyed store_mode = |
| 524 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED); | 524 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED); |
| 525 | 525 |
| 526 protected: | 526 protected: |
| 527 virtual Code::Kind kind() const { return Code::STORE_IC; } | 527 virtual Code::Kind kind() const { return Code::STORE_IC; } |
| 528 virtual Handle<Code> megamorphic_stub() { | 528 virtual Handle<Code> megamorphic_stub() { |
| 529 return isolate()->builtins()->StoreIC_Megamorphic(); | 529 return isolate()->builtins()->StoreIC_Megamorphic(); |
| 530 } | 530 } |
| 531 // Stub accessors. | 531 // Stub accessors. |
| 532 virtual Handle<Code> megamorphic_stub_strict() { | 532 virtual Handle<Code> megamorphic_stub_strict() { |
| 533 return isolate()->builtins()->StoreIC_Megamorphic_Strict(); | 533 return isolate()->builtins()->StoreIC_Megamorphic_Strict(); |
| 534 } | 534 } |
| 535 virtual Handle<Code> generic_stub() const { | |
| 536 return isolate()->builtins()->StoreIC_Generic(); | |
| 537 } | |
| 538 virtual Handle<Code> generic_stub_strict() const { | |
| 539 return isolate()->builtins()->StoreIC_Generic_Strict(); | |
| 540 } | |
| 541 virtual Handle<Code> global_proxy_stub() { | 535 virtual Handle<Code> global_proxy_stub() { |
| 542 return isolate()->builtins()->StoreIC_GlobalProxy(); | 536 return isolate()->builtins()->StoreIC_GlobalProxy(); |
| 543 } | 537 } |
| 544 virtual Handle<Code> global_proxy_stub_strict() { | 538 virtual Handle<Code> global_proxy_stub_strict() { |
| 545 return isolate()->builtins()->StoreIC_GlobalProxy_Strict(); | 539 return isolate()->builtins()->StoreIC_GlobalProxy_Strict(); |
| 546 } | 540 } |
| 547 | 541 |
| 548 | 542 |
| 549 // Update the inline cache and the global stub cache based on the | 543 // Update the inline cache and the global stub cache based on the |
| 550 // lookup result. | 544 // lookup result. |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 | 811 |
| 818 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); | 812 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); |
| 819 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); | 813 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); |
| 820 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 814 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
| 821 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); | 815 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |
| 822 | 816 |
| 823 | 817 |
| 824 } } // namespace v8::internal | 818 } } // namespace v8::internal |
| 825 | 819 |
| 826 #endif // V8_IC_H_ | 820 #endif // V8_IC_H_ |
| OLD | NEW |