Andreas Gal
a69aadfc0c
Backed out changeset 61b9209c186f
2008-09-15 19:59:06 -07:00
Andreas Gal
62bd202b55
Backed out changeset 87fe68f51647
2008-09-15 17:09:25 -07:00
Andreas Gal
81a9e63bad
Demote modulo operation with a constant non-zero right hand side (451788).
2008-09-15 15:59:25 -07:00
Andreas Gal
381cd1034e
Merge.
2008-09-15 15:01:44 -07:00
Andreas Gal
f30af5f21a
Properly handle floating point array indexes (453261, r=brendan).
2008-09-15 15:00:40 -07:00
Vladimir Vukicevic
79578d6b7c
b=454530; misc trace abort fixes (trace String.concat); r=brendan
2008-09-15 17:30:05 -04:00
Andreas Gal
c491382ad6
Trace slow array get/set of indexed props (453261, r=brendan).
2008-09-15 00:54:28 -07:00
Brendan Eich
112d38d453
TraceRecorder::record_SetPropMiss mis-layered on top of record_SetPropHit (454689, r=mrbkap).
2008-09-11 15:53:00 -07:00
Brendan Eich
4d9e907868
Avoid needless prototype-shape purges (454035, r=igor).
2008-09-09 09:57:10 -07:00
Blake Kaplan
c5129f2eb5
Trace Math.max. r=brendan
2008-09-08 20:06:58 -07:00
David Anderson
c1ce4738ef
Trace through parseInt(double), bug 454037 r=gal+brendan.
2008-09-07 02:41:10 -05:00
Brendan Eich
1fb3f74e6e
Merge.
2008-09-05 18:34:16 -07:00
Brendan Eich
db83c7d830
Checkpoint arguments tour-de-force (453730).
2008-09-05 18:29:08 -07:00
David Anderson
491653583c
Trace through Math.log as a known native (bug 453868, r=brendan).
2008-09-05 14:25:01 -07:00
Brendan Eich
6c38424f38
Use js_NaN global that we exported from jsnum.cpp, instead of cx->runtime->jsNaN.
2008-09-04 22:30:04 -07:00
Brendan Eich
c5bd5d0ffc
Put the trace-recording/executing flag in the trace monitor to handle many contexts per thread (451666, r=gal).
2008-09-03 00:38:24 -07:00
Vladimir Vukicevic
7f4931f5db
b=449526, TM: fix up ARM code generation / softfloat
2008-09-02 22:29:23 -07:00
Brendan Eich
9bb95d5ac9
Fix bool FASTCALL vs. Nanojit calling convention bug, also some non-bool whoppers caught in the process (453361, r=mrbkap).
2008-09-02 15:37:22 -07:00
Ginn Chen
ac35527af5
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
Brendan Eich
9f541e1e76
Kind of an Array initialiser tour-de-force for bug 452878:
...
1. Split FastNewArray from FastNewObject built-in for greater speed/specialization and further splitting into Array_1str, etc.
2. Add Array_1str, Array_2obj, and Array_3num builtins for benchmarked new Array(...) constructions.
3. Export ARRAY_SET_DENSE_LENGTH and ARRAY_GROWBY via jsarray.h to jstracer.cpp.
4. Tweaked SetArrayElement to make common/best case code be the predicted/prefetched path.
5. js_MakeArraySlow now preserves the pre-slow length in JSSLOT_ARRAY_COUTN as a jsval-tagged int if possible -- this will help the tracer avoid aborting on dense arrays that turned slow but not sparse by addition of a named property.
6. Export js_fun_apply and js_Object from their respective .cpp files, in these cases just to jstracer.cpp via local prototypes (no .h files involved).
7. More INS_CONSTPTR and INS_CONST macrology for better names in trace debug spew.
8. Fix TraceRecorder::test_property_cache to avoid aborting on JSOP_SETNAME that creates a new global, by setting it to undefined so it can be lazily imported. This helps 3d-raytrace.js, which has an unintended global loop control variable in a function.
9. JSTraceableNative loses its premature-deadwood tclasp member (my bad).
10. TraceRecorder::record_JSOP_NEW() handles 'new Object' now along with the 'new Array' variations. I also cut down the copy-paste code from JSOP_CALL's record method to mostly what is needed now.
11. Add KNOWN_NATIVE_DECL macro for concise prototype of library-private js_* native functions, and alphabetized the lists (too long for any other order to be winning).
12. Big honking special case for foo.apply(obj, [str]), which we can generalize as needed. Helps string-tagcloud.js. What's cool is how tracing allows us to rewrite this to foo(str) with this set to obj, eliminating the Function.prototype.apply. This requires some rewriting in JSOP_ENDINIT's record method.
2008-09-01 01:24:58 -07:00
Andreas Gal
f8b0c1a712
Merge.
2008-08-29 17:35:34 -07:00
Andreas Gal
483b87376f
Add builtins for toLowerCase, toUpperCase and replace(str,str) (452885, r=mrbkap).
2008-08-29 17:35:00 -07:00
Brendan Eich
3a2ac2f52b
Don't let GC run when recording.
2008-08-29 16:04:54 -07:00
Andreas Gal
5c07f4b0a6
If the inner tree cannot be adjusted to match the call site of the outer tree because it uses an int where the outer tree uses a double, trash the inner tree, not the outer one. In CallTree, return the innermost guard we return from, not the outermost one. Jump over at most 1 loop edge that doesn't go back to our own header, not an arbitrary amount.
2008-08-28 14:24:58 -07:00
Brendan Eich
90760c4316
Record JSOP_IN (452563, r=gal).
2008-08-27 23:00:43 -07:00
Andreas Gal
cbc678d679
Fix trashing of inner trees. Keep track of trees that call to a tree and flush them as well since they directly embed the code address. Since flushing an inner tree might invalidate the tree we are currently compiling, trees are now trashed in the destructor of TraceRecorder.
2008-08-27 17:25:56 -07:00
Brendan Eich
14385ff81e
Rename gcDontBlock to runningJittedCode, and assert it's false on entry to js_Interpret (for 451657, but not the fix, just prolog).
2008-08-25 23:08:21 -07:00
Blake Kaplan
dc89b88df1
Bug 451782 - Trace Math.ceil. r=brendan
2008-08-25 16:54:02 -07:00
Blake Kaplan
4877f1a9f6
Fixed js_String_p_split passing in an undersized array.
2008-08-21 15:17:47 -07:00
Robert Sayre
7146ca68f4
Bug 451580, fix string split assertions and return values. Tests fail with JIT on for other reasons, it seems. r=shaver
2008-08-21 14:06:42 -04:00
Brendan Eich
370aa60e06
Merge.
2008-08-21 04:17:49 -07:00
Andreas Gal
720ec58168
Remove FastEval builtin.
2008-08-21 04:17:17 -07:00
Brendan Eich
11844b50d1
Add split built-in, also sort knownNatives for my own sanity (should sort builtins.tbl and jsbuiltins.cpp by function while at it, but too tired).
2008-08-21 04:13:07 -07:00
Brendan Eich
ee749b6a3b
Remove lambda-replace built-in, it's not safe to record into a nested js_Interpret.
2008-08-21 01:39:16 -07:00
d65112e26b
trace |new Array|, via the magic of copy and paste
2008-08-21 00:50:20 -07:00
Brendan Eich
12c5cd0bec
1. Add activeCallOrGlobalSlot, used by JSOP_NAME, JSOP_CALLNAME, etc. recorders to cope with Call objects on the scope chain, if they represent still-active frames covered by callDepth.
...
2. Add builtin for eval, to be optimized further, to handle very short eval'ed programs as found in popular benchmarks.
3. Add common scopeChain TraceRecorder helper, to generate the LIR to load cx->fp->scopeChain.
4. Add ABORT_TRACE to LeaveFrame for clarity.
2008-08-20 22:40:39 -07:00
David Anderson
cd6b08098f
Merge.
2008-08-20 09:50:41 -07:00
Brendan Eich
d7f650715a
Add str + obj concatenation for 3d-raytrace.js.
2008-08-20 02:35:17 -07:00
David Anderson
f39bd1434c
AMD64 trace-tests.js passes now (hacked in LIR_qcmov opcode, corrected builtin return types).
2008-08-19 17:19:19 -07:00
Andreas Gal
f423ed448c
Intern globals per-context, not per tree, which allows transitioning between trees that use globals. The type of all global slots compiled code uses is expected to remain stable, otherwise the entire code cache has to be flushed. Changes to the shape of the global object also flush the code cache. Working for trace-tests.js, but fails math-partial-sum.js
2008-08-19 11:32:36 -07:00
Blake Kaplan
ca6393b6d3
bug 450529 - pass pc to String.prototype.match so we can avoid unnecessary object creation when tracing. r=brendan
2008-08-15 09:29:03 -07:00
Blake Kaplan
5212c28ec4
Don't just undepend the string, canonicalize it as well.
2008-08-14 17:31:39 -07:00
Vladimir Vukicevic
18579d0b01
b=450176; trace parseInt and parseFloat; r=gal
2008-08-14 15:13:39 -07:00
David Anderson
9fac57c6c2
Merge.
2008-08-13 17:45:50 -07:00
David Anderson
7eddaae8dc
Fix from brendan for propertyIsEnumerable having an inconsistent return type.
2008-08-13 17:44:26 -07:00
Brendan Eich
8e7089fd90
Forgot to string-tag before going from atom to jsid in two builtins.
2008-08-13 17:20:16 -07:00
Brendan Eich
6a1a322196
Major and winning overhaul to for-in codegen (mad props to Andreas for advice).
2008-08-13 14:02:35 -07:00
Brendan Eich
7123e15406
- Add String match and three replace overloadings, and allow known native matching to continue in search of exact match (not best, and not abort on first mismatch).
...
- Add CallGetter built-in and use it for regexp class-getter-implemented prototype properties.
- Add BUILTIN5 support (this should be "it" ;-).
2008-08-12 18:52:28 -07:00
Andreas Gal
abf0c891fd
js_obj_hasOwnProperty is supposed to return a boolean but was incorrectly generating code to return a number, resulting on a failure in the boolean comparison due to an unexpected i2f (450304).
2008-08-12 14:28:15 -07:00
0fa0454828
cmp over number and (string or bool or undefined)
2008-08-12 01:05:33 -04:00