Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 246643014: CodeStubs contain their corresponding Isolate* now. (part 1) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Feedback. Rebased. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/regexp-macro-assembler-arm.cc ('k') | src/arm64/builtins-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 // Put api_function_address in place. 826 // Put api_function_address in place.
827 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 827 Address function_address = v8::ToCData<Address>(api_call_info->callback());
828 ApiFunction fun(function_address); 828 ApiFunction fun(function_address);
829 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; 829 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL;
830 ExternalReference ref = ExternalReference(&fun, 830 ExternalReference ref = ExternalReference(&fun,
831 type, 831 type,
832 masm->isolate()); 832 masm->isolate());
833 __ mov(api_function_address, Operand(ref)); 833 __ mov(api_function_address, Operand(ref));
834 834
835 // Jump to stub. 835 // Jump to stub.
836 CallApiFunctionStub stub(is_store, call_data_undefined, argc); 836 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc);
837 __ TailCallStub(&stub); 837 __ TailCallStub(&stub);
838 } 838 }
839 839
840 840
841 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { 841 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) {
842 __ Jump(code, RelocInfo::CODE_TARGET); 842 __ Jump(code, RelocInfo::CODE_TARGET);
843 } 843 }
844 844
845 845
846 #undef __ 846 #undef __
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 return reg; 1026 return reg;
1027 } 1027 }
1028 1028
1029 1029
1030 void LoadStubCompiler::GenerateLoadField(Register reg, 1030 void LoadStubCompiler::GenerateLoadField(Register reg,
1031 Handle<JSObject> holder, 1031 Handle<JSObject> holder,
1032 PropertyIndex field, 1032 PropertyIndex field,
1033 Representation representation) { 1033 Representation representation) {
1034 if (!reg.is(receiver())) __ mov(receiver(), reg); 1034 if (!reg.is(receiver())) __ mov(receiver(), reg);
1035 if (kind() == Code::LOAD_IC) { 1035 if (kind() == Code::LOAD_IC) {
1036 LoadFieldStub stub(field.is_inobject(holder), 1036 LoadFieldStub stub(isolate(),
1037 field.is_inobject(holder),
1037 field.translate(holder), 1038 field.translate(holder),
1038 representation); 1039 representation);
1039 GenerateTailCall(masm(), stub.GetCode(isolate())); 1040 GenerateTailCall(masm(), stub.GetCode(isolate()));
1040 } else { 1041 } else {
1041 KeyedLoadFieldStub stub(field.is_inobject(holder), 1042 KeyedLoadFieldStub stub(isolate(),
1043 field.is_inobject(holder),
1042 field.translate(holder), 1044 field.translate(holder),
1043 representation); 1045 representation);
1044 GenerateTailCall(masm(), stub.GetCode(isolate())); 1046 GenerateTailCall(masm(), stub.GetCode(isolate()));
1045 } 1047 }
1046 } 1048 }
1047 1049
1048 1050
1049 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { 1051 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) {
1050 // Return the constant value. 1052 // Return the constant value.
1051 __ Move(r0, value); 1053 __ Move(r0, value);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 1090
1089 // Abi for CallApiGetter 1091 // Abi for CallApiGetter
1090 Register getter_address_reg = r2; 1092 Register getter_address_reg = r2;
1091 1093
1092 Address getter_address = v8::ToCData<Address>(callback->getter()); 1094 Address getter_address = v8::ToCData<Address>(callback->getter());
1093 ApiFunction fun(getter_address); 1095 ApiFunction fun(getter_address);
1094 ExternalReference::Type type = ExternalReference::DIRECT_GETTER_CALL; 1096 ExternalReference::Type type = ExternalReference::DIRECT_GETTER_CALL;
1095 ExternalReference ref = ExternalReference(&fun, type, isolate()); 1097 ExternalReference ref = ExternalReference(&fun, type, isolate());
1096 __ mov(getter_address_reg, Operand(ref)); 1098 __ mov(getter_address_reg, Operand(ref));
1097 1099
1098 CallApiGetterStub stub; 1100 CallApiGetterStub stub(isolate());
1099 __ TailCallStub(&stub); 1101 __ TailCallStub(&stub);
1100 } 1102 }
1101 1103
1102 1104
1103 void LoadStubCompiler::GenerateLoadInterceptor( 1105 void LoadStubCompiler::GenerateLoadInterceptor(
1104 Register holder_reg, 1106 Register holder_reg,
1105 Handle<Object> object, 1107 Handle<Object> object,
1106 Handle<JSObject> interceptor_holder, 1108 Handle<JSObject> interceptor_holder,
1107 LookupResult* lookup, 1109 LookupResult* lookup,
1108 Handle<Name> name) { 1110 Handle<Name> name) {
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 // ----------------------------------- 1558 // -----------------------------------
1557 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1559 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1558 } 1560 }
1559 1561
1560 1562
1561 #undef __ 1563 #undef __
1562 1564
1563 } } // namespace v8::internal 1565 } } // namespace v8::internal
1564 1566
1565 #endif // V8_TARGET_ARCH_ARM 1567 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/regexp-macro-assembler-arm.cc ('k') | src/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698