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 GenerateGlobalProxy(MacroAssembler* masm, | 514 static void GenerateRuntimeSetProperty(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 } |
535 virtual Handle<Code> global_proxy_stub() { | 541 virtual Handle<Code> global_proxy_stub() { |
536 return isolate()->builtins()->StoreIC_GlobalProxy(); | 542 return isolate()->builtins()->StoreIC_GlobalProxy(); |
537 } | 543 } |
538 virtual Handle<Code> global_proxy_stub_strict() { | 544 virtual Handle<Code> global_proxy_stub_strict() { |
539 return isolate()->builtins()->StoreIC_GlobalProxy_Strict(); | 545 return isolate()->builtins()->StoreIC_GlobalProxy_Strict(); |
540 } | 546 } |
541 | 547 |
542 | 548 |
543 // Update the inline cache and the global stub cache based on the | 549 // Update the inline cache and the global stub cache based on the |
544 // lookup result. | 550 // lookup result. |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 | 817 |
812 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); | 818 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); |
813 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); | 819 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); |
814 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 820 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
815 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); | 821 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |
816 | 822 |
817 | 823 |
818 } } // namespace v8::internal | 824 } } // namespace v8::internal |
819 | 825 |
820 #endif // V8_IC_H_ | 826 #endif // V8_IC_H_ |
OLD | NEW |