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

Side by Side Diff: src/ia32/stub-cache-ia32.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/ia32/macro-assembler-ia32.cc ('k') | src/ic.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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 __ mov(call_data, Immediate(isolate->factory()->undefined_value())); 439 __ mov(call_data, Immediate(isolate->factory()->undefined_value()));
440 } else { 440 } else {
441 __ mov(call_data, call_data_obj); 441 __ mov(call_data, call_data_obj);
442 } 442 }
443 443
444 // Put api_function_address in place. 444 // Put api_function_address in place.
445 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 445 Address function_address = v8::ToCData<Address>(api_call_info->callback());
446 __ mov(api_function_address, Immediate(function_address)); 446 __ mov(api_function_address, Immediate(function_address));
447 447
448 // Jump to stub. 448 // Jump to stub.
449 CallApiFunctionStub stub(is_store, call_data_undefined, argc); 449 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc);
450 __ TailCallStub(&stub); 450 __ TailCallStub(&stub);
451 } 451 }
452 452
453 453
454 void StoreStubCompiler::GenerateRestoreName(MacroAssembler* masm, 454 void StoreStubCompiler::GenerateRestoreName(MacroAssembler* masm,
455 Label* label, 455 Label* label,
456 Handle<Name> name) { 456 Handle<Name> name) {
457 if (!label->is_unused()) { 457 if (!label->is_unused()) {
458 __ bind(label); 458 __ bind(label);
459 __ mov(this->name(), Immediate(name)); 459 __ mov(this->name(), Immediate(name));
(...skipping 566 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::GenerateLoadCallback( 1051 void LoadStubCompiler::GenerateLoadCallback(
1050 Register reg, 1052 Register reg,
1051 Handle<ExecutableAccessorInfo> callback) { 1053 Handle<ExecutableAccessorInfo> callback) {
(...skipping 28 matching lines...) Expand all
1080 1082
1081 __ push(name()); // name 1083 __ push(name()); // name
1082 1084
1083 __ push(scratch3()); // Restore return address. 1085 __ push(scratch3()); // Restore return address.
1084 1086
1085 // Abi for CallApiGetter 1087 // Abi for CallApiGetter
1086 Register getter_address = edx; 1088 Register getter_address = edx;
1087 Address function_address = v8::ToCData<Address>(callback->getter()); 1089 Address function_address = v8::ToCData<Address>(callback->getter());
1088 __ mov(getter_address, Immediate(function_address)); 1090 __ mov(getter_address, Immediate(function_address));
1089 1091
1090 CallApiGetterStub stub; 1092 CallApiGetterStub stub(isolate());
1091 __ TailCallStub(&stub); 1093 __ TailCallStub(&stub);
1092 } 1094 }
1093 1095
1094 1096
1095 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { 1097 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) {
1096 // Return the constant value. 1098 // Return the constant value.
1097 __ LoadObject(eax, value); 1099 __ LoadObject(eax, value);
1098 __ ret(0); 1100 __ ret(0);
1099 } 1101 }
1100 1102
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 // ----------------------------------- 1568 // -----------------------------------
1567 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1569 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1568 } 1570 }
1569 1571
1570 1572
1571 #undef __ 1573 #undef __
1572 1574
1573 } } // namespace v8::internal 1575 } } // namespace v8::internal
1574 1576
1575 #endif // V8_TARGET_ARCH_IA32 1577 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698