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

Side by Side Diff: src/x64/stub-cache-x64.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/x64/macro-assembler-x64.cc ('k') | test/cctest/test-code-stubs-arm.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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } else { 413 } else {
414 __ Move(call_data, call_data_obj); 414 __ Move(call_data, call_data_obj);
415 } 415 }
416 416
417 // Put api_function_address in place. 417 // Put api_function_address in place.
418 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 418 Address function_address = v8::ToCData<Address>(api_call_info->callback());
419 __ Move( 419 __ Move(
420 api_function_address, function_address, RelocInfo::EXTERNAL_REFERENCE); 420 api_function_address, function_address, RelocInfo::EXTERNAL_REFERENCE);
421 421
422 // Jump to stub. 422 // Jump to stub.
423 CallApiFunctionStub stub(is_store, call_data_undefined, argc); 423 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc);
424 __ TailCallStub(&stub); 424 __ TailCallStub(&stub);
425 } 425 }
426 426
427 427
428 void StoreStubCompiler::GenerateRestoreName(MacroAssembler* masm, 428 void StoreStubCompiler::GenerateRestoreName(MacroAssembler* masm,
429 Label* label, 429 Label* label,
430 Handle<Name> name) { 430 Handle<Name> name) {
431 if (!label->is_unused()) { 431 if (!label->is_unused()) {
432 __ bind(label); 432 __ bind(label);
433 __ Move(this->name(), name); 433 __ Move(this->name(), name);
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 return reg; 933 return reg;
934 } 934 }
935 935
936 936
937 void LoadStubCompiler::GenerateLoadField(Register reg, 937 void LoadStubCompiler::GenerateLoadField(Register reg,
938 Handle<JSObject> holder, 938 Handle<JSObject> holder,
939 PropertyIndex field, 939 PropertyIndex field,
940 Representation representation) { 940 Representation representation) {
941 if (!reg.is(receiver())) __ movp(receiver(), reg); 941 if (!reg.is(receiver())) __ movp(receiver(), reg);
942 if (kind() == Code::LOAD_IC) { 942 if (kind() == Code::LOAD_IC) {
943 LoadFieldStub stub(field.is_inobject(holder), 943 LoadFieldStub stub(isolate(),
944 field.is_inobject(holder),
944 field.translate(holder), 945 field.translate(holder),
945 representation); 946 representation);
946 GenerateTailCall(masm(), stub.GetCode(isolate())); 947 GenerateTailCall(masm(), stub.GetCode(isolate()));
947 } else { 948 } else {
948 KeyedLoadFieldStub stub(field.is_inobject(holder), 949 KeyedLoadFieldStub stub(isolate(),
950 field.is_inobject(holder),
949 field.translate(holder), 951 field.translate(holder),
950 representation); 952 representation);
951 GenerateTailCall(masm(), stub.GetCode(isolate())); 953 GenerateTailCall(masm(), stub.GetCode(isolate()));
952 } 954 }
953 } 955 }
954 956
955 957
956 void LoadStubCompiler::GenerateLoadCallback( 958 void LoadStubCompiler::GenerateLoadCallback(
957 Register reg, 959 Register reg,
958 Handle<ExecutableAccessorInfo> callback) { 960 Handle<ExecutableAccessorInfo> callback) {
(...skipping 27 matching lines...) Expand all
986 // Save a pointer to where we pushed the arguments pointer. This will be 988 // Save a pointer to where we pushed the arguments pointer. This will be
987 // passed as the const PropertyAccessorInfo& to the C++ callback. 989 // passed as the const PropertyAccessorInfo& to the C++ callback.
988 990
989 __ PushReturnAddressFrom(scratch4()); 991 __ PushReturnAddressFrom(scratch4());
990 992
991 // Abi for CallApiGetter 993 // Abi for CallApiGetter
992 Register api_function_address = r8; 994 Register api_function_address = r8;
993 Address getter_address = v8::ToCData<Address>(callback->getter()); 995 Address getter_address = v8::ToCData<Address>(callback->getter());
994 __ Move(api_function_address, getter_address, RelocInfo::EXTERNAL_REFERENCE); 996 __ Move(api_function_address, getter_address, RelocInfo::EXTERNAL_REFERENCE);
995 997
996 CallApiGetterStub stub; 998 CallApiGetterStub stub(isolate());
997 __ TailCallStub(&stub); 999 __ TailCallStub(&stub);
998 } 1000 }
999 1001
1000 1002
1001 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { 1003 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) {
1002 // Return the constant value. 1004 // Return the constant value.
1003 __ Move(rax, value); 1005 __ Move(rax, value);
1004 __ ret(0); 1006 __ ret(0);
1005 } 1007 }
1006 1008
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1474 // ----------------------------------- 1476 // -----------------------------------
1475 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1477 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1476 } 1478 }
1477 1479
1478 1480
1479 #undef __ 1481 #undef __
1480 1482
1481 } } // namespace v8::internal 1483 } } // namespace v8::internal
1482 1484
1483 #endif // V8_TARGET_ARCH_X64 1485 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/cctest/test-code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698