OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_STUB_CACHE_H_ | 5 #ifndef V8_STUB_CACHE_H_ |
6 #define V8_STUB_CACHE_H_ | 6 #define V8_STUB_CACHE_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 Handle<ExecutableAccessorInfo> callback); | 469 Handle<ExecutableAccessorInfo> callback); |
470 | 470 |
471 Handle<Code> CompileLoadCallback(Handle<Name> name, | 471 Handle<Code> CompileLoadCallback(Handle<Name> name, |
472 const CallOptimization& call_optimization); | 472 const CallOptimization& call_optimization); |
473 | 473 |
474 Handle<Code> CompileLoadConstant(Handle<Name> name, int constant_index); | 474 Handle<Code> CompileLoadConstant(Handle<Name> name, int constant_index); |
475 | 475 |
476 // The LookupIterator is used to perform a lookup behind the interceptor. If | 476 // The LookupIterator is used to perform a lookup behind the interceptor. If |
477 // the iterator points to a LookupIterator::PROPERTY, its access will be | 477 // the iterator points to a LookupIterator::PROPERTY, its access will be |
478 // inlined. | 478 // inlined. |
479 Handle<Code> CompileLoadInterceptor(LookupIterator* it, Handle<Name> name); | 479 Handle<Code> CompileLoadInterceptor(LookupIterator* it); |
480 | 480 |
481 Handle<Code> CompileLoadViaGetter(Handle<Name> name, | 481 Handle<Code> CompileLoadViaGetter(Handle<Name> name, |
482 Handle<JSFunction> getter); | 482 Handle<JSFunction> getter); |
483 | 483 |
484 Handle<Code> CompileLoadGlobal(Handle<PropertyCell> cell, Handle<Name> name, | 484 Handle<Code> CompileLoadGlobal(Handle<PropertyCell> cell, Handle<Name> name, |
485 bool is_configurable); | 485 bool is_configurable); |
486 | 486 |
487 // Static interface | 487 // Static interface |
488 static Handle<Code> ComputeLoadNonexistent(Handle<Name> name, | 488 static Handle<Code> ComputeLoadNonexistent(Handle<Name> name, |
489 Handle<HeapType> type); | 489 Handle<HeapType> type); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 public: | 551 public: |
552 explicit NamedStoreHandlerCompiler(Isolate* isolate, Handle<HeapType> type, | 552 explicit NamedStoreHandlerCompiler(Isolate* isolate, Handle<HeapType> type, |
553 Handle<JSObject> holder) | 553 Handle<JSObject> holder) |
554 : PropertyHandlerCompiler(isolate, Code::STORE_IC, type, holder, | 554 : PropertyHandlerCompiler(isolate, Code::STORE_IC, type, holder, |
555 kCacheOnReceiver) {} | 555 kCacheOnReceiver) {} |
556 | 556 |
557 virtual ~NamedStoreHandlerCompiler() {} | 557 virtual ~NamedStoreHandlerCompiler() {} |
558 | 558 |
559 Handle<Code> CompileStoreTransition(Handle<Map> transition, | 559 Handle<Code> CompileStoreTransition(Handle<Map> transition, |
560 Handle<Name> name); | 560 Handle<Name> name); |
561 Handle<Code> CompileStoreField(LookupResult* lookup, Handle<Name> name); | 561 Handle<Code> CompileStoreField(LookupIterator* it); |
562 Handle<Code> CompileStoreCallback(Handle<JSObject> object, Handle<Name> name, | 562 Handle<Code> CompileStoreCallback(Handle<JSObject> object, Handle<Name> name, |
563 Handle<ExecutableAccessorInfo> callback); | 563 Handle<ExecutableAccessorInfo> callback); |
564 Handle<Code> CompileStoreCallback(Handle<JSObject> object, Handle<Name> name, | 564 Handle<Code> CompileStoreCallback(Handle<JSObject> object, Handle<Name> name, |
565 const CallOptimization& call_optimization); | 565 const CallOptimization& call_optimization); |
566 Handle<Code> CompileStoreViaSetter(Handle<JSObject> object, Handle<Name> name, | 566 Handle<Code> CompileStoreViaSetter(Handle<JSObject> object, Handle<Name> name, |
567 Handle<JSFunction> setter); | 567 Handle<JSFunction> setter); |
568 Handle<Code> CompileStoreInterceptor(Handle<Name> name); | 568 Handle<Code> CompileStoreInterceptor(Handle<Name> name); |
569 | 569 |
570 static void GenerateStoreViaSetter(MacroAssembler* masm, | 570 static void GenerateStoreViaSetter(MacroAssembler* masm, |
571 Handle<HeapType> type, Register receiver, | 571 Handle<HeapType> type, Register receiver, |
(...skipping 11 matching lines...) Expand all Loading... |
583 virtual void FrontendFooter(Handle<Name> name, Label* miss); | 583 virtual void FrontendFooter(Handle<Name> name, Label* miss); |
584 void GenerateRestoreName(Label* label, Handle<Name> name); | 584 void GenerateRestoreName(Label* label, Handle<Name> name); |
585 | 585 |
586 private: | 586 private: |
587 void GenerateStoreTransition(Handle<Map> transition, Handle<Name> name, | 587 void GenerateStoreTransition(Handle<Map> transition, Handle<Name> name, |
588 Register receiver_reg, Register name_reg, | 588 Register receiver_reg, Register name_reg, |
589 Register value_reg, Register scratch1, | 589 Register value_reg, Register scratch1, |
590 Register scratch2, Register scratch3, | 590 Register scratch2, Register scratch3, |
591 Label* miss_label, Label* slow); | 591 Label* miss_label, Label* slow); |
592 | 592 |
593 void GenerateStoreField(LookupResult* lookup, Register value_reg, | 593 void GenerateStoreField(LookupIterator* lookup, Register value_reg, |
594 Label* miss_label); | 594 Label* miss_label); |
595 | 595 |
596 static Builtins::Name SlowBuiltin(Code::Kind kind) { | 596 static Builtins::Name SlowBuiltin(Code::Kind kind) { |
597 switch (kind) { | 597 switch (kind) { |
598 case Code::STORE_IC: return Builtins::kStoreIC_Slow; | 598 case Code::STORE_IC: return Builtins::kStoreIC_Slow; |
599 case Code::KEYED_STORE_IC: return Builtins::kKeyedStoreIC_Slow; | 599 case Code::KEYED_STORE_IC: return Builtins::kKeyedStoreIC_Slow; |
600 default: UNREACHABLE(); | 600 default: UNREACHABLE(); |
601 } | 601 } |
602 return Builtins::kStoreIC_Slow; | 602 return Builtins::kStoreIC_Slow; |
603 } | 603 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 Handle<JSFunction> constant_function_; | 674 Handle<JSFunction> constant_function_; |
675 bool is_simple_api_call_; | 675 bool is_simple_api_call_; |
676 Handle<FunctionTemplateInfo> expected_receiver_type_; | 676 Handle<FunctionTemplateInfo> expected_receiver_type_; |
677 Handle<CallHandlerInfo> api_call_info_; | 677 Handle<CallHandlerInfo> api_call_info_; |
678 }; | 678 }; |
679 | 679 |
680 | 680 |
681 } } // namespace v8::internal | 681 } } // namespace v8::internal |
682 | 682 |
683 #endif // V8_STUB_CACHE_H_ | 683 #endif // V8_STUB_CACHE_H_ |
OLD | NEW |