| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 | 778 |
| 779 // Put api_function_address in place. | 779 // Put api_function_address in place. |
| 780 Address function_address = v8::ToCData<Address>(api_call_info->callback()); | 780 Address function_address = v8::ToCData<Address>(api_call_info->callback()); |
| 781 ApiFunction fun(function_address); | 781 ApiFunction fun(function_address); |
| 782 ExternalReference ref = ExternalReference(&fun, | 782 ExternalReference ref = ExternalReference(&fun, |
| 783 ExternalReference::DIRECT_API_CALL, | 783 ExternalReference::DIRECT_API_CALL, |
| 784 masm->isolate()); | 784 masm->isolate()); |
| 785 __ Mov(api_function_address, ref); | 785 __ Mov(api_function_address, ref); |
| 786 | 786 |
| 787 // Jump to stub. | 787 // Jump to stub. |
| 788 CallApiFunctionStub stub(is_store, call_data_undefined, argc); | 788 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc); |
| 789 __ TailCallStub(&stub); | 789 __ TailCallStub(&stub); |
| 790 } | 790 } |
| 791 | 791 |
| 792 | 792 |
| 793 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { | 793 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { |
| 794 __ Jump(code, RelocInfo::CODE_TARGET); | 794 __ Jump(code, RelocInfo::CODE_TARGET); |
| 795 } | 795 } |
| 796 | 796 |
| 797 | 797 |
| 798 #undef __ | 798 #undef __ |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 return reg; | 987 return reg; |
| 988 } | 988 } |
| 989 | 989 |
| 990 | 990 |
| 991 void LoadStubCompiler::GenerateLoadField(Register reg, | 991 void LoadStubCompiler::GenerateLoadField(Register reg, |
| 992 Handle<JSObject> holder, | 992 Handle<JSObject> holder, |
| 993 PropertyIndex field, | 993 PropertyIndex field, |
| 994 Representation representation) { | 994 Representation representation) { |
| 995 __ Mov(receiver(), reg); | 995 __ Mov(receiver(), reg); |
| 996 if (kind() == Code::LOAD_IC) { | 996 if (kind() == Code::LOAD_IC) { |
| 997 LoadFieldStub stub(field.is_inobject(holder), | 997 LoadFieldStub stub(isolate(), |
| 998 field.is_inobject(holder), |
| 998 field.translate(holder), | 999 field.translate(holder), |
| 999 representation); | 1000 representation); |
| 1000 GenerateTailCall(masm(), stub.GetCode(isolate())); | 1001 GenerateTailCall(masm(), stub.GetCode(isolate())); |
| 1001 } else { | 1002 } else { |
| 1002 KeyedLoadFieldStub stub(field.is_inobject(holder), | 1003 KeyedLoadFieldStub stub(isolate(), |
| 1004 field.is_inobject(holder), |
| 1003 field.translate(holder), | 1005 field.translate(holder), |
| 1004 representation); | 1006 representation); |
| 1005 GenerateTailCall(masm(), stub.GetCode(isolate())); | 1007 GenerateTailCall(masm(), stub.GetCode(isolate())); |
| 1006 } | 1008 } |
| 1007 } | 1009 } |
| 1008 | 1010 |
| 1009 | 1011 |
| 1010 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { | 1012 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { |
| 1011 // Return the constant value. | 1013 // Return the constant value. |
| 1012 __ LoadObject(x0, value); | 1014 __ LoadObject(x0, value); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 // Abi for CallApiGetter. | 1059 // Abi for CallApiGetter. |
| 1058 Register getter_address_reg = x2; | 1060 Register getter_address_reg = x2; |
| 1059 | 1061 |
| 1060 // Set up the call. | 1062 // Set up the call. |
| 1061 Address getter_address = v8::ToCData<Address>(callback->getter()); | 1063 Address getter_address = v8::ToCData<Address>(callback->getter()); |
| 1062 ApiFunction fun(getter_address); | 1064 ApiFunction fun(getter_address); |
| 1063 ExternalReference::Type type = ExternalReference::DIRECT_GETTER_CALL; | 1065 ExternalReference::Type type = ExternalReference::DIRECT_GETTER_CALL; |
| 1064 ExternalReference ref = ExternalReference(&fun, type, isolate()); | 1066 ExternalReference ref = ExternalReference(&fun, type, isolate()); |
| 1065 __ Mov(getter_address_reg, ref); | 1067 __ Mov(getter_address_reg, ref); |
| 1066 | 1068 |
| 1067 CallApiGetterStub stub; | 1069 CallApiGetterStub stub(isolate()); |
| 1068 __ TailCallStub(&stub); | 1070 __ TailCallStub(&stub); |
| 1069 } | 1071 } |
| 1070 | 1072 |
| 1071 | 1073 |
| 1072 void LoadStubCompiler::GenerateLoadInterceptor( | 1074 void LoadStubCompiler::GenerateLoadInterceptor( |
| 1073 Register holder_reg, | 1075 Register holder_reg, |
| 1074 Handle<Object> object, | 1076 Handle<Object> object, |
| 1075 Handle<JSObject> interceptor_holder, | 1077 Handle<JSObject> interceptor_holder, |
| 1076 LookupResult* lookup, | 1078 LookupResult* lookup, |
| 1077 Handle<Name> name) { | 1079 Handle<Name> name) { |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1517 | 1519 |
| 1518 // Miss case, call the runtime. | 1520 // Miss case, call the runtime. |
| 1519 __ Bind(&miss); | 1521 __ Bind(&miss); |
| 1520 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1522 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 1521 } | 1523 } |
| 1522 | 1524 |
| 1523 | 1525 |
| 1524 } } // namespace v8::internal | 1526 } } // namespace v8::internal |
| 1525 | 1527 |
| 1526 #endif // V8_TARGET_ARCH_ARM64 | 1528 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |