Commit Graph

65554 Commits

Author SHA1 Message Date
Tooru Fujisawa
2865366ad6 Bug 1472101 - Part 1: Remove some duplicate empty lines in auto-generated BinAST code. r=Yoric 2018-07-01 20:41:44 +09:00
Tooru Fujisawa
18f5f5fee7 Bug 1472101 - Part 0: Add a script to build auto-generated BinAST code. r=Yoric 2018-07-01 20:41:44 +09:00
Tooru Fujisawa
51509797fa Bug 1460833 - Check interface when parsing field with single interface. r=Yoric 2018-07-01 20:41:43 +09:00
Bogdan Tara
da75179b31 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-01 00:57:20 +03:00
Bogdan Tara
de56c19e62 Merge inbound to mozilla-central. a=merge 2018-07-01 00:51:17 +03:00
Andreea Pavel
1bf7ac45bb Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-06-30 13:10:01 +03:00
Andreea Pavel
91a9c110e2 Merge mozilla-inbound to mozilla-central. a=merge 2018-06-30 12:49:32 +03:00
André Bargull
e09a53c18a Bug 1471788: Apply ToNumber conversion even when the typed array write is out-of-bounds. r=evilpie
--HG--
extra : rebase_source : 9c1cc0307b8c1800f99e0884975ecd935b0e5a5d
2018-06-29 13:46:04 -07:00
jgilbert@mozilla.com
1527dfb596 Bug 1472402 - -MG for clang-cl breaks missing-include error reporting. - r=froydnj
MozReview-Commit-ID: EhtNTZcXBrt

