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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 Handle<Code> CompileLoadField(Handle<Name> name, FieldIndex index); | 466 Handle<Code> CompileLoadField(Handle<Name> name, FieldIndex index); |
467 | 467 |
468 Handle<Code> CompileLoadCallback(Handle<Name> name, | 468 Handle<Code> CompileLoadCallback(Handle<Name> name, |
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 Handle<Code> CompileLoadInterceptor(Handle<Name> name); | 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 |
| 478 // inlined. |
| 479 Handle<Code> CompileLoadInterceptor(LookupIterator* it, Handle<Name> name); |
477 | 480 |
478 Handle<Code> CompileLoadViaGetter(Handle<Name> name, | 481 Handle<Code> CompileLoadViaGetter(Handle<Name> name, |
479 Handle<JSFunction> getter); | 482 Handle<JSFunction> getter); |
480 | 483 |
481 Handle<Code> CompileLoadGlobal(Handle<PropertyCell> cell, Handle<Name> name, | 484 Handle<Code> CompileLoadGlobal(Handle<PropertyCell> cell, Handle<Name> name, |
482 bool is_configurable); | 485 bool is_configurable); |
483 | 486 |
484 // Static interface | 487 // Static interface |
485 static Handle<Code> ComputeLoadNonexistent(Handle<Name> name, | 488 static Handle<Code> ComputeLoadNonexistent(Handle<Name> name, |
486 Handle<HeapType> type); | 489 Handle<HeapType> type); |
(...skipping 29 matching lines...) Expand all Loading... |
516 | 519 |
517 virtual void FrontendFooter(Handle<Name> name, Label* miss); | 520 virtual void FrontendFooter(Handle<Name> name, Label* miss); |
518 | 521 |
519 private: | 522 private: |
520 Handle<Code> CompileLoadNonexistent(Handle<Name> name); | 523 Handle<Code> CompileLoadNonexistent(Handle<Name> name); |
521 void GenerateLoadConstant(Handle<Object> value); | 524 void GenerateLoadConstant(Handle<Object> value); |
522 void GenerateLoadCallback(Register reg, | 525 void GenerateLoadCallback(Register reg, |
523 Handle<ExecutableAccessorInfo> callback); | 526 Handle<ExecutableAccessorInfo> callback); |
524 void GenerateLoadCallback(const CallOptimization& call_optimization, | 527 void GenerateLoadCallback(const CallOptimization& call_optimization, |
525 Handle<Map> receiver_map); | 528 Handle<Map> receiver_map); |
526 void GenerateLoadInterceptor(Register holder_reg, | 529 void GenerateLoadInterceptor(Register holder_reg); |
527 LookupResult* lookup, | 530 void GenerateLoadInterceptorWithFollowup(LookupIterator* it, |
528 Handle<Name> name); | 531 Register holder_reg); |
529 void GenerateLoadPostInterceptor(Register reg, | 532 void GenerateLoadPostInterceptor(LookupIterator* it, Register reg); |
530 Handle<Name> name, | |
531 LookupResult* lookup); | |
532 | 533 |
533 // Generates prototype loading code that uses the objects from the | 534 // Generates prototype loading code that uses the objects from the |
534 // context we were in when this function was called. If the context | 535 // context we were in when this function was called. If the context |
535 // has changed, a jump to miss is performed. This ties the generated | 536 // has changed, a jump to miss is performed. This ties the generated |
536 // code to a particular context and so must not be used in cases | 537 // code to a particular context and so must not be used in cases |
537 // where the generated code is not allowed to have references to | 538 // where the generated code is not allowed to have references to |
538 // objects from a context. | 539 // objects from a context. |
539 static void GenerateDirectLoadGlobalFunctionPrototype(MacroAssembler* masm, | 540 static void GenerateDirectLoadGlobalFunctionPrototype(MacroAssembler* masm, |
540 int index, | 541 int index, |
541 Register prototype, | 542 Register prototype, |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 Handle<JSFunction> constant_function_; | 676 Handle<JSFunction> constant_function_; |
676 bool is_simple_api_call_; | 677 bool is_simple_api_call_; |
677 Handle<FunctionTemplateInfo> expected_receiver_type_; | 678 Handle<FunctionTemplateInfo> expected_receiver_type_; |
678 Handle<CallHandlerInfo> api_call_info_; | 679 Handle<CallHandlerInfo> api_call_info_; |
679 }; | 680 }; |
680 | 681 |
681 | 682 |
682 } } // namespace v8::internal | 683 } } // namespace v8::internal |
683 | 684 |
684 #endif // V8_STUB_CACHE_H_ | 685 #endif // V8_STUB_CACHE_H_ |
OLD | NEW |