| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 807 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 818   Address function_address = v8::ToCData<Address>(api_call_info->callback()); | 818   Address function_address = v8::ToCData<Address>(api_call_info->callback()); | 
| 819   ApiFunction fun(function_address); | 819   ApiFunction fun(function_address); | 
| 820   ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; | 820   ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; | 
| 821   ExternalReference ref = | 821   ExternalReference ref = | 
| 822       ExternalReference(&fun, | 822       ExternalReference(&fun, | 
| 823                         type, | 823                         type, | 
| 824                         masm->isolate()); | 824                         masm->isolate()); | 
| 825   __ li(api_function_address, Operand(ref)); | 825   __ li(api_function_address, Operand(ref)); | 
| 826 | 826 | 
| 827   // Jump to stub. | 827   // Jump to stub. | 
| 828   CallApiFunctionStub stub(is_store, call_data_undefined, argc); | 828   CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc); | 
| 829   __ TailCallStub(&stub); | 829   __ TailCallStub(&stub); | 
| 830 } | 830 } | 
| 831 | 831 | 
| 832 | 832 | 
| 833 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { | 833 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { | 
| 834   __ Jump(code, RelocInfo::CODE_TARGET); | 834   __ Jump(code, RelocInfo::CODE_TARGET); | 
| 835 } | 835 } | 
| 836 | 836 | 
| 837 | 837 | 
| 838 #undef __ | 838 #undef __ | 
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1017   return reg; | 1017   return reg; | 
| 1018 } | 1018 } | 
| 1019 | 1019 | 
| 1020 | 1020 | 
| 1021 void LoadStubCompiler::GenerateLoadField(Register reg, | 1021 void LoadStubCompiler::GenerateLoadField(Register reg, | 
| 1022                                          Handle<JSObject> holder, | 1022                                          Handle<JSObject> holder, | 
| 1023                                          PropertyIndex field, | 1023                                          PropertyIndex field, | 
| 1024                                          Representation representation) { | 1024                                          Representation representation) { | 
| 1025   if (!reg.is(receiver())) __ mov(receiver(), reg); | 1025   if (!reg.is(receiver())) __ mov(receiver(), reg); | 
| 1026   if (kind() == Code::LOAD_IC) { | 1026   if (kind() == Code::LOAD_IC) { | 
| 1027     LoadFieldStub stub(field.is_inobject(holder), | 1027     LoadFieldStub stub(isolate(), | 
|  | 1028                        field.is_inobject(holder), | 
| 1028                        field.translate(holder), | 1029                        field.translate(holder), | 
| 1029                        representation); | 1030                        representation); | 
| 1030     GenerateTailCall(masm(), stub.GetCode(isolate())); | 1031     GenerateTailCall(masm(), stub.GetCode(isolate())); | 
| 1031   } else { | 1032   } else { | 
| 1032     KeyedLoadFieldStub stub(field.is_inobject(holder), | 1033     KeyedLoadFieldStub stub(isolate(), | 
|  | 1034                             field.is_inobject(holder), | 
| 1033                             field.translate(holder), | 1035                             field.translate(holder), | 
| 1034                             representation); | 1036                             representation); | 
| 1035     GenerateTailCall(masm(), stub.GetCode(isolate())); | 1037     GenerateTailCall(masm(), stub.GetCode(isolate())); | 
| 1036   } | 1038   } | 
| 1037 } | 1039 } | 
| 1038 | 1040 | 
| 1039 | 1041 | 
| 1040 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { | 1042 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { | 
| 1041   // Return the constant value. | 1043   // Return the constant value. | 
| 1042   __ li(v0, value); | 1044   __ li(v0, value); | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1082   __ mov(a2, scratch2());  // Saved in case scratch2 == a1. | 1084   __ mov(a2, scratch2());  // Saved in case scratch2 == a1. | 
| 1083   // Abi for CallApiGetter. | 1085   // Abi for CallApiGetter. | 
| 1084   Register getter_address_reg = a2; | 1086   Register getter_address_reg = a2; | 
| 1085 | 1087 | 
| 1086   Address getter_address = v8::ToCData<Address>(callback->getter()); | 1088   Address getter_address = v8::ToCData<Address>(callback->getter()); | 
| 1087   ApiFunction fun(getter_address); | 1089   ApiFunction fun(getter_address); | 
| 1088   ExternalReference::Type type = ExternalReference::DIRECT_GETTER_CALL; | 1090   ExternalReference::Type type = ExternalReference::DIRECT_GETTER_CALL; | 
| 1089   ExternalReference ref = ExternalReference(&fun, type, isolate()); | 1091   ExternalReference ref = ExternalReference(&fun, type, isolate()); | 
| 1090   __ li(getter_address_reg, Operand(ref)); | 1092   __ li(getter_address_reg, Operand(ref)); | 
| 1091 | 1093 | 
| 1092   CallApiGetterStub stub; | 1094   CallApiGetterStub stub(isolate()); | 
| 1093   __ TailCallStub(&stub); | 1095   __ TailCallStub(&stub); | 
| 1094 } | 1096 } | 
| 1095 | 1097 | 
| 1096 | 1098 | 
| 1097 void LoadStubCompiler::GenerateLoadInterceptor( | 1099 void LoadStubCompiler::GenerateLoadInterceptor( | 
| 1098     Register holder_reg, | 1100     Register holder_reg, | 
| 1099     Handle<Object> object, | 1101     Handle<Object> object, | 
| 1100     Handle<JSObject> interceptor_holder, | 1102     Handle<JSObject> interceptor_holder, | 
| 1101     LookupResult* lookup, | 1103     LookupResult* lookup, | 
| 1102     Handle<Name> name) { | 1104     Handle<Name> name) { | 
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1547   // ----------------------------------- | 1549   // ----------------------------------- | 
| 1548   TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1550   TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 
| 1549 } | 1551 } | 
| 1550 | 1552 | 
| 1551 | 1553 | 
| 1552 #undef __ | 1554 #undef __ | 
| 1553 | 1555 | 
| 1554 } }  // namespace v8::internal | 1556 } }  // namespace v8::internal | 
| 1555 | 1557 | 
| 1556 #endif  // V8_TARGET_ARCH_MIPS | 1558 #endif  // V8_TARGET_ARCH_MIPS | 
| OLD | NEW | 
|---|