--HG--
extra : rebase_source : 900afc0e4cfd0dde1c0f4f3ec883e879a295567c
2018-06-29 20:18:08 -07:00
Jeff Walden
80abb71067 Bug 1472066 - Add some helper functions to enable (once the non-integral Utf8Unit code unit type lands, soon) dealing with Utf8Unit as the type of UTF-8 source code in addition to char16_t for UTF-16 source code. r=arai
--HG--
extra : rebase_source : 1f050dd6c0cb07a8b5d8bc257eb42ec78d699a33
2018-06-28 20:17:17 -07:00
Jeff Walden
2f902e38d0 Bug 1472066 - Specialize TokenStreamCharsBase::fillCharBufferWithTemplateStringContents for char16_t now that its alternative UTF-8 implementation will have to function a bit differently to write data into a char16_t charBuffer. r=arai
--HG--
extra : rebase_source : 8c6e13e16777abc910aaf46d4654ae03e88f32fa
2018-06-28 20:14:27 -07:00
Jeff Walden
e249f558aa Bug 1472031 - Add SourceUnits::matchHexDigits and remove SourceUnits::peekCodeUnits used for the same ends (but that also performed a needless copy). r=arai
--HG--
extra : rebase_source : bad3e97ead1b4d72dd39420bfc96614913464d62
2018-06-28 16:08:53 -07:00
Jeff Walden
76990b22f2 Bug 1472031 - Avoid copying potential directives in TokenStreamSpecific::getDirective. r=arai
--HG--
extra : rebase_source : d6386e0fe99a2fe9050d25952426205779b8ee2e
2018-06-28 15:39:14 -07:00
Jeff Walden
75148cb5d5 Bug 1472031 - Implement a SourceUnits::remaining() function exposing how many code units are left. r=arai
--HG--
extra : rebase_source : a0e1e6add04478f6dda4407943772683f77fad24
2018-06-28 15:34:12 -07:00
Jeff Walden
4ec8af2179 Bug 1472031 - Define TokenStreamAnyChars::updateFlagsForEOL inline in the header, for simplicity. r=arai
--HG--
extra : rebase_source : 970066032cae253d5b816f188d03b23025d28729
2018-06-28 15:33:29 -07:00
Jeff Walden
4f9aef7e10 Bug 1472031 - Rename atomizeChars to atomizeSourceChars to clarify it's only for atomizing directly from source text. r=arai
--HG--
extra : rebase_source : 0a666084c0695aac7ac994c2b96d0f699965657c
2018-06-28 15:32:41 -07:00
Jeff Walden
7ed2b26ceb Bug 1472031 - Introduce a drainCharBufferIntoAtom function to clear charBuffer and create an atom from the chars that were in it. r=arai
--HG--
extra : rebase_source : bd8f3114f8704b7a266ccf21d4c110fe28ab77f1
2018-06-28 15:31:13 -07:00
Jeff Walden
da3129de0b Bug 1467336 - Change a bunch of 'character' nomenclature in token stream code to 'code unit', completing the transition from tokenizing by UTF-16 'character' to tokenizinng by UTF-8/16 code unit. (There are straggling places where algorithms will need to be specialized for UTF-8, or functions will need to move within the TokenStream* hierarchy to permit such; but what is in the tree now universally acts on code units first, full code points second.) r=arai
--HG--
extra : rebase_source : 06fa722d16b801f9db7f38110756d8a8f62b6617
2018-06-28 02:30:08 -07:00
Jeff Walden
8d4d43a2d1 Bug 1467336 - Remove GeneralTokenStreamChars::{,un}getChar now that they're unused. r=arai
--HG--
extra : rebase_source : 908ffc7370dafe00bb6266ec5817b40bb353d93f
2018-06-28 02:27:50 -07:00
Jeff Walden
3da23e1993 Bug 1471465 - Fix some issues with ungetting LineTerminatorSequence in certain places. r=arai
--HG--
extra : rebase_source : 82a7a98fc500d26be67363c45f91662887b12091
2018-06-27 13:26:14 -07:00
Jeff Walden
69afaf684f Bug 1471464 - Make getNonAsciiCodePoint, getFullAsciiCodePoint, and isAsciiCodePoint all take |int32_t| and not |CharT|, because they're all passed |int32_t| from |getCodeUnit()| or a code point-getting mechanism. r=arai
--HG--
extra : rebase_source : 2582f93ab5c048bb0df42563331a450423529e3c
2018-06-27 13:26:13 -07:00
Jeff Walden
9d4fe70e96 Bug 1471463 - Move TokenStreamCharsBase::tokenbuf and related functions into a new TokenStreamCharsShared base class, make the character type always char16_t, and rename it/them to 'charBuffer' for clarity. r=arai
--HG--
extra : rebase_source : ac4e81db943a1f69a8caa0722d4239b4fb5dc1c1
2018-06-27 13:25:57 -07:00
Jeff Walden
8fc3ac9afc Remove a |false &&| inadvertently left in a patch as part of testing a fallback code path. Followup to bug 1457560, r=me, thanks to IRC for pointing it out recently
--HG--
extra : rebase_source : e1561f2e42d23d7c0ee38599b16661f85f3fa7c4
2018-06-29 18:01:07 -07:00
Jeff Walden
83a1c5a302 Fully privatize the contents of the JS::Value union now that it cannot be POD because it has a non-trivial default constructor. No bug, r=me as trivial
--HG--
extra : rebase_source : 222290ba211e2fbe1693498a42d43a2064af45b8
2018-06-26 16:18:55 -07:00
Coroiu Cristina
a4cd34df05 Merge mozilla-central to autoland a=merge on a CLOSED TREE 2018-06-30 01:00:54 +03:00
David Major
67c0e7ceb2 Bug 1471310: Disable the emptiness assertion in ProtectedRegionTree. r=nbp
This is causing random failures with clang-cl and per the bug discussion we have better mechanisms to catch leaks.
2018-06-29 13:28:09 -04:00
David Major
56b39c6150 Bug 1471310 - Clear the Installed flag when removing the MemoryProtectionExceptionHandler. r=luke 2018-06-29 13:27:57 -04:00
Andrew Swan
07dcc1c764 Bug 1451519 Convert specialpowers to a webextension r=kmag
This is a quick-and-dirty port.  It might be nice to replace
SpecialPowersObserver with the webextensions content script injection
system at some point, but that isn't practical right now (since WE experiments
cannot implement new APIs visible to content scripts).

MozReview-Commit-ID: GinCu3VcbWK

--HG--
rename : testing/specialpowers/bootstrap.js => testing/specialpowers/api.js
extra : rebase_source : 0faf7d21c8868c957ddc7fede0d56809f27dc161
extra : intermediate-source : ffb9ce93b92dd6396bfe038d3f6a8bcf929ec277
extra : source : cca596eadd0437dc75b75c119b6c7a405805f703
2018-06-27 13:10:51 -07:00
Coroiu Cristina
896ef35dfd Backed out changeset 722113b8204d (bug 1451519) for browser-chrome failures at browser/base/content/test/performance/browser_startup_content.js on a CLOSED TREE
--HG--
rename : testing/specialpowers/api.js => testing/specialpowers/bootstrap.js
2018-06-29 22:13:46 +03:00
Bogdan Tara
fa8c0e96eb Backed out 4 changesets (bug 1461616, bug 1450261) for wasm related spidermonkey build bustages CLOSED TREE
Backed out changeset aa826be7a24a (bug 1461616)
Backed out changeset b05573ae795a (bug 1450261)
Backed out changeset ddbbcea98cde (bug 1450261)
Backed out changeset 1478fb0f82de (bug 1450261)
2018-06-29 17:28:58 +03:00
Benjamin Bouvier
069e11d14f Bug 1461616: Fix wasm/gc/debugger test so it actually tests something; r=luke
--HG--
extra : rebase_source : edca5efaecd89d0dd4988af0014d34ed47b20308
extra : amend_source : 312f6598d76968d89845bc699cfe7612a62d76b6
2018-06-28 10:13:57 +02:00
Kris Maglione
2bbae5374b Bug 1470365: Part 1 - Add a compact, read-only, shared-memory string map class. r=erahm
This class implements a shared memory key-value store that fits into a single
memory mapped segment. All of the runtime data for its instances are stored in
the shared memory region, which means that memory overhead for each instance
in each process is only a few bytes.

