Commit Graph

86 Commits

Author SHA1 Message Date
Andreas Gal
eb5f8be2b1 Demote modulo operations to integer if both args are int (456934, r=brendan). 2008-09-24 23:28:56 -07:00
Andreas Gal
619234db4c Back out attempt to invoke natives that return a boxed value (namely push and pop, 453734). 2008-09-24 15:18:19 -07:00
Andreas Gal
958c18fb2a Add builtin for invocation of match() on String objects (454682, r=danderson). 2008-09-23 17:18:40 -07:00
Boris Zbarsky
f1b69640dd Backed out changeset c0364f5e0a84 2008-09-21 09:02:09 -04:00
Boris Zbarsky
f068ba4b22 Adding missing file 2008-09-21 08:59:52 -04:00
Boris Zbarsky
7b41e7daf4 Adding some documentation 2008-09-19 14:45:16 -04:00
Andreas Gal
9d7afa336a Add support for fast native that return jsval and wire up push/pop (453734, r=mrbkap). 2008-09-18 16:53:09 -07:00
Andreas Gal
70d28c8730 Backed out changeset 61b9209c186f 2008-09-15 19:59:06 -07:00
Andreas Gal
13cc3eaad6 Backed out changeset 87fe68f51647 2008-09-15 17:09:25 -07:00
Andreas Gal
0764f9fccb Demote modulo operation with a constant non-zero right hand side (451788). 2008-09-15 15:59:25 -07:00
Andreas Gal
cdb4ed8fae Merge. 2008-09-15 15:01:44 -07:00
Andreas Gal
95068bdc26 Properly handle floating point array indexes (453261, r=brendan). 2008-09-15 15:00:40 -07:00
Vladimir Vukicevic
47e9d3a21b b=454530; misc trace abort fixes (trace String.concat); r=brendan 2008-09-15 17:30:05 -04:00
Andreas Gal
be1b44bf0e Trace slow array get/set of indexed props (453261, r=brendan). 2008-09-15 00:54:28 -07:00
Blake Kaplan
4203e79309 Trace Math.max. r=brendan 2008-09-08 20:06:58 -07:00
David Anderson
5018287de0 Trace through parseInt(double), bug 454037 r=gal+brendan. 2008-09-07 02:41:10 -05:00
Brendan Eich
623433f549 Merge. 2008-09-05 18:34:16 -07:00
Brendan Eich
fc936fa1da Checkpoint arguments tour-de-force (453730). 2008-09-05 18:29:08 -07:00
David Anderson
9937dc1262 Trace through Math.log as a known native (bug 453868, r=brendan). 2008-09-05 14:25:01 -07:00
Vladimir Vukicevic
420e72ed85 b=449526, TM: fix up ARM code generation / softfloat 2008-09-02 22:29:23 -07:00
Brendan Eich
48926ba363 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
Brendan Eich
5a8cb06838 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
113ad8babe Add builtins for toLowerCase, toUpperCase and replace(str,str) (452885, r=mrbkap). 2008-08-29 17:35:00 -07:00
Brendan Eich
5d132dba83 Record JSOP_IN (452563, r=gal). 2008-08-27 23:00:43 -07:00
Blake Kaplan
298caaa80f Bug 451782 - Trace Math.ceil. r=brendan 2008-08-25 16:54:02 -07:00
Andreas Gal
666aeff29e Fix builtins that were accidentally flagged as CSE/FOLD but really aren't (Math.random i.e.) 2008-08-21 16:49:51 -07:00
Andreas Gal
7da39648cf Cleanup spacing in builtins.tbl 2008-08-21 16:35:05 -07:00
Robert Sayre
c6a7088bae 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
fd148818e1 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
Andreas Gal
d9acfb10f0 Remove FastEval, broken by design (r=brendan). 2008-08-21 03:13:31 -07:00
Brendan Eich
324b9c7f4e Remove lambda-replace built-in, it's not safe to record into a nested js_Interpret. 2008-08-21 01:39:16 -07:00
shaver@mozilla.org
ed7fab1440 trace |new Array|, via the magic of copy and paste 2008-08-21 00:50:20 -07:00
Brendan Eich
e9b635b38a 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
d84ad33955 Another portability fix. math-spectral-norm is crashing in the test harness so keeping 64-bit JIT off (everything else works). 2008-08-20 09:59:23 -07:00
David Anderson
738ce385fa Merge. 2008-08-20 09:50:41 -07:00
Brendan Eich
deca6a9d50 Add str + obj concatenation for 3d-raytrace.js. 2008-08-20 02:35:17 -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
Blake Kaplan
5aa5360905 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
Vladimir Vukicevic
61a89af8e6 b=450176; trace parseInt and parseFloat; r=gal 2008-08-14 15:13:39 -07:00
Brendan Eich
3d21588b2c Major and winning overhaul to for-in codegen (mad props to Andreas for advice). 2008-08-13 14:02:35 -07:00
Brendan Eich
967ec56341 - 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
shaver@mozilla.org
cfc93a30d9 cmp over number and (string or bool or undefined) 2008-08-12 01:05:33 -04:00
Brendan Eich
2cbfd79ea0 Restore lost shaver rev 0e50c89c476b -- how did that get lost? 2008-08-11 20:27:47 -07:00
Brendan Eich
d004346b52 Object.prototype.{hasOwnProperty,propertyIsEnumerable}. 2008-08-11 17:47:05 -07:00
Brendan Eich
a56862bdff Make js_ConcatStrings JS_FASTCALL and use directly as a built-in; remove gcflag param from it and from js_NewString. 2008-08-11 11:03:54 -07:00
Brendan Eich
0099753ff4 Add Array (generic) join builtin, plus (not yet used) optional this-class guarding for builtins. 2008-08-10 14:50:31 -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
shaver@mozilla.org
a937f98d5b JSOP_TYPEOF and JSOP_TYPEOFEXPR 2008-08-09 22:54:01 -04:00
shaver@mozilla.org
c4ca6755bf Builtin for String.prototype.concat (single int-arg version) 2008-08-09 22:15:21 -04:00
shaver@mozilla.org
3341bf1c11 Implement cmp for string-on-string.
Add < and > tests for strings.
Condition the top-level truthies test on a synthetic test name, so it can be
excluded.
2008-08-09 21:50:52 -04:00