Brendan Eich
86cdd88b79
Fix JSOP_FORLOCAL to push false when guarded conditions are false while recording (449961).
2008-08-10 10:42:21 -07:00
Brendan Eich
55c7485138
- 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
Brendan Eich
d07e2a8f52
- Test JSVAL_BOOLEAN tag in TraceRecorder::record_JSOP_TYPEOF, assert no holes or other pseudo-booleans, to unify false/true/undefined testing.
...
- JS_NOT_REACHED("...") not JS_ASSERT(0 && "...").
-
2008-08-09 22:27:58 -07:00
Brendan Eich
d4dfd4b68e
Restore C compilation support to jscntxt.h, used by liveconnect (only one file now: jsj_JavaClass.c had no need to include jscntxt.h).
2008-08-09 22:25:54 -07:00
Brendan Eich
2cddbf13f3
camelCaps test names restored (NewTest => newTest, etc.).
2008-08-09 22:24:49 -07:00
shaver@mozilla.org
6562b9f74d
JSOP_ANONFUNOBJ
2008-08-09 23:12:32 -04:00
shaver@mozilla.org
cda7069cf9
JSOP_TYPEOF and JSOP_TYPEOFEXPR
2008-08-09 22:54:01 -04:00
shaver@mozilla.org
7c4ee17841
Builtin for String.prototype.concat (single int-arg version)
2008-08-09 22:15:21 -04:00
shaver@mozilla.org
7769385ff1
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
b776bf5aae
Bug 449978 – TM: trace some more builtins for string-validate-input
2008-08-09 21:47:52 -04:00
Robert Sayre
709fb51a48
Bug 449972 – TM: give xpcshell a JIT switch
2008-08-09 18:36:17 -04:00
Robert Sayre
5819d23fe1
Bug 449666 – TM: Assertion failure: JSSTRING_IS_FLAT during trace recording. r=brendan
2008-08-09 18:20:18 -04:00
Brendan Eich
2d69e4fd88
Fix obj2 typo, meant obj (obvious use-before-set, sorry about that).
2008-08-09 13:30:49 -07:00
shaver@mozilla.org
a6c2154d2d
restore preference for getarg+length over getargprop
2008-08-09 15:48:38 -04:00
shaver@mozilla.org
871762698e
improve naming of anonymous functions and excess args
2008-08-09 15:05:34 -04:00
Brendan Eich
a9891d72ec
Prettier spacing knownNatives table.
2008-08-08 22:43:31 -07:00
Andreas Gal
4deb69bc04
Merge.
2008-08-08 19:24:50 -07:00
Andreas Gal
8f8a60027c
Add an assert to protect against nested exits (not implemented yet.)
2008-08-08 19:23:28 -07:00
Brendan Eich
e51da46173
Merge from mozilla-central.
2008-08-08 18:58:04 -07:00
Andreas Gal
51b2ed0964
Support calling of nested tree from within inlined frames. When we call a tree that tree expects to be the top-level tree, which means it assumes callDepth=0. If the call of the tree is within an inlined frame, thats not true (callDepth > 0). We adjust the native stack pointer accordingly before calling the tree, and then restore the value of the stack pointer after the call. Fancy stuff.
2008-08-08 18:52:08 -07:00
Andreas Gal
dcb537e63c
Remove ip from InterpState. Calculate the new pc after a trace side exit relative to lr->from->root->ip, which also works if we side exit on a different tree than we entered (which can happen in case of nested trees.)
2008-08-08 18:20:20 -07:00
Brendan Eich
b9a320dd50
Merge.
2008-08-08 16:40:45 -07:00
Brendan Eich
af73076a01
Guard against shapeless callees, with tests (more to do here, can't break the unknown callee case yet, but it should be breakable).
2008-08-08 16:37:01 -07:00
Andreas Gal
de81ee78de
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
3a8c413ef8
Merge.
2008-08-08 14:45:27 -07:00
Brendan Eich
efd6d6b45a
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
Brendan Eich
e63c1bc88e
Better idea for avoiding level-1 property cache collisions.
2008-08-08 14:28:10 -07:00
Brendan Eich
5513550625
Improve first-level property cache hash function to avoid collisions in linear sequence of setprops.
2008-08-08 14:12:55 -07:00
Ben Turner
d40f4e90b5
Bug 447711 - "FindInJSObjectScope calls JS from within a request and a lock". r+sr=jst.
2008-08-08 13:13:41 -07:00
Ben Turner
080d9443c4
Bug 443871 - "Protect against null objects in a title's scope/map". r=brendan.
2008-08-08 12:17:42 -07:00
Igor Bukanov
56f20b25f1
bug 412296 - removal of minarg support for fast native
2008-08-08 18:02:50 +02:00
Andreas Gal
f711dea1be
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
bca94099ec
Remove tracking of outer trees and merging of globals since globals will be maintained centrally soon, not attached to trees.
2008-08-07 19:40:41 -07:00
Brendan Eich
c6c7e03815
Fix bug 449627.
2008-08-07 18:12:31 -07:00
Bob Clary
787da6c117
JavaScript Tests - regression test for bug 448595, by Oliver Hunt
2008-08-07 18:00:38 -07:00
Andreas Gal
c07692fcf3
We don't deallocate JIT-related data structures when the JIT is shut down. Add a TODO for this.
2008-08-07 17:52:48 -07:00
Andreas Gal
faf67eeed8
Hand the script in when updating the oracle regarding global variable slots even if we don't use it right now. This will be useful for caching information across runtimes.
2008-08-07 17:43:13 -07:00
Andreas Gal
2b7dc241af
Use a typedef SlotList instead of Queue<uint16>.
2008-08-07 17:22:21 -07:00
Andreas Gal
ded5bc2698
Teach typemaps how to capture the types of all slots in a slot list.
2008-08-07 17:20:49 -07:00
Andreas Gal
2e2794eef3
When merging globals from inner trees to outer trees, make sure to push the expected type upstream as well.
2008-08-07 17:08:27 -07:00
Andreas Gal
be8f6e47a8
When we trash a tree, we have to trash all outer trees that call it as well.
2008-08-07 17:01:00 -07:00
Andreas Gal
abbfda929e
Recognize loop edges that hit a nested tree.
2008-08-07 16:41:20 -07:00
Andreas Gal
0305a8e41d
Fix typo (missing memcmp in statement).
2008-08-07 16:27:26 -07:00
Andreas Gal
b0a78d17be
Remove type-map hash code. A direct memcmp seems to be faster (probably some SSE magic behind it in gcc/glibc).
2008-08-07 16:26:56 -07:00
Andreas Gal
41532c2743
Factor out the code to capture the current stack type map and move around the type map method implementations to make sure they can see the FORALL macros.
2008-08-07 16:23:50 -07:00
Andreas Gal
62afe41fcb
We expect no interned globals in a new tree. Assert on that.
2008-08-07 15:44:11 -07:00
Andreas Gal
762fe3fac8
Merge.
2008-08-07 15:41:50 -07:00
Andreas Gal
b9d1cbb1b2
Always trash TreeInfo when we recompile. This avoids the much dreaded JS_ASSERT(insInt32) errors and we can do this now because the demotion information is provided by the oracle and no longer stored in the typemap directly.
2008-08-07 15:38:54 -07:00
Andreas Gal
74c0c68853
Use an oracle to predict when slots are demotable. This allows trashing the TreeInfo* object in the root fragment more aggressively. Rebuild the stack type map at every compile to avert type map mismatches. Purge all global slot info when we re-record a tree.
2008-08-07 15:28:43 -07:00
Brendan Eich
61d94fdc59
Don't fail to flush cx->thread's JIT cache if JS_THREADSAFE.
2008-08-06 23:38:57 -07:00
Andreas Gal
7d11225df2
If we run into an error during compilation, blacklist that fragment. If we run out of memory, flush the cache.
2008-08-06 22:26:20 -07:00
Andreas Gal
a750469f1a
Flush JIT cache for all contexts. Clear nanojit error state when we start compiling.
2008-08-06 22:18:33 -07:00
Andreas Gal
1405e5e0a2
Remove dead code.
2008-08-06 22:10:30 -07:00
Andreas Gal
72f8db35a1
Add a helper to flush the JIT code cache (and the fragment lookup quick cache). On a global shape mismatch trash the entire cache (might be a bit overly aggressive). Similary, during GC flush the code cache.
2008-08-06 21:56:25 -07:00
Andreas Gal
95bebc4e66
Merge.
2008-08-06 19:31:52 -07:00
Andreas Gal
36af9ec40c
Tracker outer trees for every tree and merge globals of inner trees into all outer trees as we register inner trees with outer trees.
2008-08-06 19:25:24 -07:00
shaver@mozilla.org
a88153c229
add tests for missing and excess arity for trace-entry function context
2008-08-06 22:24:39 -04:00
Andreas Gal
2d0cef9e4a
Add a contains method to Queue.
2008-08-06 19:06:37 -07:00
Andreas Gal
9c88e4b9fb
Fix misleading debug text.
2008-08-06 19:04:41 -07:00
Andreas Gal
0a8f2e58f6
Fix tracing of code inside methods that were called with arity mismatch.
2008-08-06 18:51:26 -07:00
Brendan Eich
f9b7d1c86b
Replace bogus assertion with runtime test for correct abort test (getter or setter, given sprop hit from propcache).
2008-08-06 17:54:36 -07:00
Andreas Gal
84d7e74c31
Fix nonEmptyStack1 test.
2008-08-06 17:44:39 -07:00
Graydon Hoare
f92d5391d2
Bug 447713, remove the import/export functionality from spidermonkey, r=brendan
2008-08-06 17:34:58 -07:00
Bob Clary
059983533d
JavaScript Tests - regression test for bug 443569, by Jesse Ruderman
2008-08-07 05:18:54 -07:00
Bob Clary
b0f81050d2
JavaScript Tests - regression test for bug 442333
2008-08-07 05:00:42 -07:00
Bob Clary
59b81c8215
JavaScript Tests - regression test for bug 442242, by Igor Bukanov
2008-08-07 04:47:33 -07:00
Bob Clary
04dfdc60fe
JavaScript Tests - regression test for bug 441477, by Jason Orendorff
2008-08-07 03:23:36 -07:00
Bob Clary
f8e1cfa526
JavaScript Tests - regression test for bug 440558, by Ben Turner
2008-08-07 02:54:46 -07:00
Bob Clary
da20b9755a
JavaScript Tests - regression tests for bug 435345, by Cyrus Omar
2008-08-06 21:58:03 -07:00
Bob Clary
b535815cda
JavaScript Tests - regression tests for bug 434837, by Cyrus Omar
2008-08-06 21:48:28 -07:00
Bob Clary
305be2402c
JavaScript Tests - regression tests for bug 446169, by romaxa, Igor Bukanov
2008-08-06 19:59:24 -07:00
Bob Clary
abd6467b9a
JavaScript Test - binary operator evaluation order, bug 433672
2008-08-06 19:15:12 -07:00
Gavin Sharp
d01df5b3e6
Bug 449503: fix --enable-dtrace, r=igor
2008-08-06 17:51:38 -07:00
Andreas Gal
822dc23276
Disable outerlining, to be replaced with nesting.
2008-08-06 17:34:06 -07:00
Andreas Gal
bc5952ccb5
Add a helper to emit a tree-call into the currently recording trace.
2008-08-06 16:24:29 -07:00
Andreas Gal
12dad038be
Add CallTree builtin.
2008-08-06 15:56:31 -07:00
Andreas Gal
9a3359278f
Make ip in InterpStruct const*.
2008-08-06 15:55:00 -07:00
Andreas Gal
9a985cecb6
Merge.
2008-08-06 15:04:18 -07:00
Andreas Gal
8d9bd943f9
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
81ca3977ff
Add first non-empty stack testcase, which now passes (yay).
2008-08-06 13:53:34 -07:00
Brendan Eich
8aea5e6c49
Merge again, I lost to Andreas\!
2008-08-06 13:44:07 -07:00
Andreas Gal
f3a597c35d
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
ada0e648fa
Merge.
2008-08-06 13:37:45 -07:00
Andreas Gal
2b7f0ed256
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
d5c6dcd638
- 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
3fcf2d0688
Merge.
2008-08-06 13:23:55 -07:00
Andreas Gal
2f936f6cc5
If we stop recording, immediately attempt to trigger the tree.
2008-08-06 13:18:30 -07:00
shaver@mozilla.org
8bccd00c7f
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
d4bbd9734b
Properly deal with trace entry with non-empty stack.
2008-08-06 12:38:17 -07:00
Bob Clary
4e201d37bb
JavaScript Tests - regression test for bug 433279, by nanto_vi (TOYAMA Nao), Jesse Ruderman
2008-08-06 10:50:20 -07:00
Igor Bukanov
ca7b7c39f5
bug 447762 - merging var and local JS bytecodes. r=brendan
2008-08-06 16:13:22 +02:00
Andreas Gal
fb421e671a
Split side exit handling from js_ExecuteTree.
2008-08-06 06:34:16 -07:00
Bob Clary
6623bad96e
JavaScript Test - regression test for bug 427798, by Igor Bukanov
2008-08-06 02:39:15 -07:00
Bob Clary
01fd623850
JavaScript Tests - regression test for bug 422269, by Igor Bukanov
2008-08-06 02:25:25 -07:00
Bob Clary
4ce5129041
JavaScript Tests - regression test for bug 410852, by Rob Sayre
2008-08-06 01:46:49 -07:00
Bob Clary
bfa0873fdb
JavaScript Tests - regression test for bug 438415, by Brian Crowder
2008-08-05 23:47:20 -07:00
Blake Kaplan
49d5afa35e
Bug 449152 - js_CheckAccess should init out params on failure, r=brendan
2008-08-05 14:49:50 -07:00
Bob Clary
62d958a2be
merge commit for test, bug 430740
2008-08-05 13:48:32 -07:00
Bob Clary
84d2a73631
JavaScript Tests - modify test for BOM to whitespace conversion, bug 430740
2008-08-05 13:46:36 -07:00
Brendan Eich
ac3b0f4557
Comment or/and test framework not being traceable.
2008-08-05 11:36:25 -07:00
Brian Crowder
927b150481
Bug 384244 - update jsdtoa with interesting pieces of more-recent dtoa, r=igor
2008-08-05 11:18:29 -07:00
Blake Kaplan
e23486ebed
Try to fix the orange by overriding platform-specific errors
2008-08-04 18:04:19 -07:00
Blake Kaplan
d42f0d18f7
Fix missed review comment from bug 408412
2008-08-04 16:54:16 -07:00
Bob Clary
784ecdcdd4
JavaScript Tests - regression test for bug 446494, by Philip Taylor
2008-08-04 16:48:01 -07:00
Blake Kaplan
c0bc5e6e03
Implement ES3.1's Object.getPrototypeOf. bug 444787, r=brendan
2008-08-04 16:43:12 -07:00
Blake Kaplan
bb3043d493
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
e8742b57fd
Don't pass around information we don't use. bug 448595, r=brendan
2008-08-04 16:36:35 -07:00
Blake Kaplan
1707e24478
Cleanup error reporting in dis and dissrc. bug 445743, r=brendan
2008-08-04 16:36:10 -07:00
Blake Kaplan
c1ae312d79
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
ccb35b588d
- 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
5b49427b01
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
47dd9ac645
Misc. cleanup.
2008-08-03 01:34:07 -07:00
Brendan Eich
68106102f8
Use INS_CONST to addName a few lir->insImm immediates.
2008-08-02 20:01:36 -07:00
Brendan Eich
dcb09f96df
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
b344a35dd0
Fix return NULL in bool to return false.
2008-08-02 16:05:29 -07:00
Brendan Eich
b57540a87a
Avoid JSUint64 (NSPR style), use uint64 (SpiderMonkey style).
2008-08-02 16:05:16 -07:00
Brendan Eich
12a15d6872
Restore lost or/and tests (hg strikes again, grrrr!)
2008-08-02 15:56:28 -07:00
Andreas Gal
f92e18c58e
Merge.
2008-08-02 03:24:03 -07:00
Andreas Gal
8d0e486947
Use quick cache to bypass fragmento is possible.
2008-08-01 22:56:52 -07:00
Andreas Gal
be665ae142
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
471c0b9fbb
Factor out js_ContinueRecording from js_LoopEdge.
2008-08-01 22:39:52 -07:00
Andreas Gal
1157b3a775
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
d89d579585
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
f799bebb7f
Merge.
2008-08-01 21:09:48 -07:00
Brendan Eich
5f7cffe7ec
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
622bc54d90
Fix ifop null/object inverted logic sense bug.
2008-08-01 20:19:28 -07:00
Brendan Eich
73c8cc0659
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
3dad101a7c
Add || and && tests.
2008-08-01 20:13:11 -07:00
Brendan Eich
b5e4c9bea4
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
4315f6173f
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
298f9c6d8f
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
b792cd9836
Remove synthesizeFrames private declaration -- js_SynthesizeFrames is a static helper now.
2008-08-01 08:39:44 -07:00
Brendan Eich
2faf8f5d7c
- 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
ef57e12366
Remove entryStackDepth. Calculate sp_adj relative to entryNativeStackSlots.
2008-08-01 02:33:54 -07:00
Andreas Gal
a7d09b2ff1
Make synthesizeFrame private.
2008-07-31 16:30:00 -07:00
Andreas Gal
e6a729256a
Merge.
2008-07-31 13:43:02 -07:00
Andreas Gal
78535943cb
Add vprof source files (this time for real.)
2008-07-31 13:42:25 -07:00
David Anderson
b1160d5d83
Fixed builtin_dmod not working on Win32.
2008-07-31 15:42:03 -05:00
Andreas Gal
e606bdb17e
Pull in Moh's vprof utility from tamarin-tracing.
2008-07-31 13:39:41 -07:00
Andreas Gal
5a99fbc025
Sync with tamarin-tracing/nanojit tip.
2008-07-31 13:28:12 -07:00
shaver@mozilla.org
097345ebe0
use optimized path for fromCharCode
2008-07-31 12:22:48 -07:00
shaver@mozilla.org
6c78fa07ea
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
a39e3b2846
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
6906e26d42
add specialized StringToInt32 and filter for it
2008-07-31 11:35:08 -07:00
shaver@mozilla.org
9250c74f1f
give strtointeger a way to avoid octal, to streamline ValueToNumber a bit
2008-07-31 11:33:55 -07:00
shaver@mozilla.org
0fbbdb8209
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
c52ac1a18f
merge backout of d24e6005ee4c to fix the world
2008-07-31 06:36:53 -07:00
shaver@mozilla.org
9b0784225d
Backed out changeset d24e6005ee4c (causing major array-fail).
2008-07-31 06:35:11 -07:00
Andreas Gal
a286f04a51
Merge.
2008-07-31 01:35:56 -07:00
Andreas Gal
f15f73500f
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