Importantly, the key and value strings returned by this class are also
pointers into the shared memory region, which means that once an instance is
created, its memory cannot be unmapped until process shutdown.

For the uses I intend to put it to, this is a reasonable constraint. If we
need to use it for shorter-lived maps in the future, we can add an option to
return non-literal dependent strings that will be copied if they need to be
kept alive long term.

MozReview-Commit-ID: 5BwAaDsb7HS

--HG--
extra : rebase_source : b472fe628018f88a2c4d6b3de4b7143aeca55e14
extra : absorb_source : 5cdeb568cfd2b4a5a767191402e699e61e653b3b
2018-06-29 22:50:41 -07:00
Kris Maglione
fd093e7cca Bug 1463587: Part 1 - Add helper class for creating snapshots of shared memory regions. r=jld,erahm
This class allows us to map a read-write shared memory region, and then safely
remap it read-only, so that it can be shared with sandboxed content processes.

MozReview-Commit-ID: 2PJMQgOwA4V

--HG--
extra : rebase_source : c556cabfa7d379a91dc9ef7171ac0a7d7d8fb32e
extra : absorb_source : e78e304ed95891c694050f79a0bb5d40d11ee884
2018-06-22 20:30:23 -07:00
André Bargull
4db79fda8c Bug 1471931 - Part 5: Use MakeUnique in more places and replace manual js_delete with UniquePtr. r=sfink
--HG--
extra : rebase_source : cb6018da067352c1c1a04c3ff0385fa0cf70e020
2018-06-29 02:33:51 -07:00
André Bargull
8695012030 Bug 1471931 - Part 4: Add NewString and NewStringDontDeflate functions which accept UniquePtr. r=sfink
--HG--
extra : rebase_source : 19abdbf337c92c6d01440330fd582852b2821753
2018-06-28 09:30:46 -07:00
André Bargull
996da1bf7f Bug 1471931 - Part 3: Switch to pod_calloc_with_extra, new_, make_pod_array, and make_zeroed_pod_array where possible. r=sfink
--HG--
extra : rebase_source : 221362e7e3932ecb3f5bcf748035d5671e15e63b
2018-06-28 09:26:02 -07:00
André Bargull
3a0781eb94 Bug 1471931 - Part 2: Replace manual memory management with UniquePtr in a few places. r=sfink
--HG--
extra : rebase_source : dbdd66450524fd4b10704a557df0fe5b7c45a040
2018-06-28 09:17:05 -07:00
André Bargull
1a557942d7 Bug 1471931 - Part 1: Replace some js_malloc/js_calloc/js_realloc with their js_pod_malloc/js_pod_calloc/js_pod_realloc counterparts. r=sfink
--HG--
extra : rebase_source : bb479e5f058fe51f62fc5584ec41b33eeffc77f5
2018-06-28 09:07:44 -07:00
Andrew Swan
849bbbb42d Bug 1451519 Convert specialpowers to a webextension r=kmag
This is a quick-and-dirty port.  It might be nice to replace
SpecialPowersObserver with the webextensions content script injection
system at some point, but that isn't practical right now (since WE experiments
cannot implement new APIs visible to content scripts).

MozReview-Commit-ID: GinCu3VcbWK

--HG--
rename : testing/specialpowers/bootstrap.js => testing/specialpowers/api.js
extra : rebase_source : 8be131e80d95a6bf6e86c994fdfa40c14ba610eb
extra : source : cca596eadd0437dc75b75c119b6c7a405805f703
2018-06-27 13:10:51 -07:00
Julian Seward
65b38c07e5 Bug 1467415 - Importable mutable globals break alias analysis. r=lth.
Currently, do-these-references-alias queries for Wasm global variable
accesses are handled incorrecty.  We fail to identify the case where both
references are indirect (that is, imported) as possibly-aliasing.  This can
lead to incorrect code generation in some pretty simple cases involving
globals, when compiling Wasm via IonMonkey.

