Commit Graph

269 Commits

Author SHA1 Message Date
Luke Wagner
c7d3e6785c Bug 689362 - Create js/public (with the intention that its contents will eventually be the only INSTALLED_HEADERS), move Vector and HashTable to js/public and some dependencies (r=billm,sr=dmandelin)
--HG--
rename : js/src/jshashtable.h => js/public/HashTable.h
rename : js/src/jsvector.h => js/public/Vector.h
rename : js/src/mfbt/InlineMap.h => js/src/ds/InlineMap.h
extra : rebase_source : 818639b74653667b7a572bc1234398c0e4559a60
2011-10-04 15:33:00 -07:00
Jim Blandy
071d1f62d5 Bug 693406: Set the activeAnalysis flag in the proper compartment when printing TypeCompartments from js_DestroyContext with INFERFLAGS=full. r=bhackett
When ISpewResult is enabled, js_DestroyContext walks over all the
compartments and dumps their types. However, it doesn't switch the context
to each compartment as it does so, so the context passed in to all the
print calls may not be in the same compartment as the scripts whose type
inference results it's printing. This means that

    AutoEnterAnalysis enter(cx);

sets the activeAnalysis flag in the wrong compartment, leading to assertion
failures in functions like js::analyze::ScriptAnalysis::slotEscapes.
2011-10-10 14:31:35 -07:00
Jim Blandy
920b2f659b Bug 692903: Identify scripts more helpfully in InferSpew output. r=bhackett
This delays assigning id numbers to scripts until the first time the id is
actually retrieved, and at that point produces an InferSpew message
identifying the script by id, address, url and line number. This means that
we only identify scripts we actually mention in InferSpew output.

If JSScript::id had users other than jsinfer, this wouldn't be appropriate.

With this patch applied, we get output like this, the first time a given script is mentioned:

[infer] script #2: 0x7ffff5906660 /home/jimb/moz/dbg/js/src/jit-test/lib/prolog.js:1
[infer] typeSet: T0x9ff748 bytecode0 #2
...
2011-10-07 15:12:12 -07:00
Jim Blandy
852f844158 Bug 692911: Delete useless call to target->addType in js::types::TypeConstraintSubsetBarrier::newType. r=bhackett
js::types::TypeConstraintSubsetBarrier::newType calls 'target->hasType(type)',
and if that returns true, calls 'target->addType(cx, type)'. That second call
should have no effect: it just adds to target a type that it already has.

This patch deletes the call to target->addType.
2011-10-07 15:08:56 -07:00
Jim Blandy
cce84e1f96 Bug 692243: Change the InferSpew for TypeObject::setFlags to print flags in hex. r=bhackett 2011-10-07 13:07:05 -07:00
Brian Hackett
e86568f602 Avoid reentrant constraint solving when breaking type barriers, bug 685186. r=dvander 2011-10-07 07:55:06 -07:00
Brian Hackett
2fb55f3b09 Don't bypass watchpoint handlers when optimizing property accesses on singletons, bug 690292. 2011-10-06 11:53:11 -07:00
Igor Bukanov
c4a996026b bug 687966 - eliminating held/unheld scripts in the debugger. r=jorendorff 2011-09-20 21:49:12 +02:00
Jim Blandy
44d7dfe783 Bug 691934: Consolidate calls to TypeCompartment::resolvePending in TypeSet::add r=bhackett
This patch causes no change in behavior; it's meant to clarify the code
that propagates a typeset's member types out to a newly added constraint a
bit:

- Code that queues PendingWork items is segregated from a single
  resolvePending call at the end.

- The type lattice --- TYPE_FLAG_UNKNOWN over everything,
  TYPE_FLAG_ANYOBJECT over all object types --- appears directly in the
  pattern of 'if's and 'else's.
