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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 7920006: Fix asserts and GC unsafeness in stub generation, bug=1689. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 3 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/ia32/lithium-codegen-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 4275 matching lines...) Expand 10 before | Expand all | Expand 10 after
4286 __ jmp(adaptor, RelocInfo::CODE_TARGET); 4286 __ jmp(adaptor, RelocInfo::CODE_TARGET);
4287 } 4287 }
4288 4288
4289 4289
4290 bool CEntryStub::NeedsImmovableCode() { 4290 bool CEntryStub::NeedsImmovableCode() {
4291 return false; 4291 return false;
4292 } 4292 }
4293 4293
4294 4294
4295 bool CEntryStub::CompilingCallsToThisStubIsGCSafe() { 4295 bool CEntryStub::CompilingCallsToThisStubIsGCSafe() {
4296 return !save_doubles_ && result_size_ == 1; 4296 return (!save_doubles_ || ISOLATE->fp_stubs_generated()) &&
4297 result_size_ == 1;
4297 } 4298 }
4298 4299
4299 4300
4300 void CodeStub::GenerateStubsAheadOfTime() { 4301 void CodeStub::GenerateStubsAheadOfTime() {
4301 } 4302 }
4302 4303
4303 4304
4305 void CodeStub::GenerateFPStubs() {
4306 CEntryStub save_doubles(1);
4307 save_doubles.SaveDoubles();
4308 Handle<Code> code = save_doubles.GetCode();
4309 code->GetIsolate()->set_fp_stubs_generated(true);
4310 }
4311
4312
4304 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { 4313 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) {
4305 __ Throw(eax); 4314 __ Throw(eax);
4306 } 4315 }
4307 4316
4308 4317
4309 void CEntryStub::GenerateCore(MacroAssembler* masm, 4318 void CEntryStub::GenerateCore(MacroAssembler* masm,
4310 Label* throw_normal_exception, 4319 Label* throw_normal_exception,
4311 Label* throw_termination_exception, 4320 Label* throw_termination_exception,
4312 Label* throw_out_of_memory_exception, 4321 Label* throw_out_of_memory_exception,
4313 bool do_gc, 4322 bool do_gc,
(...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after
6527 __ Drop(1); 6536 __ Drop(1);
6528 __ ret(2 * kPointerSize); 6537 __ ret(2 * kPointerSize);
6529 } 6538 }
6530 6539
6531 6540
6532 #undef __ 6541 #undef __
6533 6542
6534 } } // namespace v8::internal 6543 } } // namespace v8::internal
6535 6544
6536 #endif // V8_TARGET_ARCH_IA32 6545 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698