Chromium Code Reviews| Index: runtime/vm/code_generator_ia32.cc |
| =================================================================== |
| --- runtime/vm/code_generator_ia32.cc (revision 4139) |
| +++ runtime/vm/code_generator_ia32.cc (working copy) |
| @@ -757,7 +757,7 @@ |
| } |
| -void CodeGenerator::GenerateReturnEpilog() { |
| +void CodeGenerator::GenerateReturnEpilog(ReturnNode* node) { |
| // Unchain the context(s) up to context level 0. |
| int context_level = state()->context_level(); |
| ASSERT(context_level >= 0); |
| @@ -788,6 +788,12 @@ |
| } |
| __ LeaveFrame(); |
| __ ret(); |
| + // Add a NOP to make return code pattern 5 bytes long for patching |
| + // in breakpoints during debugging. |
|
srdjan
2012/02/11 11:58:50
Since we do not execute this code, would it make s
hausner
2012/02/13 17:27:10
If it isn't executed, it seems irrelevant whether
|
| + __ nop(1); |
| + AddCurrentDescriptor(PcDescriptors::kReturn, |
| + AstNode::kNoId, |
|
srdjan
2012/02/11 11:58:50
Why not use return node id?
hausner
2012/02/13 17:27:10
No particular reason. Will do in next change.
|
| + node->token_index()); |
| #ifdef DEBUG |
| __ Bind(&wrong_stack); |
| @@ -837,7 +843,7 @@ |
| String::ZoneHandle(String::NewSymbol("function result"))); |
| } |
| } |
| - GenerateReturnEpilog(); |
| + GenerateReturnEpilog(node); |
| } |