Leave manual refcounting in the ScriptDataTable for now since it
requires a bit of care to make the automatic types do the right thing
when sweeping.
Differential Revision: https://phabricator.services.mozilla.com/D22718
--HG--
extra : moz-landing-system : lando
Also add a GCManagedDeletePolicy so that the script data can be dropped
even when we are not sweeping.
Differential Revision: https://phabricator.services.mozilla.com/D22715
--HG--
extra : moz-landing-system : lando
New glibc versions provide a wrapper for gettid, which means that our stuff
fails to build with:
```
/home/emilio/src/moz/gecko/js/src/util/NativeStack.cpp:28:14: error: static declaration of 'gettid' follows non-static declaration
static pid_t gettid() { return syscall(__NR_gettid); }
^
/usr/include/bits/unistd_ext.h:34:16: note: previous declaration is here
extern __pid_t gettid (void) __THROW;
```
Differential Revision: https://phabricator.services.mozilla.com/D22829
--HG--
extra : moz-landing-system : lando
There was some case that IsIdentifier check is missing after readIdentifierName.
Moved the check to readIdentifierName itself.
Differential Revision: https://phabricator.services.mozilla.com/D22647
--HG--
extra : moz-landing-system : lando
This also changes a few functions to follow the `unwrapped` convention.
This does not do the job thoroughly for our whole implementation of promises
and async generators; but the patch casts enough light that I can see what I'm
doing in part 2.
Differential Revision: https://phabricator.services.mozilla.com/D21815
--HG--
extra : moz-landing-system : lando
This adds an overload of GetInitialHeap that takes an ObjectGroup* instead of a Class* and also takes into account whether the group's shouldPreTenure flag is set. I moved this to JSObject-inl.h too.
I removed the heap parameter in a few places, in particular in NewDenseCopyOnWriteArray which required a bunch of changes elsewhere including the JITs. I left the heap parameter intact for environment objects where we may have reason prefer these objects to be allocated in the tenure heap. It's possible we should just remove all these parameters too and make allocation more uniform.
Differential Revision: https://phabricator.services.mozilla.com/D22324
--HG--
extra : source : 1b4fd78107e2bcf7fe0f44038176ca745b07cd88
`CompartmentPrivate::GetScope()` was added so callers don't have to do `scope.get()`
manually. The `scope` field is now private and was renamed to `mScope`.
Also replaces some `CompartmentPrivate::Get(obj)->scope` instances with
`ObjectScope(obj)`. It's equivalent but shorter.
Differential Revision: https://phabricator.services.mozilla.com/D22664
--HG--
extra : moz-landing-system : lando
And add more assertions to document implicit requirements about opcode lengths.
Depends on D22670
Differential Revision: https://phabricator.services.mozilla.com/D22671
--HG--
extra : moz-landing-system : lando
This introduces features in the jsrust crate, so we can enable/disable
compilation for a specific platform at compile-time. It also does only select
the architecture targeted by the JIT, which should result in slightly lower
compilation times on every platform, and lower binary sizes too.
Differential Revision: https://phabricator.services.mozilla.com/D22280
--HG--
extra : moz-landing-system : lando
This adds the basic infrastructure and uses it for some Math natives and the
Array constructor.
Differential Revision: https://phabricator.services.mozilla.com/D20340
--HG--
extra : moz-landing-system : lando
This patch attempts to make things clearer by renaming the functions used for allocating objects and strings to AllocateObject and AllocateString, rather than having everything be called Allocate. Allocate is still used for atoms though which is a little strange but was hard to change.
Differential Revision: https://phabricator.services.mozilla.com/D22275
--HG--
extra : moz-landing-system : lando
This also makes sure that ValueType::PrivateGCThing isn't used, similar to ValueType::Magic.
Differential Revision: https://phabricator.services.mozilla.com/D22007
--HG--
extra : moz-landing-system : lando
This introduces features in the jsrust crate, so we can enable/disable
compilation for a specific platform at compile-time. It also does only select
the architecture targeted by the JIT, which should result in slightly lower
compilation times on every platform, and lower binary sizes too.
Differential Revision: https://phabricator.services.mozilla.com/D22280
--HG--
extra : moz-landing-system : lando
* Moves NewArrayWithGroup from CodeGenerator.cpp to builtin/Array.cpp
* GetProperty has various overloads so I added GetValueProperty. I considered
*renaming* that GetProperty overload to GetValueProperty but there are quite
a lot of callers in VM code where GetProperty is probably closer to the spec
language.
* Ion called js::GetElement and js::CallElement which forwarded to GetElementOperation.
This was changed to call GetElementOperation directly (eliminates a VM wrapper).
Depends on D22677
Differential Revision: https://phabricator.services.mozilla.com/D22678
--HG--
extra : moz-landing-system : lando
XPCWrappedNativeScope is now allocated and destroyed with the CompartmentPrivate
that owns it. In follow-up bugs we could merge the two classes (see bug 1032928).
This also removes the dying-scopes list. XPCJSRuntime now stores the list of all
scopes as mozilla::LinkedList.
Differential Revision: https://phabricator.services.mozilla.com/D22492
--HG--
extra : moz-landing-system : lando