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

Side by Side Diff: src/arm/lithium-codegen-arm.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 | « no previous file | 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 4486 matching lines...) Expand 10 before | Expand all | Expand 10 after
4497 int current_pc = masm()->pc_offset(); 4497 int current_pc = masm()->pc_offset();
4498 int patch_size = Deoptimizer::patch_size(); 4498 int patch_size = Deoptimizer::patch_size();
4499 if (current_pc < last_lazy_deopt_pc_ + patch_size) { 4499 if (current_pc < last_lazy_deopt_pc_ + patch_size) {
4500 int padding_size = last_lazy_deopt_pc_ + patch_size - current_pc; 4500 int padding_size = last_lazy_deopt_pc_ + patch_size - current_pc;
4501 ASSERT_EQ(0, padding_size % Assembler::kInstrSize); 4501 ASSERT_EQ(0, padding_size % Assembler::kInstrSize);
4502 while (padding_size > 0) { 4502 while (padding_size > 0) {
4503 __ nop(); 4503 __ nop();
4504 padding_size -= Assembler::kInstrSize; 4504 padding_size -= Assembler::kInstrSize;
4505 } 4505 }
4506 } 4506 }
4507 last_lazy_deopt_pc_ = current_pc; 4507 last_lazy_deopt_pc_ = masm()->pc_offset();
4508 } 4508 }
4509 4509
4510 4510
4511 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { 4511 void LCodeGen::DoLazyBailout(LLazyBailout* instr) {
4512 EnsureSpaceForLazyDeopt(); 4512 EnsureSpaceForLazyDeopt();
4513 ASSERT(instr->HasEnvironment()); 4513 ASSERT(instr->HasEnvironment());
4514 LEnvironment* env = instr->environment(); 4514 LEnvironment* env = instr->environment();
4515 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); 4515 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
4516 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 4516 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
4517 } 4517 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
4621 ASSERT(osr_pc_offset_ == -1); 4621 ASSERT(osr_pc_offset_ == -1);
4622 osr_pc_offset_ = masm()->pc_offset(); 4622 osr_pc_offset_ = masm()->pc_offset();
4623 } 4623 }
4624 4624
4625 4625
4626 4626
4627 4627
4628 #undef __ 4628 #undef __
4629 4629
4630 } } // namespace v8::internal 4630 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698