Brendan Eich
d91ee7d532
Object.prototype.{hasOwnProperty,propertyIsEnumerable}.
2008-08-11 17:47:05 -07:00
Andreas Gal
6dc665b46c
Support non-flat strings in Any_getelem and Any_setelem.
2008-08-11 16:12:52 -07:00
Brendan Eich
2b077258a5
Fix FastNewObject built-in to create dense array instance with its own map.
2008-08-11 15:03:32 -07:00
Andreas Gal
53c2a2606a
Merge.
2008-08-11 11:43:59 -07:00
Andreas Gal
553ec4927d
Avoid goto across initialization of sprop2 (446508).
2008-08-11 11:43:40 -07:00
Brendan Eich
4887dde958
Rework GCF_DONT_BLOCK to be cx->gcDontBlock, assert it's set, set before entering trace and clear on exit.
2008-08-11 11:18:16 -07:00
Brendan Eich
0b747abcf9
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
2f7ddd371a
Unregress FastNewObject builtin to handle user-defined constructors (note to self: run tests before coffee...).
2008-08-11 10:41:08 -07:00
Brendan Eich
44a191960c
- Trace JSOP_NEWINIT/INITPROP/INITELEM/ENDINIT, which required extending the FastNewObject builtin to create a dense Array or a new Object (easy to discriminate on the constructor function's u.n.clasp member).
...
- Fix record_JSOP_SETELEM to avoid storing if a JSOP_POP that will be skipped follows.
2008-08-11 10:24:47 -07:00
Brendan Eich
02a188d82a
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
bcc1a490db
- 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
ef01b47288
JSOP_TYPEOF and JSOP_TYPEOFEXPR
2008-08-09 22:54:01 -04:00
0a2d9afe75
Builtin for String.prototype.concat (single int-arg version)
2008-08-09 22:15:21 -04:00
ef23c36278
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
Robert Sayre
c03c77b288
Bug 449978 – TM: trace some more builtins for string-validate-input
2008-08-09 21:47:52 -04:00
Brendan Eich
77350abfea
Merge.
2008-08-08 16:40:45 -07:00
Andreas Gal
84a8dc97f7
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
Brendan Eich
be65081f8b
Merge.
2008-08-08 14:45:27 -07:00
Brendan Eich
5a36c8e7ab
Get operator new on interpreted functions working, along with JSOP_SETPROP on an unmutated object, or one of the right shape but where the setprop is adding the next property, and it's not in the object yet.
2008-08-08 14:38:44 -07:00
Andreas Gal
5adaa97018
Don't activate a tree if it has globals, since we can't handle that yet.
2008-08-07 19:59:21 -07:00
Andreas Gal
d5ca3eca00
Add CallTree builtin.
2008-08-06 15:56:31 -07:00
Brendan Eich
c851b1c53d
- Add builtins to support for-in loops, both iterating and getting/setter properties by name using o[i] instead of o.p where i is 'p'.
...
- Record JSOP_ITER and JSOP_ENDITER, which must be handled since tracing could start in between them (and always will, until we nest or unless we outerline).
- Add a null state guard in JSOP_FORVAR's recorder method.
- Pick include order, indentation, and trailing space nits.
2008-08-06 13:36:29 -07:00
David Anderson
6ecb4b3bb6
Fixed builtin_dmod not working on Win32.
2008-07-31 15:42:03 -05:00
7385e4e777
use optimized path for fromCharCode
2008-07-31 12:22:48 -07:00
8113986178
add specialized StringToInt32 and filter for it
2008-07-31 11:35:08 -07:00
254b7e790a
Coerce strings to numbers for appropriate ops.
...
(Wants a specialized StringToInt32 and a filter to put it in place.)
2008-07-31 07:41:58 -07:00
3a2342eaff
Implement JSOP_EQ and JSOP_NE over strings, plus JSOP_STRING.
2008-07-30 17:28:59 -07:00
22109c3d79
trace Math.random
2008-07-30 15:51:44 -07:00
d1f5e72171
Trace String.fromCharCode.
...
Handle failure signals of < 0 or NULL from traceable natives.
2008-07-30 15:19:25 -07:00
David Anderson
d0327f8628
Fixed some MSVC whinings, implemented rdtsc on win32
2008-07-29 19:19:51 -05:00
ae63953ca3
JSOP_ADD over strings
2008-07-29 07:53:31 -07:00
8f6e8e3ce4
Trace String.prototype.substring for two-arg case.
...
* Export str_substring as js_str_substring.
* Add basic String_p_substring builtin (only handle end > begin, both in range).
* Add String_p_substring_1 builtin for the missing-end case.
* INS_CONST for named constants in traces.
* Support boxing of strings.
* Support CALLPROP with primitive this.
* Support traceable natives which require cx and this.
* Support fallible traceable natives.
* Fix JSOP_LENGTH to use i2f on result (need that everything-is-doubles T-shirt).
* Add strings test.
2008-07-29 07:32:18 -07:00
649ad9c1ff
do setelem in a builtin, so we don't abort trace every 8 times when growing
2008-07-27 18:34:23 -04:00
Andreas Gal
3d6f674216
If we see a f2i(UnboxDouble) chain, simplify it to UnboxInt32 which does the conversion internally. This also enables a fastpath to read 31-bit jsval integers from arrays.
2008-07-27 14:55:26 -07:00
Andreas Gal
9dbaa069a2
Don't use a builtin for this. For functions its interned in the native frame. For global this we read from fp->thisp. Restore jsinterp.cpp and jsinterp.h (no longer need COMPUTE_THIS exposed).
2008-07-16 14:36:50 -07:00
33191440a5
Trace JSOP_THIS and JSOP_THISPROP.
...
Rename getprop to get_prop, just because.
Extract COMPUTE_THIS to jsinterp.h as JS_COMPUTE_THIS for reuse in tracer.
2008-07-15 21:37:00 -04:00
Andreas Gal
606c239269
Assign blame where blame is due.
2008-07-15 15:05:16 -07:00
a36149d375
fix our aliasing idiocy by extending jsdpun, add Math.sqrt, add strict-aliasing to our Makefile.ref flags
2008-07-14 18:22:05 -04:00
4402c0ad20
make JSOP_CALL builtin specialization data-driven
2008-07-14 00:28:31 -04:00
86c51a4276
add Math.cos and Math.pow to the specialized-call party, and add tests
2008-07-12 00:03:33 -04:00
d950a0bac0
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
78e398529d
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
f90eb931e9
Windows cares a lot more about where FASTCALL is; such a sensitive platform
2008-07-11 11:40:07 -04:00
7ada220e7f
fix include ordering for THREADSAFE build
2008-07-10 08:40:43 -04:00
Andreas Gal
9cdb8f6f79
Move builtin[] table in jsbuiltin.cpp
2008-07-08 23:48:06 -07:00
Andreas Gal
57eb5ca1bd
Move the type level from int/double to number. All traces start out as double in all slots, and denote and promote to/from int as needed. The FuncFilter optimizes on-trace casting and elininates redundant f->i-> chains. More optimization needed on this of course, and this code is now a bit slower than the previous integer-register use. However, this does solve the q += 2.5 issues. The heap access code does not properly cast yet and is likely unstable.
2008-07-06 15:55:04 -07:00
Andreas Gal
8a97fd91ec
Merge.
2008-07-06 11:19:06 -07:00
Andreas Gal
d94eda9c18
Added doubleToUint32 builtin and make tracker a template.
2008-07-06 10:59:55 -07:00
ad98697761
fix builtin_UnboxInt32 signature and name shape_ins for debugging
2008-07-06 13:58:59 -04:00
Andreas Gal
535e7bd41e
Added support for semi-stable loop variables. Compiling for(...) q += 2.5; is ridiculously difficult because it flip-flops between int and double. Add support to promote integer values to doubles at the loop tail if at loop entry we expect a double. Since this isn't possible the other way around, we have to get luck that we catch a path into the loop where q is already double. For this we add 3 trigger points (10, 13, 37). We will try three times to record a trace at those iteration counts of a loop. If none succeed the loop is blacklisted. This probably needs more tuning down the road.
2008-07-05 23:21:53 -07:00