2011-10-05 10:55:57 -07:00
Brian Hackett
3e87f078bb Fix warning, bug 689892. 2011-10-03 15:01:09 -07:00
Brian Hackett
e707b2f190 Check for operations on integers in loops, bug 689892. r=dvander 2011-10-03 14:43:09 -07:00
Chris Leary
14bc4cf54d Bug 684039: rewrite JS LIFO allocator, avoids thrashing. (r=luke)
--HG--
rename : js/src/jsarena.h => js/src/ds/LifoAlloc.h
extra : rebase_source : 098bf9561114f82363ebd0862213acf952709257
2011-09-22 13:22:30 -07:00
Luke Wagner
2c8c55d13f Bug 683361, part 2 - use CallArgs more (r=waldo)
--HG--
extra : rebase_source : 0825a9729a7e24706e9fa1f3fdfb1586c475d8cf
2011-09-08 21:02:26 -07:00
Terrence Cole
59f4dc6032 Bug 685315 - Remove the GETGLOBAL opcode; r=dvander
This was a nice and simple way to get a perf boost in the
interpreter and JM, but JSOP_GETGNAME has the same
information and more. TI doesn't need it, JM technically
doesn't, and IM won't either. We can just do a normal
property lookup during compilation.
2011-09-22 17:35:25 +01:00
Bill McCloskey
f3698e14b3 Bug 675806 - Make static strings be GC things (r=luke) 2011-09-20 14:47:14 -07:00
Landry Breuil
cf5e5ceebd Fix use of resetUseCount outside JS_METHODJIT. bug 687885, r=bhackett 2011-09-20 10:21:19 -07:00
Brian Hackett
ce5b96c240 [INFER] Reapply 7db908db3669 (bug 684084) 19ed9da5789d (bug 684824) a250c3cb749a (bug 686178) 820f11a3fdb1 (bug 686179) e678ced82a6a (bug 686418) 300e1f974f55 (bug 669715) 5c131d458c53 (bug 686396) 3a8b5e4a286b (bug 683140). 2011-09-18 07:36:51 -07:00
Brian Hackett
68a462f79a [INFER] Reapply c1f0817e5cb4 (bug 557358), 353b160fb804 (bug 685313), 9459096a263a b31b25125429 (bug 669715), a887241aed3a (bug 684404). 2011-09-17 19:24:19 -07:00
Brian Hackett
dd56af6e09 [INFER] Reapply c2726640029f 3330521cfa4a b68281262e15 (bug 557358), 6a8947bcc821 (bug 684943), 50d4f6fa00ce (bug 683714), f3dd7cf2d0b3 (bug 683999). 2011-09-17 19:14:22 -07:00
Ed Morley
3b89aa779a Backout latest JM merge for OSX 10.5 M-oth permaorange (see bug 687257) on a CLOSED TREE 2011-09-17 16:32:43 +01:00
Brian Hackett
72e409987d [INFER] Decouple constraints generating callee types and 'this' types of those callees for CALLELEM, bug 686396. 2011-09-15 12:50:19 -07:00
Brian Hackett
cb6667a21f Merge MC->JM 2011-09-12 12:42:13 -07:00
Brian Hackett
ceb94a57c3 [INFER] Fix some TI ARM bustage, bug 669715. 2011-09-08 18:11:19 -07:00
Brian Hackett
70706ec50e [INFER] Don't resolve NAME accesses which are on the DeclEnv of named lambdas, bug 685313. 2011-09-08 17:44:17 -07:00
Brian Hackett
63289b3360 PIC for GETPROP and CALLPROP on JSPropertyOp properties, bug 557358. r=dvander 2011-09-06 22:34:23 -07:00
Brian Hackett
a21793c57d Merge MC->JM 2011-09-06 00:45:22 -07:00
Brian Hackett
85997e5de5 [INFER] Fix test failures. 2011-09-05 09:05:45 -07:00
Brian Hackett
2ac6308262 [INFER] Fix bogus assert, allow Disassemble() to be called during GC/arena traversal, bug 684281. 2011-09-04 13:34:38 -07:00
Brian Hackett
4797355341 [INFER] Don't use invalid activeCall when finishing an outer function frame, detect nesting in parents which add scope objects earlier, bug 663138. 2011-09-03 11:04:45 -07:00
Luke Wagner
357b5b8cf8 Bug 684110 - Clean JSObject::clasp usage (r=pbiggar) 2011-09-02 17:23:26 -07:00
Ed Morley
2d385ce59f Backout bug 684110 (08b6eaf6aad0, cf8b35fa1010, 25ee45edabe1, 659f5c7d2cc9, 870f6dd82586 & e1ad65d6a7fd) and bug 684344 (cd1957f6628d) on a CLOSED TREE; a=bustage-fairies 2011-09-03 03:21:25 +01:00
Luke Wagner
39242fcb8c Bug 684110 - Clean JSObject::clasp usage (r=pbiggar) 2011-09-02 17:23:26 -07:00
Brian Hackett
9128f54230 Merge MC -> JM 2011-09-01 13:41:12 -07:00
Brian Hackett
736384af84 [INFER] Use type barriers for NAME accesses on scripts whose types have been purged, bug 663138. 2011-09-01 12:36:42 -07:00
Brian Hackett
3e0ad0ceba [INFER] Improve performance for non-reentrant closures, bug 663138. 2011-09-01 12:20:30 -07:00
Ed Morley
19a1226d22 Merge last green changeset on m-i to m-c 2011-09-01 08:41:18 +01:00
Brian Hackett
62d90f802f Don't compile or analyze new script properties for scripts with a cleared global, bug 683317. 2011-08-31 17:43:01 -07:00
Brian Hackett
9da2f62d4b [INFER] Avoid spurious censoring of type barriers on writes of 'undefined' to singleton objects, bug 682345. 2011-08-26 20:21:59 -07:00
Brian Hackett
8e19ba6201 [INFER] Encapsulate GC arena/cell iteration, bug 679887. 2011-08-26 12:39:31 -07:00
Brian Hackett
045638a1ea Merge MC -> JM 2011-08-26 11:23:35 -07:00
Brian Hackett
6e0458f6d1 [INFER] Watch for recompilation triggered by while compiling a call in an inlined frame, bug 680951. 2011-08-26 08:55:00 -07:00
Brian Hackett
96aa830103 [INFER] Leave type sets initially empty for undefined properties of objects with singleton type, bug 680951. 2011-08-24 21:08:24 -07:00
Brian Hackett
f2c77a7056 [INFER] Don't treat initializers mutating __proto__ as constant singletons, bug 680217. 2011-08-19 10:54:51 -07:00
Igor Bukanov
712146a6db bug 686017 - avoid Cell::arenaHeader() on fast paths. r=bhackett1024 2011-08-16 12:27:34 +02:00
Igor Bukanov
cc337ac79c bug 674251 - making JSScript a GC-thing. r=jorendorff,bhackett1024 2011-08-09 10:51:59 +02:00
Igor Bukanov
3b06c78f95 bug 681884 - faster slow path of GC allocations. r=wmccloskey 2011-08-18 09:16:08 +02:00
Igor Bukanov
53fcc3230a bug 684010 - remove JSScrit::isAboutToBeFinalized. r=bhackett1024
--HG--
extra : rebase_source : 7281e691bf5cbe62772e7671baa59d514829ff5f
2011-09-01 21:47:07 +02:00
Brian Hackett
eae037f0a7 [INFER] Allow analysis/compilation of top level <script>, bug 662704. 2011-08-18 08:54:36 -07:00
Brian Hackett
febafa7470 [INFER] Add missing check for unknownProperties(), bug 679810. 2011-08-17 17:41:50 -07:00
Brian Hackett
7619efd11f [INFER] Always print spew on debug mode type failures. 2011-08-17 09:07:42 -07:00