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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 8725030: Fix bug when generating padding to ensure space for lazy deoptimization. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years 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/arm/lithium-codegen-arm.cc ('k') | src/mips/lithium-codegen-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 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 4391 matching lines...) Expand 10 before | Expand all | Expand 10 after
4402 // Ensure that we have enough space after the previous lazy-bailout 4402 // Ensure that we have enough space after the previous lazy-bailout
4403 // instruction for patching the code here. 4403 // instruction for patching the code here.
4404 int current_pc = masm()->pc_offset(); 4404 int current_pc = masm()->pc_offset();
4405 int patch_size = Deoptimizer::patch_size(); 4405 int patch_size = Deoptimizer::patch_size();
4406 if (current_pc < last_lazy_deopt_pc_ + patch_size) { 4406 if (current_pc < last_lazy_deopt_pc_ + patch_size) {
4407 int padding_size = last_lazy_deopt_pc_ + patch_size - current_pc; 4407 int padding_size = last_lazy_deopt_pc_ + patch_size - current_pc;
4408 while (padding_size-- > 0) { 4408 while (padding_size-- > 0) {
4409 __ nop(); 4409 __ nop();
4410 } 4410 }
4411 } 4411 }
4412 last_lazy_deopt_pc_ = current_pc; 4412 last_lazy_deopt_pc_ = masm()->pc_offset();
4413 } 4413 }
4414 4414
4415 4415
4416 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { 4416 void LCodeGen::DoLazyBailout(LLazyBailout* instr) {
4417 EnsureSpaceForLazyDeopt(); 4417 EnsureSpaceForLazyDeopt();
4418 ASSERT(instr->HasEnvironment()); 4418 ASSERT(instr->HasEnvironment());
4419 LEnvironment* env = instr->environment(); 4419 LEnvironment* env = instr->environment();
4420 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); 4420 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
4421 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 4421 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
4422 } 4422 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
4549 this, pointers, Safepoint::kLazyDeopt); 4549 this, pointers, Safepoint::kLazyDeopt);
4550 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4550 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4551 } 4551 }
4552 4552
4553 4553
4554 #undef __ 4554 #undef __
4555 4555
4556 } } // namespace v8::internal 4556 } } // namespace v8::internal
4557 4557
4558 #endif // V8_TARGET_ARCH_IA32 4558 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698