| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 173 |
| 174 MUST_USE_RESULT MaybeObject* ComputeKeyedStoreField( | 174 MUST_USE_RESULT MaybeObject* ComputeKeyedStoreField( |
| 175 String* name, | 175 String* name, |
| 176 JSObject* receiver, | 176 JSObject* receiver, |
| 177 int field_index, | 177 int field_index, |
| 178 Map* transition = NULL); | 178 Map* transition = NULL); |
| 179 | 179 |
| 180 MUST_USE_RESULT MaybeObject* ComputeKeyedStoreSpecialized( | 180 MUST_USE_RESULT MaybeObject* ComputeKeyedStoreSpecialized( |
| 181 JSObject* receiver); | 181 JSObject* receiver); |
| 182 | 182 |
| 183 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadOrStoreExternalArray( |
| 184 JSObject* receiver, |
| 185 bool is_store); |
| 186 |
| 183 // --- | 187 // --- |
| 184 | 188 |
| 185 MUST_USE_RESULT MaybeObject* ComputeCallField(int argc, | 189 MUST_USE_RESULT MaybeObject* ComputeCallField(int argc, |
| 186 InLoopFlag in_loop, | 190 InLoopFlag in_loop, |
| 187 Code::Kind, | 191 Code::Kind, |
| 188 String* name, | 192 String* name, |
| 189 Object* object, | 193 Object* object, |
| 190 JSObject* holder, | 194 JSObject* holder, |
| 191 int index); | 195 int index); |
| 192 | 196 |
| 193 MUST_USE_RESULT MaybeObject* ComputeCallConstant(int argc, | 197 MUST_USE_RESULT MaybeObject* ComputeCallConstant( |
| 194 InLoopFlag in_loop, | 198 int argc, |
| 195 Code::Kind, | 199 InLoopFlag in_loop, |
| 196 String* name, | 200 Code::Kind, |
| 197 Object* object, | 201 Code::ExtraICState extra_ic_state, |
| 198 JSObject* holder, | 202 String* name, |
| 199 JSFunction* function); | 203 Object* object, |
| 204 JSObject* holder, |
| 205 JSFunction* function); |
| 200 | 206 |
| 201 MUST_USE_RESULT MaybeObject* ComputeCallNormal(int argc, | 207 MUST_USE_RESULT MaybeObject* ComputeCallNormal(int argc, |
| 202 InLoopFlag in_loop, | 208 InLoopFlag in_loop, |
| 203 Code::Kind, | 209 Code::Kind, |
| 204 String* name, | 210 String* name, |
| 205 JSObject* receiver); | 211 JSObject* receiver); |
| 206 | 212 |
| 207 MUST_USE_RESULT MaybeObject* ComputeCallInterceptor(int argc, | 213 MUST_USE_RESULT MaybeObject* ComputeCallInterceptor(int argc, |
| 208 Code::Kind, | 214 Code::Kind, |
| 209 String* name, | 215 String* name, |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 | 430 |
| 425 static void GenerateLoadArrayLength(MacroAssembler* masm, | 431 static void GenerateLoadArrayLength(MacroAssembler* masm, |
| 426 Register receiver, | 432 Register receiver, |
| 427 Register scratch, | 433 Register scratch, |
| 428 Label* miss_label); | 434 Label* miss_label); |
| 429 | 435 |
| 430 static void GenerateLoadStringLength(MacroAssembler* masm, | 436 static void GenerateLoadStringLength(MacroAssembler* masm, |
| 431 Register receiver, | 437 Register receiver, |
| 432 Register scratch1, | 438 Register scratch1, |
| 433 Register scratch2, | 439 Register scratch2, |
| 434 Label* miss_label); | 440 Label* miss_label, |
| 441 bool support_wrappers); |
| 435 | 442 |
| 436 static void GenerateLoadFunctionPrototype(MacroAssembler* masm, | 443 static void GenerateLoadFunctionPrototype(MacroAssembler* masm, |
| 437 Register receiver, | 444 Register receiver, |
| 438 Register scratch1, | 445 Register scratch1, |
| 439 Register scratch2, | 446 Register scratch2, |
| 440 Label* miss_label); | 447 Label* miss_label); |
| 441 | 448 |
| 442 static void GenerateStoreField(MacroAssembler* masm, | 449 static void GenerateStoreField(MacroAssembler* masm, |
| 443 JSObject* object, | 450 JSObject* object, |
| 444 int index, | 451 int index, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 void GenerateLoadField(JSObject* object, | 505 void GenerateLoadField(JSObject* object, |
| 499 JSObject* holder, | 506 JSObject* holder, |
| 500 Register receiver, | 507 Register receiver, |
| 501 Register scratch1, | 508 Register scratch1, |
| 502 Register scratch2, | 509 Register scratch2, |
| 503 Register scratch3, | 510 Register scratch3, |
| 504 int index, | 511 int index, |
| 505 String* name, | 512 String* name, |
| 506 Label* miss); | 513 Label* miss); |
| 507 | 514 |
| 508 bool GenerateLoadCallback(JSObject* object, | 515 MaybeObject* GenerateLoadCallback(JSObject* object, |
| 509 JSObject* holder, | 516 JSObject* holder, |
| 510 Register receiver, | 517 Register receiver, |
| 511 Register name_reg, | 518 Register name_reg, |
| 512 Register scratch1, | 519 Register scratch1, |
| 513 Register scratch2, | 520 Register scratch2, |
| 514 Register scratch3, | 521 Register scratch3, |
| 515 AccessorInfo* callback, | 522 AccessorInfo* callback, |
| 516 String* name, | 523 String* name, |
| 517 Label* miss, | 524 Label* miss); |
| 518 Failure** failure); | |
| 519 | 525 |
| 520 void GenerateLoadConstant(JSObject* object, | 526 void GenerateLoadConstant(JSObject* object, |
| 521 JSObject* holder, | 527 JSObject* holder, |
| 522 Register receiver, | 528 Register receiver, |
| 523 Register scratch1, | 529 Register scratch1, |
| 524 Register scratch2, | 530 Register scratch2, |
| 525 Register scratch3, | 531 Register scratch3, |
| 526 Object* value, | 532 Object* value, |
| 527 String* name, | 533 String* name, |
| 528 Label* miss); | 534 Label* miss); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 V(StringFromCharCode) \ | 669 V(StringFromCharCode) \ |
| 664 V(MathFloor) \ | 670 V(MathFloor) \ |
| 665 V(MathAbs) | 671 V(MathAbs) |
| 666 | 672 |
| 667 | 673 |
| 668 class CallStubCompiler: public StubCompiler { | 674 class CallStubCompiler: public StubCompiler { |
| 669 public: | 675 public: |
| 670 CallStubCompiler(int argc, | 676 CallStubCompiler(int argc, |
| 671 InLoopFlag in_loop, | 677 InLoopFlag in_loop, |
| 672 Code::Kind kind, | 678 Code::Kind kind, |
| 679 Code::ExtraICState extra_ic_state, |
| 673 InlineCacheHolderFlag cache_holder); | 680 InlineCacheHolderFlag cache_holder); |
| 674 | 681 |
| 675 MUST_USE_RESULT MaybeObject* CompileCallField(JSObject* object, | 682 MUST_USE_RESULT MaybeObject* CompileCallField(JSObject* object, |
| 676 JSObject* holder, | 683 JSObject* holder, |
| 677 int index, | 684 int index, |
| 678 String* name); | 685 String* name); |
| 679 MUST_USE_RESULT MaybeObject* CompileCallConstant(Object* object, | 686 MUST_USE_RESULT MaybeObject* CompileCallConstant(Object* object, |
| 680 JSObject* holder, | 687 JSObject* holder, |
| 681 JSFunction* function, | 688 JSFunction* function, |
| 682 String* name, | 689 String* name, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 708 JSObject* holder, \ | 715 JSObject* holder, \ |
| 709 JSGlobalPropertyCell* cell, \ | 716 JSGlobalPropertyCell* cell, \ |
| 710 JSFunction* function, \ | 717 JSFunction* function, \ |
| 711 String* fname); | 718 String* fname); |
| 712 CUSTOM_CALL_IC_GENERATORS(DECLARE_CALL_GENERATOR) | 719 CUSTOM_CALL_IC_GENERATORS(DECLARE_CALL_GENERATOR) |
| 713 #undef DECLARE_CALL_GENERATOR | 720 #undef DECLARE_CALL_GENERATOR |
| 714 | 721 |
| 715 const ParameterCount arguments_; | 722 const ParameterCount arguments_; |
| 716 const InLoopFlag in_loop_; | 723 const InLoopFlag in_loop_; |
| 717 const Code::Kind kind_; | 724 const Code::Kind kind_; |
| 725 const Code::ExtraICState extra_ic_state_; |
| 718 const InlineCacheHolderFlag cache_holder_; | 726 const InlineCacheHolderFlag cache_holder_; |
| 719 | 727 |
| 720 const ParameterCount& arguments() { return arguments_; } | 728 const ParameterCount& arguments() { return arguments_; } |
| 721 | 729 |
| 722 MUST_USE_RESULT MaybeObject* GetCode(PropertyType type, String* name); | 730 MUST_USE_RESULT MaybeObject* GetCode(PropertyType type, String* name); |
| 723 | 731 |
| 724 // Convenience function. Calls GetCode above passing | 732 // Convenience function. Calls GetCode above passing |
| 725 // CONSTANT_FUNCTION type and the name of the given function. | 733 // CONSTANT_FUNCTION type and the name of the given function. |
| 726 MUST_USE_RESULT MaybeObject* GetCode(JSFunction* function); | 734 MUST_USE_RESULT MaybeObject* GetCode(JSFunction* function); |
| 727 | 735 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 // Determines whether the given function can be called using the | 804 // Determines whether the given function can be called using the |
| 797 // fast api call builtin. | 805 // fast api call builtin. |
| 798 void AnalyzePossibleApiFunction(JSFunction* function); | 806 void AnalyzePossibleApiFunction(JSFunction* function); |
| 799 | 807 |
| 800 JSFunction* constant_function_; | 808 JSFunction* constant_function_; |
| 801 bool is_simple_api_call_; | 809 bool is_simple_api_call_; |
| 802 FunctionTemplateInfo* expected_receiver_type_; | 810 FunctionTemplateInfo* expected_receiver_type_; |
| 803 CallHandlerInfo* api_call_info_; | 811 CallHandlerInfo* api_call_info_; |
| 804 }; | 812 }; |
| 805 | 813 |
| 814 class ExternalArrayStubCompiler: public StubCompiler { |
| 815 public: |
| 816 explicit ExternalArrayStubCompiler() {} |
| 817 |
| 818 MUST_USE_RESULT MaybeObject* CompileKeyedLoadStub( |
| 819 ExternalArrayType array_type, Code::Flags flags); |
| 820 |
| 821 MUST_USE_RESULT MaybeObject* CompileKeyedStoreStub( |
| 822 ExternalArrayType array_type, Code::Flags flags); |
| 823 |
| 824 private: |
| 825 MaybeObject* GetCode(Code::Flags flags); |
| 826 }; |
| 827 |
| 806 } } // namespace v8::internal | 828 } } // namespace v8::internal |
| 807 | 829 |
| 808 #endif // V8_STUB_CACHE_H_ | 830 #endif // V8_STUB_CACHE_H_ |
| OLD | NEW |