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

Side by Side Diff: src/arm/macro-assembler-arm.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 | « no previous file | src/code-stubs.h » ('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 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2218 2218
2219 void MacroAssembler::CallStub(CodeStub* stub, 2219 void MacroAssembler::CallStub(CodeStub* stub,
2220 TypeFeedbackId ast_id, 2220 TypeFeedbackId ast_id,
2221 Condition cond) { 2221 Condition cond) {
2222 ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. 2222 ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs.
2223 Call(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, ast_id, cond); 2223 Call(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, ast_id, cond);
2224 } 2224 }
2225 2225
2226 2226
2227 void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) { 2227 void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) {
2228 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); 2228 ASSERT(allow_stub_calls_ ||
2229 stub->CompilingCallsToThisStubIsGCSafe(isolate()));
2229 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, cond); 2230 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, cond);
2230 } 2231 }
2231 2232
2232 2233
2233 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { 2234 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
2234 return ref0.address() - ref1.address(); 2235 return ref0.address() - ref1.address();
2235 } 2236 }
2236 2237
2237 2238
2238 void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function, 2239 void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
2328 mov(r0, Operand(ExternalReference::isolate_address())); 2329 mov(r0, Operand(ExternalReference::isolate_address()));
2329 CallCFunction( 2330 CallCFunction(
2330 ExternalReference::delete_handle_scope_extensions(isolate()), 1); 2331 ExternalReference::delete_handle_scope_extensions(isolate()), 1);
2331 mov(r0, r4); 2332 mov(r0, r4);
2332 jmp(&leave_exit_frame); 2333 jmp(&leave_exit_frame);
2333 } 2334 }
2334 2335
2335 2336
2336 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { 2337 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) {
2337 if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false; 2338 if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false;
2338 return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(); 2339 return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(isolate());
2339 } 2340 }
2340 2341
2341 2342
2342 void MacroAssembler::IllegalOperation(int num_arguments) { 2343 void MacroAssembler::IllegalOperation(int num_arguments) {
2343 if (num_arguments > 0) { 2344 if (num_arguments > 0) {
2344 add(sp, sp, Operand(num_arguments * kPointerSize)); 2345 add(sp, sp, Operand(num_arguments * kPointerSize));
2345 } 2346 }
2346 LoadRoot(r0, Heap::kUndefinedValueRootIndex); 2347 LoadRoot(r0, Heap::kUndefinedValueRootIndex);
2347 } 2348 }
2348 2349
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
3948 void CodePatcher::EmitCondition(Condition cond) { 3949 void CodePatcher::EmitCondition(Condition cond) {
3949 Instr instr = Assembler::instr_at(masm_.pc_); 3950 Instr instr = Assembler::instr_at(masm_.pc_);
3950 instr = (instr & ~kCondMask) | cond; 3951 instr = (instr & ~kCondMask) | cond;
3951 masm_.emit(instr); 3952 masm_.emit(instr);
3952 } 3953 }
3953 3954
3954 3955
3955 } } // namespace v8::internal 3956 } } // namespace v8::internal
3956 3957
3957 #endif // V8_TARGET_ARCH_ARM 3958 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698