shaver@mozilla.org
46b4c7def2
fix the secondary map-native guard
2008-07-13 00:09:24 -04:00
Brendan Eich
ba3c776fc2
js_ for library-extern names like math_sin.
2008-07-12 12:35:36 -07:00
shaver@mozilla.org
1764f72ffa
initialize traceMonitor in threadsafe builds
2008-07-12 09:57:23 -04:00
shaver@mozilla.org
6b30961e58
Guard against subzero array indices
2008-07-12 09:04:58 -04:00
Andreas Gal
3ccfc13098
Demote fneg to neg if input is known to be an integer (untested).
2008-07-12 00:34:10 -07:00
Andreas Gal
223f4f23f7
Merge.
2008-07-12 00:28:28 -07:00
Andreas Gal
b5e654f120
5 hours of debugging, and 9 keystrokes to fix it. That was one expensive bug. shaver's reduced fannkuch example works now. I think independently of this one we don't check properly for index underflow in dense arrays. Shaver is going to have to take a look at that (this fix makes fannkuch indexes not become negative, but doesn't explain why we crash so hard if they do become negative).
2008-07-12 00:27:21 -07:00
shaver@mozilla.org
b7dac1100d
add JSOP_NEG and tests
2008-07-12 00:20:48 -04:00
shaver@mozilla.org
fd5ac5b844
add Math.cos and Math.pow to the specialized-call party, and add tests
2008-07-12 00:03:33 -04:00
shaver@mozilla.org
d180a6755d
I will remember that stacked values are not boxed.
...
I will remember that stacked values are not boxed.
I will remember that stacked values are not boxed.
I will remember that stacked values are not boxed.
2008-07-11 23:04:29 -04:00
shaver@mozilla.org
9c69964575
Specialized tracing of Math.sin, as a proof of concept. Doesn't quite work due to regalloc mismatch, but close!
2008-07-11 22:59:09 -04:00
shaver@mozilla.org
8ffe777b5a
Incomplete stab at CALLPROP, added ABORT_TRACE for better diagnostics, make math_sin non-static in preparation for specializing call.
2008-07-11 20:59:10 -04:00
shaver@mozilla.org
873b045cb6
add reduced fannkuch version
2008-07-11 17:47:51 -04:00
Andreas Gal
3e39ec9d3b
Print meaningful filename/line-number info for trace entry/exit.
2008-07-11 13:57:16 -07:00
Andreas Gal
8c6dbda691
Report the source location when recording a trace.
2008-07-11 13:45:38 -07:00
Andreas Gal
b222836a73
Don't demote u2f conversions and sink the type cast into the side exit type map, because this loses the sign bit for unsigned values. We could fix this by adding an explicit unsigned type to the map, but for now I think we should stick to int/double only since there is the risk of fanning out trees. Crypto doesn't seem to use ush all that much so we should be ok performance-wise.
2008-07-11 13:18:29 -07:00
shaver@mozilla.org
5b91021cd9
Windows cares a lot more about where FASTCALL is; such a sensitive platform
2008-07-11 11:40:07 -04:00
shaver@mozilla.org
9122a6712f
begone, cat nspr/Version error noise
2008-07-11 11:20:44 -04:00
shaver@mozilla.org
492f8af02e
set some more config bits for Windows, mostly blindly
2008-07-11 11:02:14 -04:00
shaver@mozilla.org
179d15ca7b
turn on all the shift tests, and find a bug with it!
2008-07-11 10:50:57 -04:00
Andreas Gal
25951074bc
Brendan fixed global variable access in non-top level code so re-enable that in trace-test.js. We pass all of shaver's trace torture tests.
2008-07-11 00:53:06 -07:00
Andreas Gal
cd0b213cec
Poking around in the arm code, trying to make it not die miserabily with BUILD_OPT=1.
2008-07-11 00:46:44 -07:00
Andreas Gal
3f31810cee
Still trying to get the ARM register updating right.
2008-07-11 00:31:48 -07:00
Andreas Gal
5d93de0225
Trying to make arm work. Flying blind here.
2008-07-10 22:35:06 -07:00
Andreas Gal
bde4b2e588
Adjust sp/ip for ARM. Very useful when trying to run on ARM.
2008-07-10 22:29:06 -07:00
shaver@mozilla.org
6bb689e6c3
some ARM stuff
2008-07-11 01:27:06 -04:00
Andreas Gal
fe9354b377
Merge (no, really, can someone teach Mercurial to not do this?).
2008-07-10 22:12:04 -07:00
Andreas Gal
41ded9b128
Output the value if we can't enter a trace because of a type mismatch.
2008-07-10 22:10:02 -07:00
Brendan Eich
a17263a036
1. Fix !JS_THREADED_INTERP bugs in BRANCH and recording switch case generation.
...
2. Rename TraceRecorder op methods to record_JSOP_xxx to avoid shadowing JSOP_*
enumerators used inside jsopcode.h macros -- death to ::JSOP_*!
3. Added atoms TraceRecorder member for giant literal pool scripts.
4. Condition assert in TraceRecorder::test_property_cache_direct_slot to avoid
false positive when executing function code accessing a global.
2008-07-10 21:55:09 -07:00
shaver@mozilla.org
3cd4d74f76
here, have a _working_ Thumb back-end
2008-07-11 00:45:54 -04:00
shaver@mozilla.org
6f69036887
here, have a Thumb back-end
2008-07-11 00:40:26 -04:00
Andreas Gal
cc38ec5e21
Don't crash when expecting an int32 as double box in unbox but getting something else (and better debug output).
2008-07-10 21:23:32 -07:00
shaver@mozilla.org
5089017f47
only build JIT builtins if ENABLE_JIT, and lose antique *inlines.h
2008-07-11 00:10:27 -04:00
Andreas Gal
4cba5853d4
Merge.
2008-07-10 20:35:40 -07:00
Andreas Gal
4e34cfc559
IFEQ and IFNE are identical for us. We just expect the same boolean on the stack and side exit if not.
2008-07-10 20:35:19 -07:00
shaver@mozilla.org
b39149fe63
Build the JIT by default if we're on x86, and control enabling it for content
...
via javascript.options.content_jit.
2008-07-10 23:05:27 -04:00
shaver@mozilla.org
6d68b678b3
don't include jstracer.h (and thus nanojit, etc.) if not building with JS_TRACER
2008-07-10 22:19:15 -04:00
shaver@mozilla.org
66b22a063c
use a type that windows knows about for offset computation
2008-07-10 22:17:41 -04:00
shaver@mozilla.org
795a6bbef1
try to get alloca on Windows; remind me to strip these flailing commits before we merge
2008-07-10 22:10:48 -04:00
shaver@mozilla.org
03ad7cdff2
my turn to merge; had to happen eventually
2008-07-10 21:44:41 -04:00
shaver@mozilla.org
d08e7d5aa1
disable tracer for platforms not supported by nanojit
2008-07-10 21:43:05 -04:00
Andreas Gal
ca4e6419ee
shaver's favorite operating system of choice doesn't like templates, so de-template tracker since we use it with LInsp only anyway.
2008-07-10 18:42:04 -07:00
shaver@mozilla.org
db247b7d6c
some better OS_CFLAGS for Linux
2008-07-10 21:38:47 -04:00
shaver@mozilla.org
a82e389447
support non-JS_TRACER builds
2008-07-10 21:38:26 -04:00
shaver@mozilla.org
0695011b26
try to make alloca work for Windows
2008-07-10 21:37:49 -04:00
David Anderson
1bfa0a2b0e
Actually fixed ifeq/ifne fusion now.
2008-07-10 17:54:19 -07:00
Andreas Gal
c99a7ff3bd
Merge.
2008-07-10 17:42:25 -07:00
shaver@mozilla.org
f9a01d9be5
fix opcode math with the mighty hammer of casting
2008-07-10 20:41:55 -04:00
Andreas Gal
a72b1ecc06
Merge.
2008-07-10 17:41:45 -07:00
Andreas Gal
4a0541e2ae
nanojit doesn't support loads with non-constant offsets so don't do that
2008-07-10 17:41:24 -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
Andreas Gal
16eda7e83e
Merge.
2008-07-10 17:05:13 -07:00
Andreas Gal
e6cb4750e2
Steal the reference to cx from the BoxDouble call instead of observing the load.
2008-07-10 17:03:59 -07:00
Andreas Gal
4ad95932a2
Fixed the setelem a[i] bug.
2008-07-10 16:55:37 -07:00
David Anderson
e5ec5ac4b5
Nanojit needs a LINUX define (which may be my fault), fixing it here for now
2008-07-10 16:26:28 -07:00
shaver@mozilla.org
34f7e86edf
use VirtualAlloc for Windows, since it lacks valloc
2008-07-10 18:39:51 -04:00
shaver@mozilla.org
07c51d9867
interp needs tracer.h
2008-07-10 17:31:38 -04:00
shaver@mozilla.org
6a5deaf550
Decouple jscntxt.h from jstracer.h so that xpconnect doesn't try to include all of
...
nanojit.
2008-07-10 17:29:16 -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
60c7caba17
Unlike software developers, g++ doesn't like variable-sized arrays. Have some alloca!
2008-07-10 16:48:42 -04:00
shaver@mozilla.org
7b7430ef26
merge
2008-07-10 16:47:12 -04:00
David Anderson
8282c44200
Fixed guarding of eq+ifeq/ifne fusions and enabled tracing JSOP_GOTO (no-op)
2008-07-10 13:35:17 -07:00
Andreas Gal
1b8705e646
Root all strings and objects first when unboxing. Then box values that might trigger the GC (doubles/ints). This probably needs some performance tuning over time.
2008-07-10 13:24:49 -07:00
Andreas Gal
222a958b75
Merge.
2008-07-10 09:24:59 -07:00
Andreas Gal
ed0cfa6ce8
Don't concede an inch to ISO C++. Substract the size of array[1] from the overall struct size when allocating.
2008-07-10 09:22:01 -07:00
shaver@mozilla.org
36027eae9d
update trace-test.js, now crashes calling lsh() the second time
2008-07-10 10:45:11 -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
shaver@mozilla.org
853e2a057b
try to find malloc on Linux; this buildbot thing rules the school
2008-07-10 10:03:45 -04:00
shaver@mozilla.org
2e3334d255
use typedefs instead of stdint.h, because someone forgot to tell MSVC it was 2008
2008-07-10 09:52:34 -04:00
shaver@mozilla.org
2a0f9b6245
can't have zero-sized arrays in ISO C++, says gcc
2008-07-10 09:29:42 -04:00
shaver@mozilla.org
5e83315c4d
use stdint.h instead of typedefs to help Linux find intptr_t
2008-07-10 09:20:36 -04:00
shaver@mozilla.org
81163c8350
build nanojit
2008-07-10 09:12:53 -04:00
shaver@mozilla.org
47dc7b72e6
Make nanojit arch selection explicit in config/*, though for now only OS X and Linux
...
on x86.
2008-07-10 09:12:17 -04:00
shaver@mozilla.org
159a5fb1fd
rename builtins.tbl *back*, because nanojit expects that name, and whatever
...
--HG--
rename : js/src/jsbuiltins.tbl => js/src/builtins.tbl
2008-07-10 08:53:03 -04:00
shaver@mozilla.org
864f3dc9db
rename builtins.tbl to our usual form
...
--HG--
rename : js/src/builtins.tbl => js/src/jsbuiltins.tbl
2008-07-10 08:51:44 -04:00
shaver@mozilla.org
bf94c0c6b9
fix include ordering for THREADSAFE build
2008-07-10 08:40:43 -04:00
shaver@mozilla.org
0b4c4a7782
fix compilation, but possibly not logic, of shared-object defense
2008-07-10 08:05:25 -04:00
shaver@mozilla.org
8ae4979fc0
revert ancient shuffling of js_CompareAndSwap decl to fix THREADSAFE build
2008-07-10 07:57:18 -04:00
shaver@mozilla.org
24cf72a522
some build fixes to help in-browser and other-arch build
2008-07-10 07:56:36 -04:00
Andreas Gal
bdeea1b3cb
Prime the page cache during VM startup. This makes us eat the page cache allocation overhead there instead of during the first use. This is just a hotfix. We still need a rewrite of the page cache.
2008-07-09 23:47:17 -07:00
Andreas Gal
81a8b26765
Merge.
2008-07-09 23:42:46 -07:00
Andreas Gal
1dbb6a7d41
Backed out changeset 234230320093 (reducing code cache size due to startup issue.)
2008-07-09 23:42:27 -07:00
Andreas Gal
ca130e3cb2
Merge.
2008-07-09 19:12:09 -07:00
Brendan Eich
12d0fb7104
Always allocate gvars for top-level scripts if any global names are used -- may hurt some microbenchmarks but we can fix it via bug 441686.
2008-07-09 19:10:01 -07:00
Andreas Gal
0a93e4dd69
Assert if no gvar is allocated for an undeclared global.
2008-07-09 18:51:08 -07:00
Andreas Gal
40a15bccc7
Merge.
2008-07-09 18:25:36 -07:00
Andreas Gal
ef76c5d316
varobj is not passed through the chain. Make sure to use global->varobj for gvar access.
2008-07-09 18:25:10 -07:00
shaver@mozilla.org
efcff4a09f
More tests, working on crashes.
2008-07-09 21:09:11 -04:00
Brendan Eich
31b11b4e90
Merge.
2008-07-09 17:58:19 -07:00
Andreas Gal
76abd00d44
Reduce code cache size until we fix the page allocation code to not touch all the pages at startup (nanojit issues, assigned to gal).
2008-07-09 17:37:41 -07:00
Andreas Gal
4617cc628c
Fixed name/setname code to just track the value move instead of touching memory since we have global variables in our native frame now. We have to fix the page cache issues before we can benchmark this.
2008-07-09 17:15:27 -07:00
Brendan Eich
8d88185086
Condition fp->arg*/*vars usage on fp->callee, not fp->down.
2008-07-09 17:10:42 -07:00
Andreas Gal
9a72a1d41d
Add verbose native stack frame printing.
2008-07-09 17:09:22 -07:00
Brendan Eich
ab59004c84
Memoize implicit gvars in the interpreter, on assignment (JSOP_BINDNAME/JSOP_SETNAME); fix recoder l/r operand order bug.
2008-07-09 16:37:31 -07:00
Brendan Eich
20a5a9ef31
1. Fix inc to address the right result stack slot; 2. Require via assertions that the interpreter memoize implicit gvars (patch to do that next; bitwise-and will assert until that lands).
2008-07-09 15:15:32 -07:00
Blake Kaplan
bac9a8c577
Add missing #undef, clean up trailing whitespace.
2008-07-09 23:40:06 +02:00
Brendan Eich
2210ed4a21
Remove unnecessary JSOp cast.
2008-07-09 13:46:46 -07:00
Brendan Eich
d8cf234b33
Memoize global name gets and sets as if they refer to a declared gvar.
2008-07-09 11:42:31 -07:00