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

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

Issue 12732010: Pass Isolate through CompilingCallsToThisStubIsGCSafe calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/mips/macro-assembler-mips.cc ('k') | no next file » | 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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(isolate()), 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_ ||
555 stub->CompilingCallsToThisStubIsGCSafe(isolate()));
555 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET); 556 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET);
556 } 557 }
557 558
558 559
559 void MacroAssembler::StubReturn(int argc) { 560 void MacroAssembler::StubReturn(int argc) {
560 ASSERT(argc >= 1 && generating_stub()); 561 ASSERT(argc >= 1 && generating_stub());
561 ret((argc - 1) * kPointerSize); 562 ret((argc - 1) * kPointerSize);
562 } 563 }
563 564
564 565
565 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { 566 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) {
566 if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false; 567 if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false;
567 return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(); 568 return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(isolate());
568 } 569 }
569 570
570 571
571 void MacroAssembler::IllegalOperation(int num_arguments) { 572 void MacroAssembler::IllegalOperation(int num_arguments) {
572 if (num_arguments > 0) { 573 if (num_arguments > 0) {
573 addq(rsp, Immediate(num_arguments * kPointerSize)); 574 addq(rsp, Immediate(num_arguments * kPointerSize));
574 } 575 }
575 LoadRoot(rax, Heap::kUndefinedValueRootIndex); 576 LoadRoot(rax, Heap::kUndefinedValueRootIndex);
576 } 577 }
577 578
(...skipping 4055 matching lines...) Expand 10 before | Expand all | Expand 10 after
4633 j(greater, &no_info_available); 4634 j(greater, &no_info_available);
4634 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), 4635 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize),
4635 Heap::kAllocationSiteInfoMapRootIndex); 4636 Heap::kAllocationSiteInfoMapRootIndex);
4636 bind(&no_info_available); 4637 bind(&no_info_available);
4637 } 4638 }
4638 4639
4639 4640
4640 } } // namespace v8::internal 4641 } } // namespace v8::internal
4641 4642
4642 #endif // V8_TARGET_ARCH_X64 4643 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698