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

Side by Side Diff: src/ia32/macro-assembler-ia32.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/code-stubs.h ('k') | src/mips/macro-assembler-mips.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 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 } 1803 }
1804 1804
1805 1805
1806 void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) { 1806 void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) {
1807 ASSERT(AllowThisStubCall(stub)); // Calls are not allowed in some stubs. 1807 ASSERT(AllowThisStubCall(stub)); // Calls are not allowed in some stubs.
1808 call(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, ast_id); 1808 call(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, ast_id);
1809 } 1809 }
1810 1810
1811 1811
1812 void MacroAssembler::TailCallStub(CodeStub* stub) { 1812 void MacroAssembler::TailCallStub(CodeStub* stub) {
1813 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); 1813 ASSERT(allow_stub_calls_ ||
1814 stub->CompilingCallsToThisStubIsGCSafe(isolate()));
1814 jmp(stub->GetCode(isolate()), RelocInfo::CODE_TARGET); 1815 jmp(stub->GetCode(isolate()), RelocInfo::CODE_TARGET);
1815 } 1816 }
1816 1817
1817 1818
1818 void MacroAssembler::StubReturn(int argc) { 1819 void MacroAssembler::StubReturn(int argc) {
1819 ASSERT(argc >= 1 && generating_stub()); 1820 ASSERT(argc >= 1 && generating_stub());
1820 ret((argc - 1) * kPointerSize); 1821 ret((argc - 1) * kPointerSize);
1821 } 1822 }
1822 1823
1823 1824
1824 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { 1825 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) {
1825 if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false; 1826 if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false;
1826 return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(); 1827 return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(isolate());
1827 } 1828 }
1828 1829
1829 1830
1830 void MacroAssembler::IllegalOperation(int num_arguments) { 1831 void MacroAssembler::IllegalOperation(int num_arguments) {
1831 if (num_arguments > 0) { 1832 if (num_arguments > 0) {
1832 add(esp, Immediate(num_arguments * kPointerSize)); 1833 add(esp, Immediate(num_arguments * kPointerSize));
1833 } 1834 }
1834 mov(eax, Immediate(isolate()->factory()->undefined_value())); 1835 mov(eax, Immediate(isolate()->factory()->undefined_value()));
1835 } 1836 }
1836 1837
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
3095 j(greater, &no_info_available); 3096 j(greater, &no_info_available);
3096 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), 3097 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize),
3097 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); 3098 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map())));
3098 bind(&no_info_available); 3099 bind(&no_info_available);
3099 } 3100 }
3100 3101
3101 3102
3102 } } // namespace v8::internal 3103 } } // namespace v8::internal
3103 3104
3104 #endif // V8_TARGET_ARCH_IA32 3105 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698