| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 class NamedLoadHandlerCompiler : public PropertyHandlerCompiler { | 456 class NamedLoadHandlerCompiler : public PropertyHandlerCompiler { |
| 457 public: | 457 public: |
| 458 NamedLoadHandlerCompiler(Isolate* isolate, Handle<HeapType> type, | 458 NamedLoadHandlerCompiler(Isolate* isolate, Handle<HeapType> type, |
| 459 Handle<JSObject> holder, | 459 Handle<JSObject> holder, |
| 460 CacheHolderFlag cache_holder) | 460 CacheHolderFlag cache_holder) |
| 461 : PropertyHandlerCompiler(isolate, Code::LOAD_IC, type, holder, | 461 : PropertyHandlerCompiler(isolate, Code::LOAD_IC, type, holder, |
| 462 cache_holder) {} | 462 cache_holder) {} |
| 463 | 463 |
| 464 virtual ~NamedLoadHandlerCompiler() {} | 464 virtual ~NamedLoadHandlerCompiler() {} |
| 465 | 465 |
| 466 Handle<Code> CompileLoadField(Handle<Name> name, FieldIndex index, | 466 Handle<Code> CompileLoadField(Handle<Name> name, FieldIndex index); |
| 467 Representation representation); | |
| 468 | 467 |
| 469 Handle<Code> CompileLoadCallback(Handle<Name> name, | 468 Handle<Code> CompileLoadCallback(Handle<Name> name, |
| 470 Handle<ExecutableAccessorInfo> callback); | 469 Handle<ExecutableAccessorInfo> callback); |
| 471 | 470 |
| 472 Handle<Code> CompileLoadCallback(Handle<Name> name, | 471 Handle<Code> CompileLoadCallback(Handle<Name> name, |
| 473 const CallOptimization& call_optimization); | 472 const CallOptimization& call_optimization); |
| 474 | 473 |
| 475 Handle<Code> CompileLoadConstant(Handle<Name> name, Handle<Object> value); | 474 Handle<Code> CompileLoadConstant(Handle<Name> name, int constant_index); |
| 476 | 475 |
| 477 Handle<Code> CompileLoadInterceptor(Handle<Name> name); | 476 Handle<Code> CompileLoadInterceptor(Handle<Name> name); |
| 478 | 477 |
| 479 Handle<Code> CompileLoadViaGetter(Handle<Name> name, | 478 Handle<Code> CompileLoadViaGetter(Handle<Name> name, |
| 480 Handle<JSFunction> getter); | 479 Handle<JSFunction> getter); |
| 481 | 480 |
| 482 Handle<Code> CompileLoadGlobal(Handle<PropertyCell> cell, Handle<Name> name, | 481 Handle<Code> CompileLoadGlobal(Handle<PropertyCell> cell, Handle<Name> name, |
| 483 bool is_configurable); | 482 bool is_configurable); |
| 484 | 483 |
| 485 // Static interface | 484 // Static interface |
| (...skipping 26 matching lines...) Expand all Loading... |
| 512 static const int kInterceptorArgsLength = 4; | 511 static const int kInterceptorArgsLength = 4; |
| 513 | 512 |
| 514 protected: | 513 protected: |
| 515 virtual Register FrontendHeader(Register object_reg, Handle<Name> name, | 514 virtual Register FrontendHeader(Register object_reg, Handle<Name> name, |
| 516 Label* miss); | 515 Label* miss); |
| 517 | 516 |
| 518 virtual void FrontendFooter(Handle<Name> name, Label* miss); | 517 virtual void FrontendFooter(Handle<Name> name, Label* miss); |
| 519 | 518 |
| 520 private: | 519 private: |
| 521 Handle<Code> CompileLoadNonexistent(Handle<Name> name); | 520 Handle<Code> CompileLoadNonexistent(Handle<Name> name); |
| 522 void GenerateLoadField(Register reg, | |
| 523 FieldIndex field, | |
| 524 Representation representation); | |
| 525 void GenerateLoadConstant(Handle<Object> value); | 521 void GenerateLoadConstant(Handle<Object> value); |
| 526 void GenerateLoadCallback(Register reg, | 522 void GenerateLoadCallback(Register reg, |
| 527 Handle<ExecutableAccessorInfo> callback); | 523 Handle<ExecutableAccessorInfo> callback); |
| 528 void GenerateLoadCallback(const CallOptimization& call_optimization, | 524 void GenerateLoadCallback(const CallOptimization& call_optimization, |
| 529 Handle<Map> receiver_map); | 525 Handle<Map> receiver_map); |
| 530 void GenerateLoadInterceptor(Register holder_reg, | 526 void GenerateLoadInterceptor(Register holder_reg, |
| 531 LookupResult* lookup, | 527 LookupResult* lookup, |
| 532 Handle<Name> name); | 528 Handle<Name> name); |
| 533 void GenerateLoadPostInterceptor(Register reg, | 529 void GenerateLoadPostInterceptor(Register reg, |
| 534 Handle<Name> name, | 530 Handle<Name> name, |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 Handle<JSFunction> constant_function_; | 677 Handle<JSFunction> constant_function_; |
| 682 bool is_simple_api_call_; | 678 bool is_simple_api_call_; |
| 683 Handle<FunctionTemplateInfo> expected_receiver_type_; | 679 Handle<FunctionTemplateInfo> expected_receiver_type_; |
| 684 Handle<CallHandlerInfo> api_call_info_; | 680 Handle<CallHandlerInfo> api_call_info_; |
| 685 }; | 681 }; |
| 686 | 682 |
| 687 | 683 |
| 688 } } // namespace v8::internal | 684 } } // namespace v8::internal |
| 689 | 685 |
| 690 #endif // V8_STUB_CACHE_H_ | 686 #endif // V8_STUB_CACHE_H_ |
| OLD | NEW |