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

Side by Side Diff: src/mips/builtins-mips.cc

Issue 215853005: Check stack limit in ArgumentAdaptorTrampoline. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix ws Created 6 years, 8 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/ia32/builtins-ia32.cc ('k') | src/runtime.js » ('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 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 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 // Make a2 the space we have left. The stack might already be overflowed 1298 // Make a2 the space we have left. The stack might already be overflowed
1299 // here which will cause a2 to become negative. 1299 // here which will cause a2 to become negative.
1300 __ subu(a2, sp, a2); 1300 __ subu(a2, sp, a2);
1301 // Check if the arguments will overflow the stack. 1301 // Check if the arguments will overflow the stack.
1302 __ sll(t3, v0, kPointerSizeLog2 - kSmiTagSize); 1302 __ sll(t3, v0, kPointerSizeLog2 - kSmiTagSize);
1303 __ Branch(&okay, gt, a2, Operand(t3)); // Signed comparison. 1303 __ Branch(&okay, gt, a2, Operand(t3)); // Signed comparison.
1304 1304
1305 // Out of stack space. 1305 // Out of stack space.
1306 __ lw(a1, MemOperand(fp, kFunctionOffset)); 1306 __ lw(a1, MemOperand(fp, kFunctionOffset));
1307 __ Push(a1, v0); 1307 __ Push(a1, v0);
1308 __ InvokeBuiltin(Builtins::APPLY_OVERFLOW, CALL_FUNCTION); 1308 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION);
1309 // End of stack check. 1309 // End of stack check.
1310 1310
1311 // Push current limit and index. 1311 // Push current limit and index.
1312 __ bind(&okay); 1312 __ bind(&okay);
1313 __ mov(a1, zero_reg); 1313 __ mov(a1, zero_reg);
1314 __ Push(v0, a1); // Limit and initial index. 1314 __ Push(v0, a1); // Limit and initial index.
1315 1315
1316 // Get the receiver. 1316 // Get the receiver.
1317 __ lw(a0, MemOperand(fp, kRecvOffset)); 1317 __ lw(a0, MemOperand(fp, kRecvOffset));
1318 1318
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 __ bind(&dont_adapt_arguments); 1569 __ bind(&dont_adapt_arguments);
1570 __ Jump(a3); 1570 __ Jump(a3);
1571 } 1571 }
1572 1572
1573 1573
1574 #undef __ 1574 #undef __
1575 1575
1576 } } // namespace v8::internal 1576 } } // namespace v8::internal
1577 1577
1578 #endif // V8_TARGET_ARCH_MIPS 1578 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698