Commit Graph

52 Commits

Author SHA1 Message Date
Nicholas Nethercote
9df38f0476 Bug 488775 - TM: widen LIR instructions. r=graydon,edwsmith 2009-05-09 14:38:34 -04:00
David Mandelin
39b9e72a0c Bug 475115: LIR_jtbl: jump tables to implement jsop_tableswitch, r=gal,r=edwsmith 2009-02-11 17:40:27 -08:00
Andreas Gal
0491e2d094 Add skip() to LirFilter so we can pass skip-requests through instead of going to the LirBufWriter directly (477089, r=shaver). 2009-02-05 11:14:44 -08:00
Vladimir Vukicevic
4aacd882a6 b=476786; tracemonkey crash with verbose in debug mode; r=gal 2009-02-03 21:20:59 -08:00
Robert Sayre
cd3999104d Merge m-c to tm. 2009-01-26 13:54:59 -08:00
David Anderson
0e4418db16 Bug 473880 - TM: Add a way to keep stack values alive without emitting guard code. r=gal. 2009-01-23 15:21:55 -06:00
Andreas Gal
1d277bc633 Backout all patches since last mozilla-central merge (Thu Jan 22 19:14:02 2009 -500 by sayrer). 2009-01-25 02:58:22 -08:00
David Anderson
ee93602364 Bug 473880 - TM: Add a way to keep stack values alive without emitting guard code. r=gal. 2009-01-23 15:21:55 -06:00
Ginn Chen
9473943bf6 Bug 474757 Several build failures on Solaris build for js/src r=danderson 2009-01-23 15:57:54 +08:00
Andreas Gal
a59109830e Use a single lirbuf for the tracer and rewind lirbuf during GC (471821, r=danderson). 2009-01-02 10:55:02 -08:00
David Mandelin
90baccb99f Bug 471602 part 1: make regexp compiler use one shared LIR buffer, r=gal 2008-12-31 16:41:33 -08:00
Andreas Gal
21b0d26f45 Allocate the next page to be used in a lirbuf early to avoid running OOM during a page overflow (471316, r=danderson). 2008-12-30 17:03:43 -08:00
Graydon Hoare
ba3dc13800 Bug 468484 - Minor adjustments to match changes in tamarin, r=gal. 2008-12-10 17:25:46 -08:00
Rick Reitmaier
a70c5b7d48 Bug 468484 - LirBuffer has been modified to provide advance warning of out of memory (OOM) conditions, r=danderson.
LirBuffer has been modified to provide advance warning of
out of memory (OOM) conditions.

A new page is allocated LIR_BUF_THRESHOLD instructions
prior to reaching the end of page.  If the page allocation fails,
call to outOmem() will return true.  The buffer can still be
safely written to during during this period but it is assumed
the higher level code will catch this condition and handle
it appropriately as writing LIR_BUF_THRESHOLD instructions
past this point will cause a crash.

This opportunity was also taken to re-factor the code for
LirBufWriter making it more platform agnostic.
- All non-LInsp data in the instruction stream is now managed
  through structures that overlay the memory region.
- prepFor() was added to replace the multiple
  ensureReferenceable() calls for each instruction.
- insCall() was also modified somewhat in that the
  arguments are now stored growing downwards from
  the position of the pseudo instruction LirCallIns.

CodegenLIR now has LirBuffer checks at the granularity
of each emitXXX() call that is exposed publicly.  This seemed
like a reasonable approach since a client could potentially
call at this level indefinitely.  If we want to reduce the frequency
of these checks then we'd have to push the check up into the
verifier.

Assembler OOM handling has also changed.  The variable
_startingIns was added and contains the location at which
the assembler began writing code for the current
begin/assem/end sequence.   If an OOM condition occurs
the assembler will reset the current instruction pointer
to _startingIns, effectively overwriting the code that has
been generated.  This allows the assembler to produce
code indefinitely (and without error) until the upper layers
have noticed the error and respond accordingly.

