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

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

Issue 7837023: Fix a bug in abrupt exit from with or catch inside finally. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed platform-specific code from platform-independent files. 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/full-codegen.cc ('k') | src/mips/full-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 4330 matching lines...) Expand 10 before | Expand all | Expand 10 after
4341 // Uncook return address. 4341 // Uncook return address.
4342 __ pop(edx); 4342 __ pop(edx);
4343 __ SmiUntag(edx); 4343 __ SmiUntag(edx);
4344 __ add(Operand(edx), Immediate(masm_->CodeObject())); 4344 __ add(Operand(edx), Immediate(masm_->CodeObject()));
4345 __ jmp(Operand(edx)); 4345 __ jmp(Operand(edx));
4346 } 4346 }
4347 4347
4348 4348
4349 #undef __ 4349 #undef __
4350 4350
4351 #define __ ACCESS_MASM(masm())
4352
4353 FullCodeGenerator::NestedStatement* FullCodeGenerator::TryFinally::Exit(
4354 int* stack_depth,
4355 int* context_length) {
4356 // The macros used here must preserve the result register.
4357
4358 // Because the handler block contains the context of the finally
4359 // code, we can restore it directly from there for the finally code
4360 // rather than iteratively unwinding contexts via their previous
4361 // links.
4362 __ Drop(*stack_depth); // Down to the handler block.
4363 if (*context_length > 0) {
4364 // Restore the context to its dedicated register and the stack.
4365 __ mov(esi, Operand(esp, StackHandlerConstants::kContextOffset));
4366 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), esi);
4367 }
4368 __ PopTryHandler();
4369 __ call(finally_entry_);
4370
4371 *stack_depth = 0;
4372 *context_length = 0;
4373 return previous_;
4374 }
4375
4376
4377 #undef __
4378
4351 } } // namespace v8::internal 4379 } } // namespace v8::internal
4352 4380
4353 #endif // V8_TARGET_ARCH_IA32 4381 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698