This commit fixes that.  It also adds clarifying comments to
MWasmLoadGlobalVar::congruentTo and MWasmLoadGlobalVar::valueHash pertaining
to equivalance-of-loaded-values assessments.

--HG--
extra : rebase_source : 3f77fa1fd0085ab1922b8eaf7cb2d9891bc6e390
2018-06-29 11:49:35 +02:00
Lars T Hansen
1236b3ccb8 Bug 1459900 - Automatic upcasts through prefix supertyping. r=luke
This augments the Ref type patch by making the subtype test perform automatic
upcasts to prefixes.  The prefixes are still quite strict; corresponding Ref
types must name the same underlying type and corresponding fields must have the
same mutability.

--HG--
extra : rebase_source : 43cc552e77f9e3f5d7f7b2fa761d956c9c61f149
extra : intermediate-source : bb1d37aa16dd0dbdf21c80e34156026693b898cf
extra : source : 2c8c0301cc33ca0af490629a999f2d2dd854d72f
2018-06-13 09:51:46 -07:00
Lars T Hansen
d7268b5139 Bug 1459900 - Track structure field mutability. r=luke
The StructType and AstStructType machinery must retain the information about
field mutability (to be used by subsequent patches).

For StructType, I opted to create a StructField structure that holds the
information per field.  This works well except when we (occasionally, not in
this patch) need an array of ValTypes for some existing functionality.

For AstStructType, I opted to keep the array of mutability flags separate from
the arrays of names and field types, because this was simplest.

In either case, we could do it the other way.

--HG--
extra : rebase_source : a99a2ff5619441f4d0d428fdf1890adef892d5aa
extra : source : 78d954331af90f6f81bd86595beef2c15952510f
2018-06-27 13:40:56 +02:00
Lars T Hansen
195b5172c0 Bug 1459900 - Ref types with a simple type calculus. r=luke
We generalize ExprType and StackType in the same way as ValType, in
order to reduce the scope for error.  (Intermediate solutions that
avoided this turned out to be too error-prone.)  ExprType, StackType,
and ValType now share a representation of a TypeCode + reference type
index, called PackedTypeCode, but don't otherwise share much code -
ExprType is going away soon and StackType will change.

We then generalize many of the Ast nodes so that we can represent the
new types available in the binary and textual formats.  This is
wrenching in the same way that generalizing ValType and ExprType was.

Finally we provide parsing, resolution, printing, and validation of
(ref T) where T is some structure type.  This code should be general
enough to later expand it to array types.

The type calculus here is that (ref n) == (ref m) if n == m, ie, these
are nominally equivalent; the only new subtype relationships are that
(ref n) <: (ref n) and (ref n) <: anyref.  If the subtyping of anyref
were to go away there's a small amount of work that would have to be
done to handle the polymorphism of ref.is_null.

--HG--
extra : rebase_source : 7a1a01d1f5624baeb29383a9ae6a5bdf03411181
extra : intermediate-source : dc8f0270e0e3932ba661a57496401d00903c9ba2
extra : source : 3c5da122b7034dae69d16ca9e577afb93cf7b2c1
2018-05-28 18:59:29 +02:00
Lars T Hansen
1bfdd2e36e Bug 1471289 - Handle 'new WebAssembly.Global' on i64 with default value. r=jseward
As a tweak the wasm CG has decided to allow the special case where an i64 global is
created from JS with the default zero value, while we're waiting for BigInt and
more general i64 support.  This amounts to removing the error we would otherwise
signal in this case.

--HG--
extra : rebase_source : 264c1907e0787f067cc954c98726733227e79a78
2018-06-28 10:06:03 +02:00
André Bargull
781fc92292 Bug 1471900: Change return type of JS_EncodeStringToBuffer to bool. r=jandem 2018-06-28 07:35:20 -07:00
Jan de Mooij
b6456d44da Bug 1471924 part 3 - Add a proxy testcase. r=anba 2018-06-29 11:30:27 +02:00
Jan de Mooij
8bbee59a49 Bug 1471924 part 2 - Enter callee's realm when calling Class call/construct hooks. r=luke 2018-06-29 11:21:02 +02:00
Jan de Mooij
341cc8a5d5 Bug 1471924 part 1 - Stop pretending proxies have a JSNative call/construct hook. r=luke 2018-06-29 11:21:02 +02:00
Tooru Fujisawa
c02240a9e5 Bug 1412200 - Do not store the then property into thenable job if it is the original Promise.prototype.then. r=anba 2018-06-29 17:13:01 +09:00
Jan de Mooij
8ac43f77d0 Bug 1471844 - Implement cx->realm switching for optimized DOM calls in Ion. f=bz r=luke 2018-06-29 09:02:46 +02:00