The constant LARGEST_UNDERRUN_PROT was added
and needs to be set to a platform specific value that is
equal to or greater than the number of NIns written for
the largest possible instruction.  i.e.  you cannot write
more than this number of NIns to the buffer for each
call to underrunProtect().
2008-11-14 12:46:35 -08:00
Andreas Gal
cdbe1015e3 Don't attempt to do CSE across labels (465276, r=danderson). 2008-11-17 00:05:29 -08:00
Jeff Walden
c90c1d272e Bug 463697 - Need an equivalent to jsopcode.tbl, but for LIR opcodes/instructions, take two. r=gal, r=edwsmith on the first iteration as well 2008-11-08 01:45:50 -08:00
Andreas Gal
51726b48f9 Backed out changeset cb559a14ad77 2008-11-10 19:14:00 -08:00
Jeff Walden
932287a573 Bug 463697 - Need an equivalent to jsopcode.tbl, but for LIR opcodes/instructions. r=gal, r=edwsmith 2008-11-08 01:45:50 -08:00
Andreas Gal
43daeaca87 Don't spill type definitions in avmplus.h into the global namespace (462288, r=danderson). 2008-11-07 15:52:51 -08:00
David Anderson
db369008ec Fixed memory leak in LInsHashSet (bug 462826, r=gal). 2008-11-03 19:43:47 -08:00
David Mandelin
f8d1b7798b Preserve param1 over loop iters if it is used, desk r=danderson 2008-10-31 16:48:14 -07:00
Andreas Gal
4eafb60801 Add 16-bit non-volatile loads to nanojit (454301, r=danderson). 2008-10-30 14:17:42 -07:00
Graydon Hoare
95bed8b2ed Bug 461205 - make callee-save LIR_param use optional. r=gal,edwsmith 2008-10-22 14:32:37 -07:00
Andreas Gal
b14d526b66 Merge. 2008-10-21 17:50:52 -07:00
Andreas Gal
ec7efc925c Remove code to unlink trees to reduce the size of GuardRecord. Allow GuardRecords to share one common SideExit structure. The VM places both explicitly into the LIR (460538, r=danderson). 2008-10-21 17:50:32 -07:00
Edwin Smith
d238c8bb21 remove dead refs to non-existant class RegionTracker 2008-10-20 10:15:07 -07:00
Graydon Hoare
bf84bf6273 Merge tamarin-redux (nanojit2) into tracemonkey (457786, r=edwsmith,gal,danderson). 2008-10-13 13:29:18 -07:00
Jason Orendorff
a27d101dab Bug 458735 - Improve internal API for traceable natives (r=brendan, nanojit r=edwsmith) 2008-10-08 17:08:33 -05:00
Boris Zbarsky
ffd5e8306f Adding a few more comments 2008-10-08 14:37:03 -04:00
Andreas Gal
5fdd5d2b67 Properly handle cmov and sse2 flags, and put them in a central place not into each platform-dependant assembler (457355, r=danderson). 2008-09-26 20:39:21 -07:00
Boris Zbarsky
c504a551d6 Adding some comments 2008-09-19 17:54:49 -04:00
Ginn Chen
2763e5d63e Make TraceMonkey build on Solaris x86 with Sun Studio 12 (bug 452588, r=danderson). 2008-09-05 16:56:03 -07:00
David Anderson
85d4033733 Fixed a verbosity mode memory leak in LirNameMap::addName (bug 453895, r=sayrer). 2008-09-05 16:05:13 -07:00
David Anderson
ceb2e8139c Build fixes for MSVC 7.1 and mingw (bug 451881, patch from neil@parkwaycc.co.uk). 2008-09-02 10:28:14 -07:00
David Anderson
ccc26331ca Removed INS_CONSTPTR use with JSVAL_TAG to discourage future 64-bit problems. Fixed 32-bit build. 2008-08-27 16:32:11 -07:00
David Anderson
d0d64bbeff Added LIR_qior/pior. Fixed more AMD64 page jumping bugs. Fixed some other AMD64 usage bugs in jstracer. 2008-08-27 16:08:59 -07:00
David Anderson
2a4faa131c Fixed crashing with the incremental allocation changes. Very long jumps are still a problem but at least now we assert. 2008-08-26 15:15:15 -07:00
David Anderson
9a5b3b4307 AMD64 trace-tests.js passes now (hacked in LIR_qcmov opcode, corrected builtin return types). 2008-08-19 17:19:19 -07:00
David Anderson
b39fadd1f3 Updated nanojit for the AMD64 patch. 2008-08-18 12:32:14 -07:00
Blake Kaplan
40e749ecc6 bug 450765 - Fix aliasing in LIR.h 2008-08-15 09:55:32 -07:00
Andreas Gal
95c7647b28 Add constvalp and isconstp to LIR instructions (nanojit). 2008-08-12 17:37:38 -07:00
David Anderson
1b623f7d25 Added explicit deallocation (bug 443500, r=gal) 2008-08-11 16:01:21 -07:00
Andreas Gal
f0c74cce54 Sync with tamarin-tracing/nanojit tip. 2008-07-31 13:28:12 -07:00
David Anderson
5dca2ad552 Synced nanojit with TT tip. 2008-07-16 14:21:31 -07:00
Andreas Gal
d9110d8393 Aliasing cleanup for LIR.h. Patch submitted for upstream review. 2008-07-15 16:17:34 -07:00
Andreas Gal
a81b83090e Sync with TT. 2008-07-15 13:06:05 -07:00
David Anderson
202828fb20 Merged with tamarin-tracing (Moved SideExit and GuardRecord out of nanojit, improved labelling) 2008-07-08 17:09:53 -07:00
Andreas Gal
697a294d14 Sync up with TT tip. 2008-07-01 14:46:10 -07:00
Andreas Gal
e6b28ce4f8 Sync with TT-tip. 2008-06-30 15:33:41 -07:00
Andreas Gal
4678be95aa Fix a bug in tracing can_do_fast_inc_dec (wasn't tracking a copy and traced incorrect code). Merge with TT tip. 2008-06-24 15:57:33 -07:00