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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 22801003: Patch CEntry stub to swallow exception if liveedit/restart frame needs it. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: add test Created 7 years, 4 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 4845 matching lines...) Expand 10 before | Expand all | Expand 10 after
4856 JumpIfOOM(masm, eax, ecx, &already_have_failure); 4856 JumpIfOOM(masm, eax, ecx, &already_have_failure);
4857 __ mov(eax, reinterpret_cast<int32_t>(Failure::OutOfMemoryException(0x1))); 4857 __ mov(eax, reinterpret_cast<int32_t>(Failure::OutOfMemoryException(0x1)));
4858 __ bind(&already_have_failure); 4858 __ bind(&already_have_failure);
4859 __ mov(Operand::StaticVariable(pending_exception), eax); 4859 __ mov(Operand::StaticVariable(pending_exception), eax);
4860 // Fall through to the next label. 4860 // Fall through to the next label.
4861 4861
4862 __ bind(&throw_termination_exception); 4862 __ bind(&throw_termination_exception);
4863 __ ThrowUncatchable(eax); 4863 __ ThrowUncatchable(eax);
4864 4864
4865 __ bind(&throw_normal_exception); 4865 __ bind(&throw_normal_exception);
4866
4867 #ifdef ENABLE_DEBUGGER_SUPPORT
4868 Label proceed_throwing;
4869 ExternalReference c_entry_frame_to_ignore_exception =
4870 ExternalReference(Debug_Address::CEntryFrameToIgnoreException(),
4871 masm->isolate());
4872
4873 __ xor_(ecx, ecx);
4874 __ mov(edx, Operand::StaticVariable(c_entry_frame_to_ignore_exception));
4875 __ mov(Operand::StaticVariable(c_entry_frame_to_ignore_exception), ecx);
4876
4877 __ cmp(ebp, edx);
Yang 2013/09/13 09:47:56 Instead of these 4 instructions, you could just _
Peter.Rybin 2013/09/19 15:35:31 Thanks a lot. I also moved "clear" statement below
4878
4879 __ j(not_equal, &proceed_throwing, Label::kNear);
4880
4881 __ LeaveExitFrame(save_doubles_ == kSaveFPRegs);
4882 __ ret(0);
4883
4884 __ bind(&proceed_throwing);
4885 #endif // ENABLE_DEBUGGER_SUPPORT
4886
4866 __ Throw(eax); 4887 __ Throw(eax);
4867 } 4888 }
4868 4889
4869 4890
4870 void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { 4891 void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
4871 Label invoke, handler_entry, exit; 4892 Label invoke, handler_entry, exit;
4872 Label not_outermost_js, not_outermost_js_2; 4893 Label not_outermost_js, not_outermost_js_2;
4873 4894
4874 ProfileEntryHookStub::MaybeCallEntryHook(masm); 4895 ProfileEntryHookStub::MaybeCallEntryHook(masm);
4875 4896
(...skipping 2838 matching lines...) Expand 10 before | Expand all | Expand 10 after
7714 __ bind(&fast_elements_case); 7735 __ bind(&fast_elements_case);
7715 GenerateCase(masm, FAST_ELEMENTS); 7736 GenerateCase(masm, FAST_ELEMENTS);
7716 } 7737 }
7717 7738
7718 7739
7719 #undef __ 7740 #undef __
7720 7741
7721 } } // namespace v8::internal 7742 } } // namespace v8::internal
7722 7743
7723 #endif // V8_TARGET_ARCH_IA32 7744 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/debug.h ('k') | src/liveedit.cc » ('j') | src/x64/code-stubs-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698