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

Side by Side Diff: src/ia32/macro-assembler-ia32.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/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/stub-cache-ia32.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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 mov(value, Immediate(BitCast<int32_t>(kZapValue))); 378 mov(value, Immediate(BitCast<int32_t>(kZapValue)));
379 } 379 }
380 } 380 }
381 381
382 382
383 #ifdef ENABLE_DEBUGGER_SUPPORT 383 #ifdef ENABLE_DEBUGGER_SUPPORT
384 void MacroAssembler::DebugBreak() { 384 void MacroAssembler::DebugBreak() {
385 Set(eax, Immediate(0)); 385 Set(eax, Immediate(0));
386 mov(ebx, Immediate(ExternalReference(Runtime::kDebugBreak, isolate()))); 386 mov(ebx, Immediate(ExternalReference(Runtime::kDebugBreak, isolate())));
387 CEntryStub ces(1); 387 CEntryStub ces(1);
388 call(ces.GetCode(), RelocInfo::DEBUG_BREAK); 388 call(ces.GetCode(isolate()), RelocInfo::DEBUG_BREAK);
389 } 389 }
390 #endif 390 #endif
391 391
392 392
393 void MacroAssembler::Set(Register dst, const Immediate& x) { 393 void MacroAssembler::Set(Register dst, const Immediate& x) {
394 if (x.is_zero()) { 394 if (x.is_zero()) {
395 xor_(dst, dst); // Shorter than mov. 395 xor_(dst, dst); // Shorter than mov.
396 } else { 396 } else {
397 mov(dst, x); 397 mov(dst, x);
398 } 398 }
(...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1795 bind(&non_instance); 1795 bind(&non_instance);
1796 mov(result, FieldOperand(result, Map::kConstructorOffset)); 1796 mov(result, FieldOperand(result, Map::kConstructorOffset));
1797 1797
1798 // All done. 1798 // All done.
1799 bind(&done); 1799 bind(&done);
1800 } 1800 }
1801 1801
1802 1802
1803 void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) { 1803 void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) {
1804 ASSERT(AllowThisStubCall(stub)); // Calls are not allowed in some stubs. 1804 ASSERT(AllowThisStubCall(stub)); // Calls are not allowed in some stubs.
1805 call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id); 1805 call(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, ast_id);
1806 } 1806 }
1807 1807
1808 1808
1809 void MacroAssembler::TailCallStub(CodeStub* stub) { 1809 void MacroAssembler::TailCallStub(CodeStub* stub) {
1810 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); 1810 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe());
1811 jmp(stub->GetCode(), RelocInfo::CODE_TARGET); 1811 jmp(stub->GetCode(isolate()), RelocInfo::CODE_TARGET);
1812 } 1812 }
1813 1813
1814 1814
1815 void MacroAssembler::StubReturn(int argc) { 1815 void MacroAssembler::StubReturn(int argc) {
1816 ASSERT(argc >= 1 && generating_stub()); 1816 ASSERT(argc >= 1 && generating_stub());
1817 ret((argc - 1) * kPointerSize); 1817 ret((argc - 1) * kPointerSize);
1818 } 1818 }
1819 1819
1820 1820
1821 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { 1821 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) {
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 call(eax); 2090 call(eax);
2091 mov(eax, edi); 2091 mov(eax, edi);
2092 jmp(&leave_exit_frame); 2092 jmp(&leave_exit_frame);
2093 } 2093 }
2094 2094
2095 2095
2096 void MacroAssembler::JumpToExternalReference(const ExternalReference& ext) { 2096 void MacroAssembler::JumpToExternalReference(const ExternalReference& ext) {
2097 // Set the entry point and jump to the C entry runtime stub. 2097 // Set the entry point and jump to the C entry runtime stub.
2098 mov(ebx, Immediate(ext)); 2098 mov(ebx, Immediate(ext));
2099 CEntryStub ces(1); 2099 CEntryStub ces(1);
2100 jmp(ces.GetCode(), RelocInfo::CODE_TARGET); 2100 jmp(ces.GetCode(isolate()), RelocInfo::CODE_TARGET);
2101 } 2101 }
2102 2102
2103 2103
2104 void MacroAssembler::SetCallKind(Register dst, CallKind call_kind) { 2104 void MacroAssembler::SetCallKind(Register dst, CallKind call_kind) {
2105 // This macro takes the dst register to make the code more readable 2105 // This macro takes the dst register to make the code more readable
2106 // at the call sites. However, the dst register has to be ecx to 2106 // at the call sites. However, the dst register has to be ecx to
2107 // follow the calling convention which requires the call type to be 2107 // follow the calling convention which requires the call type to be
2108 // in ecx. 2108 // in ecx.
2109 ASSERT(dst.is(ecx)); 2109 ASSERT(dst.is(ecx));
2110 if (call_kind == CALL_AS_FUNCTION) { 2110 if (call_kind == CALL_AS_FUNCTION) {
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
3081 j(greater, &no_info_available); 3081 j(greater, &no_info_available);
3082 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), 3082 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize),
3083 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); 3083 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map())));
3084 bind(&no_info_available); 3084 bind(&no_info_available);
3085 } 3085 }
3086 3086
3087 3087
3088 } } // namespace v8::internal 3088 } } // namespace v8::internal
3089 3089
3090 #endif // V8_TARGET_ARCH_IA32 3090 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698