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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 12317141: Added Isolate parameter to CodeStub::GetCode(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed whitespace. Rebased. Created 7 years, 9 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/lithium-codegen-x64.cc ('k') | src/x64/stub-cache-x64.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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 } else { 539 } else {
540 CallRuntime(Runtime::kAbort, 2); 540 CallRuntime(Runtime::kAbort, 2);
541 } 541 }
542 // Control will not return here. 542 // Control will not return here.
543 int3(); 543 int3();
544 } 544 }
545 545
546 546
547 void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) { 547 void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) {
548 ASSERT(AllowThisStubCall(stub)); // Calls are not allowed in some stubs 548 ASSERT(AllowThisStubCall(stub)); // Calls are not allowed in some stubs
549 Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id); 549 Call(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, ast_id);
550 } 550 }
551 551
552 552
553 void MacroAssembler::TailCallStub(CodeStub* stub) { 553 void MacroAssembler::TailCallStub(CodeStub* stub) {
554 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); 554 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe());
555 Jump(stub->GetCode(), RelocInfo::CODE_TARGET); 555 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET);
556 } 556 }
557 557
558 558
559 void MacroAssembler::StubReturn(int argc) { 559 void MacroAssembler::StubReturn(int argc) {
560 ASSERT(argc >= 1 && generating_stub()); 560 ASSERT(argc >= 1 && generating_stub());
561 ret((argc - 1) * kPointerSize); 561 ret((argc - 1) * kPointerSize);
562 } 562 }
563 563
564 564
565 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { 565 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) {
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 movq(rax, prev_limit_reg); 827 movq(rax, prev_limit_reg);
828 jmp(&leave_exit_frame); 828 jmp(&leave_exit_frame);
829 } 829 }
830 830
831 831
832 void MacroAssembler::JumpToExternalReference(const ExternalReference& ext, 832 void MacroAssembler::JumpToExternalReference(const ExternalReference& ext,
833 int result_size) { 833 int result_size) {
834 // Set the entry point and jump to the C entry runtime stub. 834 // Set the entry point and jump to the C entry runtime stub.
835 LoadAddress(rbx, ext); 835 LoadAddress(rbx, ext);
836 CEntryStub ces(result_size); 836 CEntryStub ces(result_size);
837 jmp(ces.GetCode(), RelocInfo::CODE_TARGET); 837 jmp(ces.GetCode(isolate()), RelocInfo::CODE_TARGET);
838 } 838 }
839 839
840 840
841 void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, 841 void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
842 InvokeFlag flag, 842 InvokeFlag flag,
843 const CallWrapper& call_wrapper) { 843 const CallWrapper& call_wrapper) {
844 // You can't call a builtin without a valid frame. 844 // You can't call a builtin without a valid frame.
845 ASSERT(flag == JUMP_FUNCTION || has_frame()); 845 ASSERT(flag == JUMP_FUNCTION || has_frame());
846 846
847 // Rely on the assertion to check that the number of provided 847 // Rely on the assertion to check that the number of provided
(...skipping 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after
3132 } 3132 }
3133 } 3133 }
3134 3134
3135 3135
3136 #ifdef ENABLE_DEBUGGER_SUPPORT 3136 #ifdef ENABLE_DEBUGGER_SUPPORT
3137 void MacroAssembler::DebugBreak() { 3137 void MacroAssembler::DebugBreak() {
3138 Set(rax, 0); // No arguments. 3138 Set(rax, 0); // No arguments.
3139 LoadAddress(rbx, ExternalReference(Runtime::kDebugBreak, isolate())); 3139 LoadAddress(rbx, ExternalReference(Runtime::kDebugBreak, isolate()));
3140 CEntryStub ces(1); 3140 CEntryStub ces(1);
3141 ASSERT(AllowThisStubCall(&ces)); 3141 ASSERT(AllowThisStubCall(&ces));
3142 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK); 3142 Call(ces.GetCode(isolate()), RelocInfo::DEBUG_BREAK);
3143 } 3143 }
3144 #endif // ENABLE_DEBUGGER_SUPPORT 3144 #endif // ENABLE_DEBUGGER_SUPPORT
3145 3145
3146 3146
3147 void MacroAssembler::SetCallKind(Register dst, CallKind call_kind) { 3147 void MacroAssembler::SetCallKind(Register dst, CallKind call_kind) {
3148 // This macro takes the dst register to make the code more readable 3148 // This macro takes the dst register to make the code more readable
3149 // at the call sites. However, the dst register has to be rcx to 3149 // at the call sites. However, the dst register has to be rcx to
3150 // follow the calling convention which requires the call type to be 3150 // follow the calling convention which requires the call type to be
3151 // in rcx. 3151 // in rcx.
3152 ASSERT(dst.is(rcx)); 3152 ASSERT(dst.is(rcx));
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after
4619 j(greater, &no_info_available); 4619 j(greater, &no_info_available);
4620 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), 4620 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize),
4621 Heap::kAllocationSiteInfoMapRootIndex); 4621 Heap::kAllocationSiteInfoMapRootIndex);
4622 bind(&no_info_available); 4622 bind(&no_info_available);
4623 } 4623 }
4624 4624
4625 4625
4626 } } // namespace v8::internal 4626 } } // namespace v8::internal
4627 4627
4628 #endif // V8_TARGET_ARCH_X64 4628 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698