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

Side by Side Diff: src/codegen-arm.cc

Issue 10223: Fix OOM handler code. Old code didn't pop up the state slot. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 1 month 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 | 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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 3841 matching lines...) Expand 10 before | Expand all | Expand 10 after
3852 3852
3853 // Set pending exception and r0 to out of memory exception. 3853 // Set pending exception and r0 to out of memory exception.
3854 Failure* out_of_memory = Failure::OutOfMemoryException(); 3854 Failure* out_of_memory = Failure::OutOfMemoryException();
3855 __ mov(r0, Operand(reinterpret_cast<int32_t>(out_of_memory))); 3855 __ mov(r0, Operand(reinterpret_cast<int32_t>(out_of_memory)));
3856 __ mov(r2, Operand(ExternalReference(Top::k_pending_exception_address))); 3856 __ mov(r2, Operand(ExternalReference(Top::k_pending_exception_address)));
3857 __ str(r0, MemOperand(r2)); 3857 __ str(r0, MemOperand(r2));
3858 3858
3859 // Restore the stack to the address of the ENTRY handler 3859 // Restore the stack to the address of the ENTRY handler
3860 __ mov(sp, Operand(r3)); 3860 __ mov(sp, Operand(r3));
3861 3861
3862 // restore parameter- and frame-pointer and pop state. 3862 // Stack layout at this point. See also PushTryHandler
3863 __ ldm(ia_w, sp, r3.bit() | pp.bit() | fp.bit()); 3863 // r3, sp -> next handler
3864 // state (ENTRY)
3865 // pp
3866 // fp
3867 // lr
3868
3869 // Discard ENTRY state (r2 is not used), and restore parameter-
3870 // and frame-pointer and pop state.
3871 __ ldm(ia_w, sp, r2.bit() | r3.bit() | pp.bit() | fp.bit());
3864 // Before returning we restore the context from the frame pointer if not NULL. 3872 // Before returning we restore the context from the frame pointer if not NULL.
3865 // The frame pointer is NULL in the exception handler of a JS entry frame. 3873 // The frame pointer is NULL in the exception handler of a JS entry frame.
3866 __ cmp(fp, Operand(0)); 3874 __ cmp(fp, Operand(0));
3867 // Set cp to NULL if fp is NULL. 3875 // Set cp to NULL if fp is NULL.
3868 __ mov(cp, Operand(0), LeaveCC, eq); 3876 __ mov(cp, Operand(0), LeaveCC, eq);
3869 // Restore cp otherwise. 3877 // Restore cp otherwise.
3870 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset), ne); 3878 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset), ne);
3871 if (kDebug && FLAG_debug_code) __ mov(lr, Operand(pc)); 3879 if (kDebug && FLAG_debug_code) __ mov(lr, Operand(pc));
3872 __ pop(pc); 3880 __ pop(pc);
3873 } 3881 }
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
4275 // Slow-case: Non-function called. 4283 // Slow-case: Non-function called.
4276 __ bind(&slow); 4284 __ bind(&slow);
4277 __ mov(r0, Operand(argc_)); // Setup the number of arguments. 4285 __ mov(r0, Operand(argc_)); // Setup the number of arguments.
4278 __ InvokeBuiltin(Builtins::CALL_NON_FUNCTION, JUMP_JS); 4286 __ InvokeBuiltin(Builtins::CALL_NON_FUNCTION, JUMP_JS);
4279 } 4287 }
4280 4288
4281 4289
4282 #undef __ 4290 #undef __
4283 4291
4284 } } // namespace v8::internal 4292 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698