Neil Rashbrook
6f6de04b5e
Make nanojit build non-debug with VC7.1 (bug 455210, r=danderson).
2008-09-24 10:21:49 -07:00
David Anderson
ccd5e825b9
Fixed jstracer's operator delete leaking out into other shared libraries (bug 452721, r=gal).
2008-09-23 18:12:53 -07:00
Andreas Gal
da5081c842
Properly calculate tree exit/call guards (bug 453397, r=danderson).
2008-09-19 18:45:57 -07:00
Andreas Gal
dab25898eb
Don't export operator new/delete except if really needed (452721, r=danderson).
2008-09-16 13:57:59 -07: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
Ginn Chen
a3f5be56ad
Added new macro AVMPLUS_UNIX to reduce redundancy and add Solaris support to the TM browser build (bug 452589, r=dvander).
2008-09-05 15:15:00 -07:00
Ginn Chen
76f8dc0daf
On x86 compilers without fastcall, simulate it when invoking traces and un-simulate it when invoking builtins (bug 452390, r=dvander).
2008-09-02 11:43:55 -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
b6b115b496
Fix for building on FreeBSD (bug 452315, patch from Jeremy Lea).
2008-09-02 10:21:41 -07:00
David Anderson
1be49b5c2e
Use mmap() instead of valloc() in nanojit, abort on mprotect() failure (bug 451946, patch+r from Asko Tontti).
2008-09-02 10:15:26 -07:00
Jesse Ruderman
5663d9166a
Turn NANO_DIE macro into NanoAssertFail function so that it shows up in stack traces. Having it appear in stack traces makes it clear the exit was due to an assertion failure rather than a real crash. Followup to bug 452674.
2008-08-28 19:07:49 -07:00
Andreas Gal
eb0c261390
When extending an outer tree from its nesting guard, the guard we actually exited on determines the typemap for the current frame and all inlined frames, whereas the nesting guard is consulted for all type information frames below the current frame.
2008-08-26 01:00:53 -07:00
David Anderson
36ea645fbe
Bug 451743 - On x86 processors, only use SSE2 if the processor supports it, otherwise default back to x87 FPU (r=gal, sr=mrbkap)
2008-08-22 12:21:27 -07:00
shaver@mozilla.org
d1f7543e1b
default to non-verbose for DEBUG, set TRACEMONKEY=verbose in env to go verbose
2008-08-20 10:15:42 -07:00
Andreas Gal
39d9d53d83
Back out multi-trees. There is absolutely no way this will be debugged in time for tomorrow. Need a bit more gdb man-power.
2008-08-19 23:28:13 -07:00
Andreas Gal
454c89d72b
Support multiple fragments with different entry maps per PC location.
2008-08-19 20:30:16 -07:00
David Anderson
d584e27cb8
Fixed compiling on AMD64.
2008-08-18 12:41:55 -07:00
Andreas Gal
bfcf6a784d
Write back outer tree frames, but exclude the current frame (which the next tree will do). This still crashes the trace-tests.js test case with nesting enabled and for the life of me I can't figure out why (try with TRACEMONKEY=nesting).
2008-08-14 01:44:32 -07:00
Andreas Gal
0530506440
Restore state of the outer frames in case of a nested exit. Should be feature complete but needs more debugging.
2008-08-13 21:34:41 -07:00
Andreas Gal
201341cfc5
Add nestedExit to InterpState and comment its fields.
2008-08-13 17:12:55 -07:00
Andreas Gal
fa09943222
Flexible call stack allocation with proper guarding for call stack overflows.
2008-08-13 13:51:59 -07:00
Andreas Gal
58cd4dc419
Introduce a large fixed-size native frame stack and store its ceiling in state->eos.
2008-08-12 21:39:44 -07:00
Andreas Gal
ed3125b915
Hands down the hardest bug I had to debug in TM so far. Make sure to read back any registers an inner tree might have changed before writing out the typemap for the nested_exit guard, otherwise we might be pointing to old stale pre-(inner-)loop state and pick an incorrect (in this case too narrow) type. fannkuch=2.8x with this.
2008-08-12 20:18:29 -07:00
David Anderson
c5a85f7524
Merge.
2008-08-11 16:14:29 -07:00
David Anderson
1b623f7d25
Added explicit deallocation (bug 443500, r=gal)
2008-08-11 16:01:21 -07:00
Andreas Gal
020e68ab1e
Remove default parameter for guard, specify MISMATCH_EXIT explicitly.
2008-08-11 15:40:04 -07:00
Brendan Eich
2991c66416
- Avoid unnecessary FASTCALL builtin wrappers for existing js_* library-private or friend functions, which could be (and now are) fastcall (JS_FASTCALL). A couple of builtins avoid name collisions by using js_Fast instead of just js_ as their name prefix.
...
- Use GCF_DONT_BLOCK from fastcall builtins that call into the GC allocator (mostly; a few places need help still, or better: need to avoid allocation).
- Cope with C clients of jscntxt.h and its include files (these hacks should go away).
- Naming convention and function definition line-break style nit-picks.
2008-08-10 00:39:18 -07:00
Andreas Gal
3f90159e8b
Remove ip from InterpState. Calculate the new pc after a trace side exit relative to lr->from->root->ip, which also works if we side exit on a different tree than we entered (which can happen in case of nested trees.)
2008-08-08 18:20:20 -07:00
Andreas Gal
c7be42f2f3
Add very preliminary nesting for trees. This is disabled by default. To enable set TRACEMONKEY=nesting in the environment.
2008-08-08 15:26:31 -07:00
Andreas Gal
6bd49e0d49
Make ip in InterpStruct const*.
2008-08-06 15:55:00 -07:00
Andreas Gal
86aa1f7ff7
If trees are not enabled, don't try to reuse state and param1.
2008-07-30 21:40:21 -07:00
Andreas Gal
afc7936599
Remember number of global slots known at that point in the trace in every side exit (forward-looking change to cope with dynamic collection of interned globals.)
2008-07-30 00:15:07 -07:00
David Anderson
60181b7fd2
Fixed some MSVC whinings, implemented rdtsc on win32
2008-07-29 19:19:51 -05:00
Andreas Gal
5a7ac301e6
Limit tree growth to side exits that expicitly declare that they want to be grown.
2008-07-29 11:13:41 -07:00
Andreas Gal
6126f5fa5c
Track the type of guards and react accordingly if we bail out on them. Guards that protect against out-of-memory conditions don't try to grow the tree. Instead we just resume the interpreter.
2008-07-27 16:18:53 -07:00
Andreas Gal
ecb79b1640
Determine ahead of time whether a side exit is a loop-terminating side exit instead of re-determining this at every side exit.
2008-07-25 01:44:40 -07:00
Andreas Gal
41e0593392
Maintain a separate frame for globals using InterpState->gp.
...
This will allow nested loops to access the globals interned by outer loops while at the same time sharing parts of the stack of the outer loop.
2008-07-23 23:18:02 -07:00
Andreas Gal
1c9c67b6a1
Write all the debug output to stdout (we can't easily make everything go to stderr, so this way at least it all goes into the same place.)
2008-07-18 14:13:31 -07:00
Andreas Gal
f309cf6b64
Try to clean up the memory allocation/deallocation through the avmplus glue code.
2008-07-17 21:31:50 -07:00
shaver@mozilla.org
9182a834c4
copy capacity when becoming another list
2008-07-16 23:11:17 -07:00
Andreas Gal
7c24d0f34d
Compilation fixes for gcc 4.2. Ripp out write-barrier code in our avmplus glue layer.
2008-07-15 15:58:43 -07:00
Andreas Gal
a81b83090e
Sync with TT.
2008-07-15 13:06:05 -07:00
Andreas Gal
9f761173f0
Added a callstack that will track the pc of the call that caused a function call to be inlined. This is necessary to recover from deep side exits inside inline functions. The callstack is subject to store elimination, so unnecessary stores to the stack will go dead automatically during compilation (i.e. if we inline a function that doesn't have side exits.)
2008-07-14 19:12:50 -07:00
shaver@mozilla.org
634b195855
the rest of the stdint defs, no idea why I didn't do them before
2008-07-10 20:25:57 -04:00
shaver@mozilla.org
34f7e86edf
use VirtualAlloc for Windows, since it lacks valloc
2008-07-10 18:39:51 -04:00
shaver@mozilla.org
0b285b6a7e
FASTCALL for Windows
2008-07-10 17:16:31 -04:00
shaver@mozilla.org
e2ed248ddf
int32_t, now available on Windows
2008-07-10 16:58:08 -04:00
shaver@mozilla.org
929e6f9e95
MSVC knows about intptr_t, and doesn't like our remix
2008-07-10 10:21:29 -04:00
shaver@mozilla.org
45b694dc35
I'm going to just keep bludgeoning these typedefs until they stick
2008-07-10 10:18:22 -04:00