Revision: 8568
Author: [email protected]
Date: Thu Jul 7 23:47:09 2011
Log: MIPS: port Introduce code flushing of RegExp code.
Ported r8532 (c9db503)
Original commit message:
Due to issues relating mostly to chrome extensions we have lately been
running into OOMs that are caused by our executable space running
out. This change introduces flushing of code from regexps if we have
not used the code for 5 mark sweeps.
The approach is different from the normal function code flusing. Here
we make a copy of the code inside the data array, and exchange the
original code with a smi determined by the sweep_generation (a new
heap variable increased everytime we do mark sweep/compact). If we
encounter a smi in EnsureCompiled we simply reinstate the code
object. If, in the marking phase of mark sweep, we find a regexp that
already have a smi in the code field, and this is more than 5
generations old we flush the code from the saved index.
BUG=
TEST=
Review URL: http://codereview.chromium.org//7324018
Patch from Paul Lind <[email protected]>.
http://code.google.com/p/v8/source/detail?r=8568
Modified:
/branches/bleeding_edge/src/mips/code-stubs-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Fri Jul 1 00:50:46
2011
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Thu Jul 7 23:47:09
2011
@@ -4592,10 +4592,9 @@
__ movz(t9, t0, a0); // If UC16 (a0 is 0), replace t9
w/kDataUC16CodeOffset.
// Check that the irregexp code has been generated for the actual string
- // encoding. If it has, the field contains a code object otherwise it
- // contains the hole.
- __ GetObjectType(t9, a0, a0);
- __ Branch(&runtime, ne, a0, Operand(CODE_TYPE));
+ // encoding. If it has, the field contains a code object otherwise it
contains
+ // a smi (code flushing support).
+ __ JumpIfSmi(t9, &runtime);
// a3: encoding of subject string (1 if ASCII, 0 if two_byte);
// t9: code
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev