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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 if (!stub.is_null()) return stub; | 624 if (!stub.is_null()) return stub; |
625 | 625 |
626 StoreStubCompiler compiler(isolate_, strict_mode); | 626 StoreStubCompiler compiler(isolate_, strict_mode); |
627 Handle<Code> handler = compiler.CompileStoreCallback( | 627 Handle<Code> handler = compiler.CompileStoreCallback( |
628 receiver, holder, name, callback); | 628 receiver, holder, name, callback); |
629 JSObject::UpdateMapCodeCache(receiver, name, handler); | 629 JSObject::UpdateMapCodeCache(receiver, name, handler); |
630 return handler; | 630 return handler; |
631 } | 631 } |
632 | 632 |
633 | 633 |
| 634 Handle<Code> StubCache::ComputeStoreCallback( |
| 635 Handle<Name> name, |
| 636 Handle<JSObject> receiver, |
| 637 Handle<JSObject> holder, |
| 638 const CallOptimization& call_optimization, |
| 639 StrictModeFlag strict_mode) { |
| 640 Handle<Code> stub = FindStoreHandler( |
| 641 name, receiver, Code::STORE_IC, Code::CALLBACKS, strict_mode); |
| 642 if (!stub.is_null()) return stub; |
| 643 |
| 644 StoreStubCompiler compiler(isolate_, strict_mode); |
| 645 Handle<Code> handler = compiler.CompileStoreCallback( |
| 646 receiver, holder, name, call_optimization); |
| 647 JSObject::UpdateMapCodeCache(receiver, name, handler); |
| 648 return handler; |
| 649 } |
| 650 |
| 651 |
634 Handle<Code> StubCache::ComputeStoreViaSetter(Handle<Name> name, | 652 Handle<Code> StubCache::ComputeStoreViaSetter(Handle<Name> name, |
635 Handle<JSObject> receiver, | 653 Handle<JSObject> receiver, |
636 Handle<JSObject> holder, | 654 Handle<JSObject> holder, |
637 Handle<JSFunction> setter, | 655 Handle<JSFunction> setter, |
638 StrictModeFlag strict_mode) { | 656 StrictModeFlag strict_mode) { |
639 Handle<Code> stub = FindStoreHandler( | 657 Handle<Code> stub = FindStoreHandler( |
640 name, receiver, Code::STORE_IC, Code::CALLBACKS, strict_mode); | 658 name, receiver, Code::STORE_IC, Code::CALLBACKS, strict_mode); |
641 if (!stub.is_null()) return stub; | 659 if (!stub.is_null()) return stub; |
642 | 660 |
643 StoreStubCompiler compiler(isolate_, strict_mode); | 661 StoreStubCompiler compiler(isolate_, strict_mode); |
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2243 Handle<FunctionTemplateInfo>( | 2261 Handle<FunctionTemplateInfo>( |
2244 FunctionTemplateInfo::cast(signature->receiver())); | 2262 FunctionTemplateInfo::cast(signature->receiver())); |
2245 } | 2263 } |
2246 } | 2264 } |
2247 | 2265 |
2248 is_simple_api_call_ = true; | 2266 is_simple_api_call_ = true; |
2249 } | 2267 } |
2250 | 2268 |
2251 | 2269 |
2252 } } // namespace v8::internal | 2270 } } // namespace v8::internal |
OLD | NEW |