Graydon Hoare
aaf41f8ee5
Bug 447713, remove the import/export functionality from spidermonkey, r=brendan
2008-08-06 17:34:58 -07:00
Bob Clary
8977765520
JavaScript Tests - regression test for bug 443569, by Jesse Ruderman
2008-08-07 05:18:54 -07:00
Bob Clary
93b3246f1a
JavaScript Tests - regression test for bug 442333
2008-08-07 05:00:42 -07:00
Bob Clary
8447a6217c
JavaScript Tests - regression test for bug 442242, by Igor Bukanov
2008-08-07 04:47:33 -07:00
Bob Clary
80a4237137
JavaScript Tests - regression test for bug 441477, by Jason Orendorff
2008-08-07 03:23:36 -07:00
Bob Clary
628a0aabbe
JavaScript Tests - regression test for bug 440558, by Ben Turner
2008-08-07 02:54:46 -07:00
Bob Clary
c02b8f58c9
JavaScript Tests - regression tests for bug 435345, by Cyrus Omar
2008-08-06 21:58:03 -07:00
Bob Clary
2569db84d4
JavaScript Tests - regression tests for bug 434837, by Cyrus Omar
2008-08-06 21:48:28 -07:00
Bob Clary
aefe5a062e
JavaScript Tests - regression tests for bug 446169, by romaxa, Igor Bukanov
2008-08-06 19:59:24 -07:00
Bob Clary
7c449116ff
JavaScript Test - binary operator evaluation order, bug 433672
2008-08-06 19:15:12 -07:00
Gavin Sharp
348213c998
Bug 449503: fix --enable-dtrace, r=igor
2008-08-06 17:51:38 -07:00
Andreas Gal
d41941073e
Disable outerlining, to be replaced with nesting.
2008-08-06 17:34:06 -07:00
Andreas Gal
1bf2697257
Add a helper to emit a tree-call into the currently recording trace.
2008-08-06 16:24:29 -07:00
Andreas Gal
1b8f21c8f3
Add CallTree builtin.
2008-08-06 15:56:31 -07:00
Andreas Gal
6bd49e0d49
Make ip in InterpStruct const*.
2008-08-06 15:55:00 -07:00
Andreas Gal
bc93ceb9d5
Merge.
2008-08-06 15:04:18 -07:00
Andreas Gal
27de48d1f9
Cleanup stack offset calculation and eliminate the stack offset fiddling that was necessary for nanojit prior to adding the getTop hook.
2008-08-06 15:04:02 -07:00
Brendan Eich
5331ec8967
Add first non-empty stack testcase, which now passes (yay).
2008-08-06 13:53:34 -07:00
Brendan Eich
0f1f29e9a4
Merge again, I lost to Andreas\!
2008-08-06 13:44:07 -07:00
Andreas Gal
2acb2afdec
Always trashing the tree on a type mismatch can't work since the first iteration comes in as undefined for loop-outputs and then kills the main tree that deals with the proper stable types. Have to find a different way to deal with this.
2008-08-06 13:41:04 -07:00
Brendan Eich
586464070d
Merge.
2008-08-06 13:37:45 -07:00
Andreas Gal
fcaab6d007
Pull recompile flag out of the state and pass in as argument. Trash the tree if a secondary trace can't be connected to the loop header. This is very aggressive and might need more tinkering. Trashing the tree on every mismatch doesn't seem to work well, so thats currently disabled.
2008-08-06 13:37:29 -07:00
Brendan Eich
6e215765df
- 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
Andreas Gal
d1d2895356
Merge.
2008-08-06 13:23:55 -07:00
Andreas Gal
a253b66a09
If we stop recording, immediately attempt to trigger the tree.
2008-08-06 13:18:30 -07:00
shaver@mozilla.org
9615dbd804
add test for non-empty stack on trace entry (fails currently, but no longer crashes)
2008-08-06 16:12:49 -04:00
Andreas Gal
141f71186c
Properly deal with trace entry with non-empty stack.
2008-08-06 12:38:17 -07:00
Bob Clary
f4b3de7f12
JavaScript Tests - regression test for bug 433279, by nanto_vi (TOYAMA Nao), Jesse Ruderman
2008-08-06 10:50:20 -07:00
Igor Bukanov
46b1a8edf2
bug 447762 - merging var and local JS bytecodes. r=brendan
2008-08-06 16:13:22 +02:00
Andreas Gal
0ed65746a7
Split side exit handling from js_ExecuteTree.
2008-08-06 06:34:16 -07:00
Bob Clary
ea4d3895ed
JavaScript Test - regression test for bug 427798, by Igor Bukanov
2008-08-06 02:39:15 -07:00
Bob Clary
8a5fdc395e
JavaScript Tests - regression test for bug 422269, by Igor Bukanov
2008-08-06 02:25:25 -07:00
Bob Clary
4f4763f9a8
JavaScript Tests - regression test for bug 410852, by Rob Sayre
2008-08-06 01:46:49 -07:00
Bob Clary
8112f86430
JavaScript Tests - regression test for bug 438415, by Brian Crowder
2008-08-05 23:47:20 -07:00
Blake Kaplan
40e2a77e0b
Bug 449152 - js_CheckAccess should init out params on failure, r=brendan
2008-08-05 14:49:50 -07:00
Bob Clary
8b19078644
merge commit for test, bug 430740
2008-08-05 13:48:32 -07:00
Bob Clary
97df12d1ba
JavaScript Tests - modify test for BOM to whitespace conversion, bug 430740
2008-08-05 13:46:36 -07:00
Brendan Eich
a1c6f2606a
Comment or/and test framework not being traceable.
2008-08-05 11:36:25 -07:00
Brian Crowder
848148a3cd
Bug 384244 - update jsdtoa with interesting pieces of more-recent dtoa, r=igor
2008-08-05 11:18:29 -07:00
Blake Kaplan
3e20948873
Try to fix the orange by overriding platform-specific errors
2008-08-04 18:04:19 -07:00
Blake Kaplan
2d7e4ce617
Fix missed review comment from bug 408412
2008-08-04 16:54:16 -07:00
Bob Clary
8ddc6ebd74
JavaScript Tests - regression test for bug 446494, by Philip Taylor
2008-08-04 16:48:01 -07:00
Blake Kaplan
d8801925e5
Implement ES3.1's Object.getPrototypeOf. bug 444787, r=brendan
2008-08-04 16:43:12 -07:00
Blake Kaplan
062612435a
let declarations at top level and function level should not shadow var. bug 346749, r=brendan
2008-08-04 16:37:00 -07:00
Blake Kaplan
3838ee5d02
Don't pass around information we don't use. bug 448595, r=brendan
2008-08-04 16:36:35 -07:00
Blake Kaplan
608073442a
Cleanup error reporting in dis and dissrc. bug 445743, r=brendan
2008-08-04 16:36:10 -07:00
Blake Kaplan
0b0d6afb1e
Propagate compilation errors to our caller to make syntax errors easier to debug. bug 408412, r=shaver sr=brendan
2008-08-04 10:03:34 -07:00
Brendan Eich
03b511f9e4
- Use JSStackFrame* fp over, don't declare another JSStackFrame* f, in the FORALL macros and clones (f is canonical variable name for nanojit::Fragment*, fp for JSStackFrame*).
...
- Nit-pick include order (alphabetical within each group).
- Trailing space and indentation no-knock raid.
2008-08-03 22:55:28 -07:00
Brendan Eich
da42a8c6f7
Strength-reduced unsigned modulus in the fragment quick cache, don't use signed % which requires a branch and less-than-zero test.
2008-08-03 22:35:15 -07:00
Brendan Eich
fc2c669949
Misc. cleanup.
2008-08-03 01:34:07 -07:00
Brendan Eich
df36d9e36f
Use INS_CONST to addName a few lir->insImm immediates.
2008-08-02 20:01:36 -07:00
Brendan Eich
5b9f299115
Fix TraceRecorder::ifop backward logic bug in the OBJECT case, and implement the STRING case. Add tests for truthy and falsy strings.
2008-08-02 16:51:22 -07:00
Brendan Eich
607e259b69
Fix return NULL in bool to return false.
2008-08-02 16:05:29 -07:00
Brendan Eich
0ac70ec2cc
Avoid JSUint64 (NSPR style), use uint64 (SpiderMonkey style).
2008-08-02 16:05:16 -07:00
Brendan Eich
3488a68372
Restore lost or/and tests (hg strikes again, grrrr!)
2008-08-02 15:56:28 -07:00
Andreas Gal
3799a6f8ff
Merge.
2008-08-02 03:24:03 -07:00
Andreas Gal
3106dc8845
Use quick cache to bypass fragmento is possible.
2008-08-01 22:56:52 -07:00
Andreas Gal
12f1c06952
Factor out most of the remaining code in js_LoopEdge into js_RecordTree and move the code to attach new branches into js_ExecuteTree.
2008-08-01 22:47:15 -07:00
Andreas Gal
746cb91802
Factor out js_ContinueRecording from js_LoopEdge.
2008-08-01 22:39:52 -07:00
Andreas Gal
6df2ea22c9
Add a fragment cache data structure. This will be used to accelerate the fragment lookup during branching.
2008-08-01 22:33:05 -07:00
Andreas Gal
3fea3f5d53
Split up FORALL_SLOTS_IN_PENDING_FRAMES macro in a macro that processes a frame, and a macro that uses that macro to process all pending frames.
2008-08-01 22:27:39 -07:00
Brendan Eich
5c506ec0ba
Merge.
2008-08-01 21:09:48 -07:00
Brendan Eich
1c627f62ca
Backed out changeset 8421b003fb5f -- it broke string to number, demonstrated by running trace-test.js without the -j (jit) option (10 - "1.3" => NaN instead of 8.7).
...
/be
2008-08-01 21:07:17 -07:00
Brendan Eich
269f35e4ad
Fix ifop null/object inverted logic sense bug.
2008-08-01 20:19:28 -07:00
Brendan Eich
9cff9bf4d1
Add || and && tests; use newlines to join pass and fail results now that there are too many tests to be readable joined by commas on one line.
2008-08-01 20:18:10 -07:00
Brendan Eich
88bba45b34
Add || and && tests.
2008-08-01 20:13:11 -07:00
Brendan Eich
3691962a2f
Extend ifop to handle undefined tests; implement JSOP_OR and JSOP_AND (so much work\!).
2008-08-01 12:06:04 -07:00
Brendan Eich
dc1072fe55
Style police raid: function names start in column 1, with one blank line between functions.
2008-08-01 11:03:52 -07:00
Brendan Eich
2cfdd9a55a
1. Don't store thisp literally in state.rp, get it from argv[-1]. 2. Fix DEBUG localNames code.
2008-08-01 10:40:38 -07:00
Brendan Eich
422ce674b5
Remove synthesizeFrames private declaration -- js_SynthesizeFrames is a static helper now.
2008-08-01 08:39:44 -07:00
Brendan Eich
8f837e0784
- Implement interpreter frame reconstruction (js_SynthesizeFrame).
...
- Fix MONITOR_BRANCH to restore frame-dependent interpreter locals (we want fewer of these if they can be removed with no perf loss).
- Fix FORALL_SLOTS_IN_PENDING_FRAMES not to scan argv in callee when it has scanned operand stack in caller.
- Fix import to take the localFrame from whose fun its localNames parameter was computed -- it was using cx->fp which is wrong when FORALL_SLOTS_IN_PENDING_FRAMES iterates other than the top of stack frame.
- A few interval tests that were double-ended are single-ended now.
- Add call.js mini-test (more cases needed).
2008-08-01 08:26:32 -07:00
Andreas Gal
4eba8e4012
Remove entryStackDepth. Calculate sp_adj relative to entryNativeStackSlots.
2008-08-01 02:33:54 -07:00
Andreas Gal
dd3ebd2cfe
Make synthesizeFrame private.
2008-07-31 16:30:00 -07:00
Andreas Gal
144cccb3f1
Merge.
2008-07-31 13:43:02 -07:00
Andreas Gal
bef0cf6f23
Add vprof source files (this time for real.)
2008-07-31 13:42:25 -07:00
David Anderson
ea8cf3b5ce
Fixed builtin_dmod not working on Win32.
2008-07-31 15:42:03 -05:00
Andreas Gal
80036e48d3
Pull in Moh's vprof utility from tamarin-tracing.
2008-07-31 13:39:41 -07:00
Andreas Gal
f0c74cce54
Sync with tamarin-tracing/nanojit tip.
2008-07-31 13:28:12 -07:00
shaver@mozilla.org
df01719b57
use optimized path for fromCharCode
2008-07-31 12:22:48 -07:00
shaver@mozilla.org
c274666457
Refactor js_GetUnitString to permit passing in a bare jschar, and use in js_str_fromCharCode.
2008-07-31 12:21:59 -07:00
shaver@mozilla.org
b078fb1509
Refactor trace-test.js to permit running a single test via js trace-test.js testName
.
2008-07-31 12:15:22 -07:00
shaver@mozilla.org
3221386525
add specialized StringToInt32 and filter for it
2008-07-31 11:35:08 -07:00
shaver@mozilla.org
bccb36ea81
give strtointeger a way to avoid octal, to streamline ValueToNumber a bit
2008-07-31 11:33:55 -07:00
shaver@mozilla.org
12614d0334
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
shaver@mozilla.org
d200eb863e
merge backout of d24e6005ee4c to fix the world
2008-07-31 06:36:53 -07:00
shaver@mozilla.org
f2c0c93637
Backed out changeset d24e6005ee4c (causing major array-fail).
2008-07-31 06:35:11 -07:00
Andreas Gal
e5a87ade9f
Merge.
2008-07-31 01:35:56 -07:00
Andreas Gal
6f4cfc2628
Remove ANY_TYPE and move debug printf around to print entry point even if we can't enter due to type mismatch.
2008-07-31 01:35:18 -07:00
shaver@mozilla.org
a3bc7296d9
Make guard return expected, so we can trace alternate cases easily.
...
Better diagnostic for non-global scope chain head.
2008-07-30 22:59:13 -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
David Anderson
ad3e892e92
Re-use initial parameters on tree fragments.
2008-07-30 23:30:58 -05:00
shaver@mozilla.org
959dd9184f
Implement JSOP_EQ and JSOP_NE over strings, plus JSOP_STRING.
2008-07-30 17:28:59 -07:00
Andreas Gal
e91eb4bc47
Merge.
2008-07-30 16:37:35 -07:00
Brendan Eich
fe3a6127c5
- Export JSSLOT_ITER_* from jsiter.cpp to jsiter.h, for jstracer.cpp to use.
...
- Fix OBJ_GET_SLOT to be STOBJ_GET_SLOT in jsiter.cpp, no thread safety here (bug on file).
- Move JSNativeEnumerator from jsobj.cpp to jsobj.h for jstracer.cpp as well.
- Rename JOF_2BYTE JOF_UINT8 for consistency, and actually decompile it.
- Trace JSOP_FORVAR (can't do anything in JSOP_ITER, it comes before the loop).
- Shortened some guardMyLongSummerVacationWithinBounds names ;-).
- Removed/refactored to avoid dslots_ins obligation on all callers.
2008-07-30 16:32:33 -07:00
Andreas Gal
698d3fb5cc
Make the global frame layout match the slot layout in the global object. This will allow leaving global values in place when switching trees as long both inner and outer tree use the same value.
2008-07-30 16:28:48 -07:00
Andreas Gal
e8043788a7
Merge.
2008-07-30 16:06:11 -07:00
Andreas Gal
9b9d60583c
Use isGlobal to distinguish whether a value is a global slot instead of scanning the table every time.
2008-07-30 16:05:51 -07:00
shaver@mozilla.org
124e9ae44b
trace Math.random
2008-07-30 15:51:44 -07:00
shaver@mozilla.org
b1df95f721
Trace String.fromCharCode.
...
Handle failure signals of < 0 or NULL from traceable natives.
2008-07-30 15:19:25 -07:00
Andreas Gal
266a7c534f
Clean up the living room a bit since people are going to come by to look at it.
2008-07-30 13:34:22 -07:00
Andreas Gal
3a278cdf00
Add isGlobal to check whether a value is a slot of the global object.
2008-07-30 12:15:53 -07:00
Andreas Gal
40696cff65
Note to self: hacking after 4am is detrimental to my spelling.
2008-07-30 04:20:48 -07:00
Andreas Gal
f1a5494d05
Major shakeup of the interning code for globals. Globals are now detected on demand as they are used and the slots are noted in treeInfo->globalSlots. At the same time the type is recorded in treeInfo->globalTypeMap. The stack type-map is maintained separately in treeInfo->stackTypeMap. All these structures are lists and are maintained as List<T> objects. Imports for globals can appear at the top (if we have already seen some imports for the loop header and are recompiling), or on the fly for lazily found values. We no longer intern all global properties that happen to match a name in the current function, and we also support inlining of functions that touch globals that are not used in the method where the trace started in.
2008-07-30 04:17:22 -07:00
Andreas Gal
7290f281a0
Use List<T> to maintain global slot list in TreeInfo.
2008-07-30 01:38:21 -07:00
Andreas Gal
7beb3cd77f
Trash entire tree with all the information associated with it when we have a typemap conflict or the global shape changes.
2008-07-30 01:29:13 -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
Andreas Gal
90eee755f0
Merge.
2008-07-29 23:51:43 -07:00
Andreas Gal
f60c785137
Add a generic list data structure and fix side exit handling to always pick the right typemap to work with (exit map, not entry map).
2008-07-29 23:48:39 -07:00
dvander@iroh.alliedmods.net
6fe516cd73
Merge.
2008-07-29 19:20:36 -05:00
David Anderson
60181b7fd2
Fixed some MSVC whinings, implemented rdtsc on win32
2008-07-29 19:19:51 -05:00
Andreas Gal
8a6d3622fe
Merge.
2008-07-29 17:15:00 -07:00
Andreas Gal
79fa051958
Removed unused field from TreeInfo.
2008-07-29 17:14:36 -07:00
David Anderson
340cb50c53
Merge (an empty one, thanks hg)
2008-07-29 19:05:59 -05:00
David Anderson
921bbecea3
Fixed infinite looping on non-threaded tracing (rumor is that we do Windows builds of Firefox)
2008-07-29 19:04:17 -05:00
Brendan Eich
48a3285a82
Merge again.
2008-07-29 16:02:53 -07:00
Brendan Eich
73e208808e
Guard property cache hits by shape(s).
2008-07-29 16:01:00 -07:00
Andreas Gal
4d5b44839c
Rename gslots to globalSlots.
2008-07-29 15:28:23 -07:00
Andreas Gal
437f15d428
Remove global frame transition code. Obsoleted by the new on-demand global loading code which we are about to add.
2008-07-29 15:16:35 -07:00
Brendan Eich
cc79bb34c5
Merge.
2008-07-29 14:52:22 -07: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
Brendan Eich
636b8ed6b6
Fix a couple of comments.
2008-07-29 10:53:58 -07:00
shaver@mozilla.org
ce85bd8955
JSOP_ADD over strings
2008-07-29 07:53:31 -07:00
shaver@mozilla.org
2a1fd601c4
signs, signs, everywhere signs
2008-07-29 07:38:04 -07:00
shaver@mozilla.org
a8b963d4a4
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
shaver@mozilla.org
98caf383a5
Trace JSOP_LENGTH over flat strings. (Need some cmovery for dep strings.)
2008-07-29 06:51:27 -07:00
Andreas Gal
eaeee57c9b
Fix spelling.
2008-07-29 01:02:06 -07:00
Andreas Gal
1d8df7fd3c
Cleanup global frame switching and add delayed write-back code for doubles.
2008-07-29 01:00:50 -07:00
Brendan Eich
747b8fab0e
Regularize loop update in SwitchNativeGlobalFrame.
2008-07-29 00:13:59 -07:00
Brendan Eich
0a6546fb7a
Fix synthesizeFrame's newifp->callerRegs/frame.regs update to pass along the pointer to the precious js_Interpret regs local and update it.
2008-07-29 00:06:29 -07:00
Brendan Eich
f2ca9496f4
Try to fix SwitchNativeGlobalFrame, still studying it but these changes seem necessary.
2008-07-28 23:59:29 -07:00
Brendan Eich
3e4d484622
Fix synthesizeFrame parameterization, and have it reconstruct stack depth; warning and space fixes.
2008-07-28 23:47:20 -07:00
Brendan Eich
fff2cda315
Export js_ReconstructStackDepth for use by side-exit code when synthesizing stack frames.
2008-07-28 23:46:27 -07:00
Andreas Gal
28deb1f5b0
Merge.
2008-07-28 23:31:39 -07:00
Andreas Gal
0bb95b6c46
Switch from one global frame to another by walking the two sorted gslots lists.
2008-07-28 23:30:16 -07:00
Brendan Eich
9894a22d65
Fix uninitialized nbytes in synthesize_frame.
2008-07-28 22:25:13 -07:00
Andreas Gal
ed2b81df60
Compilation fix for MSVC.
2008-07-28 21:17:43 -07:00
Andreas Gal
a9e5f84f42
Cleanup and split native frame reading/writing into stack and global part.
2008-07-28 18:06:34 -07:00
Andreas Gal
52bda2ec2c
Sort interned global slots in ascending order for fast comparison of two different global frames when switching between them.
2008-07-28 16:49:13 -07:00
shaver@mozilla.org
9c4c8495f9
not-yet-working beginnings of frame reconstruction
2008-07-28 09:05:55 -04:00
Andreas Gal
cd39ba2407
Trash the interned globals of a tree if we experience a global shape mismatch.
2008-07-27 21:44:08 -07:00
Andreas Gal
4df581e3b3
Trash the typemap if a change of the global shape forces us to throw away a tree.
2008-07-27 19:18:51 -07:00
Andreas Gal
b798d08035
Abort trace if we inline too deeply.
2008-07-27 16:28:09 -07:00
Andreas Gal
4710877c9a
Merge.
2008-07-27 16:19:15 -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
51b608badc
Don't use ABORT_TRACE outside the recorder.
2008-07-27 15:40:34 -07:00
shaver@mozilla.org
a4af3457f4
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
e6cc02f5cc
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
7837aae392
Merge.
2008-07-27 14:29:24 -07:00
Andreas Gal
a3eb60b77e
Add limited outerlining. Much of this will be subsumed by nested trees.
2008-07-27 14:28:56 -07:00
shaver@mozilla.org
e69c5b7239
remove rval tracking, since it's no longer necessary
2008-07-27 15:47:43 -04:00
Andreas Gal
ca563057ee
Remove guardCount. No longer needed.
2008-07-27 12:05:01 -07:00
Andreas Gal
05870cebe8
Merge.
2008-07-27 02:15:42 -07:00
Andreas Gal
8a7bb9c550
Smarter speculative demotion of numbers to integers and promotion of the trace seems to require actual doubles. If the number at entry looks like an int we make the slot an int and compile as such. If the loop-tail proves the slot to be a double, we recompile the trace. Currently such miss-speculation cannot be handled on secondary traces since we are currently unable to recompile the primary trace. Such secondary traces are blacklisted.
2008-07-27 02:15:17 -07:00
Brendan Eich
4d1de6a956
Add JSSF_NO_SCRIPT_RVAL script flag, and uint8 flags field for it.
2008-07-27 00:12:01 +01:00
Brendan Eich
8b62f00bae
Fix comment typo.
2008-07-27 00:11:30 +01:00
Blake Kaplan
d1c2f6d0ef
Merge backout
2008-08-04 11:13:34 -07:00
Blake Kaplan
1c6155e1bf
Backed out changeset 90020c4ad446 to fix tinderbox orange while I figure out why a test was failing.
2008-08-04 11:12:51 -07:00
Blake Kaplan
74e6fd4abf
Don't optimize variable names in with statements. bug 448595, r=brendan
2008-08-04 10:07:06 -07:00
Blake Kaplan
52a3888cfa
Propagate compilation errors to our caller to make syntax errors easier to debug. bug 408412, r=shaver sr=brendan
2008-08-04 10:03:34 -07:00
Graydon Hoare
78450de1f0
Bug 444845, js hooks to control vtune, r=sayrer
2008-07-29 15:19:26 -07:00
Igor Bukanov
dcdf0df942
bug 445391 - re-enable OJI for Firefox 3.1, the configure changes is from jst, r=jst,crowder, sr=benjamin
2008-07-29 19:53:03 +02:00
Igor Bukanov
0e9a6fa3da
bug 446320 - fixing -Wformat warnings in debug printouts. r=crowder
2008-07-29 16:11:36 +02:00
Igor Bukanov
b85cc2c8a0
bug 448173 - fixing js shell compilation issues on Windows caused by my changes from the bug 447807. r=bclary, not-part-of-the-build
2008-07-28 01:22:29 +02:00
Igor Bukanov
0f9d60d4c4
Backed out changeset 65836af09dac - compilation errors
2008-07-27 23:05:52 +02:00
Igor Bukanov
e04b341333
bug 446320 - fixing -Wformat warnings in debug printf code. r=crowder
2008-07-27 22:52:10 +02:00
Andreas Gal
a4fc19765e
Don't try to demote slots on secondary traces (we have to recompile the primary trace as well for that, which we currently don't do.)
2008-07-25 19:30:33 -07:00
Andreas Gal
02997616f4
Add a test case for trees.
2008-07-25 19:10:23 -07:00
Andreas Gal
059abfa50f
Added sunspider tests to t/ for dvander.
2008-07-25 18:43:19 -07:00
Andreas Gal
812989bb8a
Eliminate EntryRegs. Its not safe to keep a reference to the entry SP since we might extend the tree from a different outer stack frame. Instead just store the entryStackDepth.
2008-07-25 18:22:15 -07:00
Andreas Gal
bbb1bc89c0
Print real recording point, not entryRegs and add an assert that makes sure the guard we come out of is associated with the tree we entered into.
2008-07-25 18:13:57 -07:00
Andreas Gal
24447ee8fb
Merge.
2008-07-25 16:54:14 -07:00
Andreas Gal
1b7930d39d
The VP engineering broke JSOP_NAME! We have to check whether the slot is actually interned and otherwise abort.
2008-07-25 16:51:42 -07:00
Brendan Eich
a8c6046d8c
Avoid JSOP_POPV in global scripts from load(), etc.
2008-07-26 01:23:12 +02:00
David Anderson
4560ed961f
Fixed entry typemap having wrong allocation size.
2008-07-25 13:30:52 -07:00
Bob Clary
ba65f510c3
JavaScript Tests - regression test for bug 438415, by Jesse Ruderman
2008-07-26 21:13:30 -07:00
Andreas Gal
d952f192ba
Can't use lr->from. Seems to not get set in certain cases. Go figure. The nanojit tree code is really weird.
2008-07-25 02:29:36 -07:00
Andreas Gal
dee805421b
Factor out AttemptToGrowTree.
2008-07-25 02:00:02 -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
f3573b9940
Move trace activation code into js_ExecuteTree().
2008-07-25 01:20:40 -07:00
Andreas Gal
3999210c12
Make demotion threshold optional (0=off, 32=default). Turn off to debug the type assert bug.
2008-07-24 17:33:34 -07:00
Andreas Gal
e838b138b8
Don't demote slots in overly long traces (based on counting the number of guards, current threshold=32).
2008-07-24 16:25:18 -07:00
Graydon Hoare
f335bdf69d
Bug 447844: fix build with JS_HAS_SCRIPT_OBJECT, r=mrbkap
2008-07-24 16:07:00 -07:00
Andreas Gal
f0399ffea7
Cleanup iteration over all slots to use a single macro to avoid code duplication.
2008-07-24 14:51:14 -07:00
Brian Crowder
645304c008
merging backout
2008-07-24 14:07:05 -07:00
Brian Crowder
019e94ec12
Backed out changeset a5fc387c4622
2008-07-24 14:05:29 -07:00
Igor Bukanov
7ee86f95f8
bug 447807 - allow to override the object dir when building js shell. r=crowder
2008-07-24 22:08:18 +02:00
Brian Crowder
8d3b212c33
Fixing a typo in a comment.
2008-07-24 12:59:11 -07:00
Brian Crowder
cdc07f72ab
Bug 384244 - Updating dtoa from David M. Gay's latest code, and refactoring to
...
accept patches from this upstream source more easily. r=mrbkap, r=igor
2008-07-24 12:43:41 -07:00
Brian Crowder
10901da2a8
Bug 446494 - Number.toLocalString() doesn't handle Infinity or exponential notation correctly, r=mrbkap
2008-07-24 12:43:40 -07:00
Andreas Gal
e7f92ecf31
Add shark support to md5.js directly, no longer around the recorder.
2008-07-24 11:08:37 -07:00
Andreas Gal
6df91a21a0
Make the interpreter notify us when frames are popped so we see he right cx->fp value. Fix return value tracking for JSOP_STOP.
2008-07-24 10:35:10 -07:00
Andreas Gal
5ae4ef819e
Backed out changeset a58e7ce6eb7f. stack(0) is wrong, if at all it should have been stack(-(1 + argc)). But anyway, its impossible to write through to the frame via set() at that point because leaveFrame() doesn't actually modify cx->fp. We need to wait for the interpreter to do so. Until then nativeFrameOffset produces incorrect values and the assert fails in set.
2008-07-24 10:09:51 -07:00
Igor Bukanov
f2afe03bb6
bug 447705 - fixinge makefile for js shell to handle parallel make invocations. r=crowder, not-part-of-the-build.
2008-07-24 11:03:19 +02:00
shaver@mozilla.org
b989e7b3e7
fix return-value handling for new stack layout
2008-07-24 00:31:37 -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
Bob Clary
756a07e31b
Sisyphus|JavaScript Tests - add repository information to failure tracking, bug 447738
2008-07-24 01:04:56 -04:00
Bob Clary
5e4e630789
merge commit for bug 399397
2008-07-24 00:52:24 -04:00
Bob Clary
b42b1e15b8
Sisyphus|JavaScript Tests - update public failures, bug 399397
2008-07-24 00:50:21 -04:00
Andreas Gal
117bc4d9f9
Add a fast path for nativeFrameOffset that walks entire groups at a time, not slots. Check against the result calculated by the FORALL macro in DEBUG builds (for sanity).
2008-07-23 16:39:17 -07:00
Andreas Gal
4cc2061091
Merge. Make sure we clear out all slots from the tracker when leaving a frame.
2008-07-23 15:56:27 -07:00
Brendan Eich
2100afe584
Space nit fix.
2008-07-24 00:55:41 +02:00
Andreas Gal
df280d08d7
When addressing locations above the stack water level, use ->sp as base. Shaver accidently changed this to ->spbase when merging Igor's patch, so we were writing past the water mark and the stores were killed.
2008-07-23 15:48:15 -07:00
Blake Kaplan
9153202245
Merging backout
2008-07-23 13:20:41 -04:00
Blake Kaplan
5ec9f1693f
Backed out changeset 084567d3ebe6. It actually made us not comply with ECMAScript 3.
2008-07-23 13:19:44 -04:00
Blake Kaplan
742d27285f
Attempt to make XPC_XOW_ClassNeedsXOW faster. bug 444779, r=jorendorff/jst sr=jst
2008-07-23 12:55:57 -04:00
John Fitzgerald
c21fd6d356
Calculate the time zone offset correctly. bug 445879, r=mrbkap
2008-07-23 12:46:39 -04:00
shaver@mozilla.org
c29aa4c3d2
tighten up some bounds, still not quite right
2008-07-23 11:42:52 -04:00
Andreas Gal
5dd9876515
Lazy fill the stackTracker as we lookup the nativeFrameOffset for values. Purge all entries related to the current frame when it is popped. This code could be further simplified if Tracker was a template.
2008-07-23 02:57:56 -07:00
shaver@mozilla.org
f0a625f5bc
merge from andreas
2008-07-23 01:08:23 -04:00
shaver@mozilla.org
6f5e58e443
merge (still not working, probably box/unbox dumbness)
2008-07-23 01:06:18 -04:00
shaver@mozilla.org
a93fbcc99d
merge (now compiling, untested)
2008-07-23 00:20:29 -04:00
shaver@mozilla.org
8a97552a28
merge (mostly, doesn't build)
2008-07-22 23:58:43 -04:00
Andreas Gal
c9cac5757f
Handle leaving of frames in one central place.
2008-07-22 20:16:12 -07:00
Andreas Gal
c6828d3504
Reduce HOTLOOP threshold to 2.
2008-07-22 18:31:44 -07:00
Andreas Gal
06365155c2
Avoid calculating native frame offset by tracking the last load/store for every slot and extracting the offset from there.
2008-07-22 17:54:04 -07:00
Andreas Gal
48b195e651
Avoid nativeFrameOffset calls in import().
2008-07-22 17:24:29 -07:00
Igor Bukanov
e32ac96bff
bug 330765 - patch from romaxa to fix NativeCompareAndSwap implementation on ARM. r=myself
2008-07-22 16:12:04 +02:00
Andreas Gal
14b0a0827d
Merge.
2008-07-21 19:38:03 -07:00
Andreas Gal
9b799905ed
Add a pattern to recognize safe_add and emit a simple add for it.
2008-07-21 19:37:43 -07:00
shaver@mozilla.org
e0b2e86c09
use nargs rather than argc, since bytecode only refers to [o-nargs) args
2008-07-21 22:31:08 -04:00
shaver@mozilla.org
c0213c60b9
make time.sh more useful
2008-07-21 21:44:21 -04:00
Andreas Gal
2d2bcf0fc8
Reverse the insanity that used to be tamarin's arg passing in ins2. Now it makes sense.
2008-07-21 17:59:42 -07:00
Andreas Gal
3b2a943332
Avoid overflow checks on integer adds when its safe to do so.
2008-07-21 17:50:17 -07:00
Johnny Stenback
499796e945
Landing fix for bug 442708. JS_GC with GC_SET_SLOT_REQUEST doesn't loop until all threads are satisfied. Patch by brendan@mozilla.org, r=bent.mozilla@gmail.com
2008-07-21 16:58:24 -07:00
Johnny Stenback
6b0fc3a654
Landing fix for bug 444880. Make the JS component loader use the JS context stack so that pending requests are suspended while components load. Patch by bent.mozilla@gmail.com, r+sr=jst@mozilla.org
2008-07-21 16:56:45 -07:00
Andreas Gal
410c0b9a98
Eliminate entryFrame pointer (not safe to carry that around.)
2008-07-21 16:20:53 -07:00
Andreas Gal
b30f4c9be6
Use callDepth instead of entryFrame in the FORALL macro.
2008-07-21 16:19:38 -07:00
Bob Clary
97a6b9fbb5
Sisyphus|JavaScript Tests - allow user to execute tests from other location than TEST_DIR, bug 446097, r=cbook
2008-07-21 18:18:15 -04:00
Brendan Eich
a6bb7cfc89
Always select gvar ops for declared global vars, instead of only if loopy/enough-used (445901, r=shaver).
2008-07-21 15:14:14 -07:00
Andreas Gal
f1ef7f0175
Eliminate exit filter, write the type map directly in snapshot.
2008-07-21 15:09:19 -07:00
Andreas Gal
9495f9cb50
Sink stack-targeting type conversion in the set() path instead of in the ExitFilter.
2008-07-21 15:01:47 -07:00
Andreas Gal
a7cc4892f9
Use callDepth, not entryFrame in nativeFrameSlots().
2008-07-21 14:55:41 -07:00
Andreas Gal
bce8e13528
Remove excess parameters of verifyTypeStability.
2008-07-21 13:21:00 -07:00
Andreas Gal
a0cd046167
Track call depth in the trace recorder. This lays the groundwork to get rid of entryFrame.
2008-07-21 13:18:08 -07:00
Jason Orendorff
a721c4227c
Bug 445624 - Delete dead code in JSObject2NativeInterface hot path (r+sr=jst)
2008-07-21 15:16:47 -05:00
shaver@mozilla.org
124244af4b
beginning of entryFrame removal
2008-07-21 15:57:02 -04:00
Andreas Gal
5067fc2638
Merge.
2008-07-21 12:44:03 -07:00
Andreas Gal
3f6f0d1ea5
Use ti instead of fi for TreeInfo pointers.
2008-07-21 12:43:51 -07:00
Andreas Gal
e9b2918575
Rename VMFragmentInfo to TreeInfo.
2008-07-21 12:41:43 -07:00
Andreas Gal
2f5e227963
Merge.
2008-07-20 17:36:47 -07:00
Andreas Gal
221f99adce
Style cleanup and eliminate redundant f2u(i2f|u2f) chains.
2008-07-20 17:36:11 -07:00
Brendan Eich
c73f865645
Fix property cache fill to use the best shape (445899, r=shaver).
2008-07-20 16:27:10 -07:00
Brendan Eich
4a9828f126
Cite bug 445262 with a FIXME instead of omfgHack_ prefix ;-).
2008-07-20 16:21:45 -07:00
Brendan Eich
464b70d055
Tighten up js_IsLoopEdge and include JSOP_IFNEX.
2008-07-20 16:11:52 -07:00
Brendan Eich
c278ae56e0
Nit patrol.
2008-07-20 16:09:08 -07:00
shaver@mozilla.org
faf081c185
merge time is fun time
2008-07-20 18:04:27 -04:00
shaver@mozilla.org
49619fefae
add simple timing harness
2008-07-20 18:03:07 -04:00
Andreas Gal
e82ab0c21f
Simplify updating of the side exit target.
2008-07-20 14:56:04 -07:00
shaver@mozilla.org
368d1588bf
simpler loop exit check (backwards is a loop exit, forwards is not)
2008-07-20 17:54:16 -04:00
shaver@mozilla.org
7546f723f5
force Math to be interned, and defend against non-interned globals until upvar saves us all
2008-07-20 17:23:39 -04:00
Andreas Gal
0b74e54db8
Use exponential backoff when trying to extend trees.
2008-07-20 14:28:56 -07:00
Andreas Gal
a0e38ffd84
Merge.
2008-07-20 13:29:20 -07:00
Andreas Gal
d4d2117f7c
Don't emit boxed values, use the unboxed representation for constants.
2008-07-20 13:28:53 -07:00
Andreas Gal
71eb1da52f
Removed meaningless assert.
2008-07-20 13:25:36 -07:00
shaver@mozilla.org
cadc5891e5
don't pretend we can trace INCELEM and friends (fixes trace-test.js, ahem)
2008-07-20 16:21:43 -04:00
shaver@mozilla.org
f91f913b49
move summarization to the end, so I can see it through the debug spew
2008-07-20 16:17:58 -04:00
Igor Bukanov
fc68712767
bug 441686 - eliminating JSStackFrame.(nvars|vars). r=brendan
2008-07-20 22:13:17 +02:00
shaver@mozilla.org
ed1d0a8953
improve tracing/recording diagnostics
2008-07-20 15:42:19 -04:00
Igor Bukanov
d3223d86a3
[Bug 446229] Fixing GCC conversion warnings within SpiderMonkey. r=brendan
2008-07-20 14:53:21 +02:00
shaver@mozilla.org
d03348f92d
discard trace on global shape mismatch
2008-07-19 22:32:45 -07:00
Brendan Eich
5b009b1b49
Breathe, vertical-spacing, breathe!
2008-07-19 15:42:31 -07:00
Igor Bukanov
6e106c4272
[Bug 444846] Fixing GCC warning on x86-64 about redefined HAVE_VA_LIST_AS_ARRAY. r=crowder
2008-07-19 19:51:05 +02:00
Igor Bukanov
c3acf2cc17
merge
2008-07-19 19:31:48 +02:00
shaver@mozilla.org
ef2e8305dc
Avoid tracking object properties, make incElem work.
2008-07-19 10:24:10 -07:00
shaver@mozilla.org
991ee56658
fix no-tracer build
2008-07-21 06:59:38 -04:00
shaver@mozilla.org
f34cd71b78
Implement DEFLOCALFUN for the fully-lightweight case.
...
Reset atoms base register on function entry and exit.
2008-07-19 06:29:56 -07:00
Brendan Eich
293e6bd4c4
Improve js_IsLoopExit (unannotated JSOP_GOTO is still ambiguous).
2008-07-19 10:52:24 -07:00
Brendan Eich
a26be1bd4b
Fix incProp to box and store (incElem still todo).
2008-07-19 10:24:28 -07:00
Andreas Gal
f2ad868fc0
Merge. hg sucks.
2008-07-19 00:40:54 -07:00
Andreas Gal
457c855d15
Don't demote fmul since it overflows in math-partial. We might try to demote it and then promote back if this happens (depends how aggressively we want so speculate). Speedup 6.6 for math-partial (since its sin/cos/pow heavy.)
2008-07-19 00:27:45 -07:00
Brendan Eich
d1b171e5e2
First stab at incops, plus unbox_jsval tag-masking guard fixes, plus misc. cleanup.
2008-07-19 00:15:22 -07:00
Brendan Eich
032f06cdc0
Property-cache JSOP_NAMEINC etc. direct slot case (445893, r=shaver).
2008-07-18 22:53:22 -07:00
L. David Baron
ff3cb68441
Backed out changeset 5c009a853d70 for hitting a fatal JS_Assert during xpcshell unit tests (xpcom/unit/test_bug374754.js) on the DO_NEXT_OP(JSOP_INCNAME_LENGTH) line on !JS_THREADED_INTERP platforms (Windows).
2008-07-18 21:53:07 -07:00
Andreas Gal
d6a9994067
Merge.
2008-07-18 19:16:16 -07:00
Brendan Eich
3ec5069d69
Property-cache JSOP_NAMEINC etc. direct slot case (445893, r=shaver).
2008-07-18 19:16:15 -07:00
Andreas Gal
5495ccf586
Abort trace is STOP is leaving the recording context.
2008-07-18 19:15:49 -07:00
shaver@mozilla.org
beb2ed6657
Propagate TCF_COMPILE_N_GO through to inner functions, so that we can avoid nulling their parents and then cloning expensively in DEFLOCALFUN.
...
Also make Process do COMPILE_N_GO.
2008-07-18 17:15:41 -07:00
Andreas Gal
47ae25da20
Make entryFrame/entryRegs relative to the tree entry since we only adjust ip/sp/rp when exiting from the tree, not in between fragments.
2008-07-18 16:21:22 -07:00
Andreas Gal
a8b127d5af
Adjust ip/sp/rp in the interpreter recovery code, not on the trace.
2008-07-18 15:35:59 -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
89b50ed124
Rework some of David's changes. Make sure we don't modify the tree until we are ready to attach the new fragment. Share lirbufs between tree branches.
2008-07-18 14:11:01 -07:00
David Anderson
4770d4b3e0
Got side exits seemingly working, added if.js to trace-test.js
2008-07-18 10:33:17 -07:00
shaver@mozilla.org
61d58bad87
Handle more operand types in ifop().
2008-07-18 08:01:51 -07:00
shaver@mozilla.org
983e9cdb83
Better diagnostic info for trace abort.
2008-07-18 07:59:37 -07:00
shaver@mozilla.org
3eaeae50b5
lookup/find, but do not fill prop cache from recorder
2008-07-18 00:46:18 -07:00
shaver@mozilla.org
7078a99d21
When PROPERTY_CACHE_TEST misses, fall back to doing our own lookup via js_GetPropertyHelper.
2008-07-17 23:57:56 -07:00
Andreas Gal
a947ae3ef3
Merge.
2008-07-17 21:32:23 -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
Brendan Eich
84c0998916
Warning elimination.
2008-07-17 18:30:54 -07:00
Andreas Gal
f94180fbe2
Make sure we compile again if we reject a trace by decrementing hits.
2008-07-17 18:15:55 -07:00
Andreas Gal
f58160134a
Fix hot loop triggering.
2008-07-17 18:10:47 -07:00
shaver@mozilla.org
859ec6fbb6
can't easily find real names for globals, so just number them
2008-07-17 17:33:18 -07:00
Igor Bukanov
c645a6135d
[Bug 445818] Using explicit assembly to implement compare-and-swap on x86-64 to avoid __sync_bool_compare_and_swap (GCC intrinsic) as the latter is buggy at least on ARM. r=brendan
2008-07-18 02:18:45 +02:00
Andreas Gal
dded69f2a3
Merge.
2008-07-17 17:13:41 -07:00
Andreas Gal
19ed222624
Disable trees for the time being.
2008-07-17 17:12:28 -07:00
Andreas Gal
43fbfbfe1e
Add if.js example for trees.
2008-07-17 16:38:09 -07:00
Andreas Gal
dbf2dc54bd
Add the beginning of support for trees.
2008-07-17 16:20:13 -07:00
Bob Clary
e818dc5938
JavaScript Tests - update public-failures and universe.data to include mozilla-central 1.9.1 branch, remove unsupported machine configurations, bug 399387
2008-07-18 13:59:09 -04:00
Bob Clary
831500ce51
Sisyphus - JavaScript Tests - add detect-universe.sh, bug 446037
2008-07-18 12:56:47 -04:00
shaver@mozilla.org
3db81baa04
Label globals and locals with their source-names in trace.
...
Show line number on abort.
2008-07-17 15:09:48 -07:00