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

Side by Side Diff: src/x64/lithium-codegen-x64.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/mips/lithium-codegen-mips.cc ('k') | no next file » | 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 4094 matching lines...) Expand 10 before | Expand all | Expand 10 after
4105 int current_pc = masm()->pc_offset(); 4105 int current_pc = masm()->pc_offset();
4106 int patch_size = Deoptimizer::patch_size(); 4106 int patch_size = Deoptimizer::patch_size();
4107 if (current_pc < last_lazy_deopt_pc_ + patch_size) { 4107 if (current_pc < last_lazy_deopt_pc_ + patch_size) {
4108 int padding_size = last_lazy_deopt_pc_ + patch_size - current_pc; 4108 int padding_size = last_lazy_deopt_pc_ + patch_size - current_pc;
4109 while (padding_size > 0) { 4109 while (padding_size > 0) {
4110 int nop_size = padding_size > 9 ? 9 : padding_size; 4110 int nop_size = padding_size > 9 ? 9 : padding_size;
4111 __ nop(nop_size); 4111 __ nop(nop_size);
4112 padding_size -= nop_size; 4112 padding_size -= nop_size;
4113 } 4113 }
4114 } 4114 }
4115 last_lazy_deopt_pc_ = current_pc; 4115 last_lazy_deopt_pc_ = masm()->pc_offset();
4116 } 4116 }
4117 4117
4118 4118
4119 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { 4119 void LCodeGen::DoLazyBailout(LLazyBailout* instr) {
4120 EnsureSpaceForLazyDeopt(); 4120 EnsureSpaceForLazyDeopt();
4121 ASSERT(instr->HasEnvironment()); 4121 ASSERT(instr->HasEnvironment());
4122 LEnvironment* env = instr->environment(); 4122 LEnvironment* env = instr->environment();
4123 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); 4123 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
4124 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 4124 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
4125 } 4125 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
4231 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); 4231 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
4232 ASSERT(osr_pc_offset_ == -1); 4232 ASSERT(osr_pc_offset_ == -1);
4233 osr_pc_offset_ = masm()->pc_offset(); 4233 osr_pc_offset_ = masm()->pc_offset();
4234 } 4234 }
4235 4235
4236 #undef __ 4236 #undef __
4237 4237
4238 } } // namespace v8::internal 4238 } } // namespace v8::internal
4239 4239
4240 #endif // V8_TARGET_ARCH_X64 4240 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698