Commit Graph

43736 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
79cf8f0120 Bug 1240796 - Implement Uint32x4 extractLane in Ion. r=nbp
Since Uint32 can't be represented in a MIRType_Int32, this function should
return a MIRType_Double.

Allow MSimdExtractElement(Uint32x4) to return a MIRType_Int32 too. It will work
like the double version followed by MTruncateToInt32 which bitcasts the Uint32
value range into the Int32 value range.
2016-02-01 14:55:07 -08:00
Jakob Stoklund Olesen
7cf821edf3 Bug 1240796 - Implement unsigned SIMD compares. r=sunfish
Add a MSimdBinaryComp::AddLegalized function which expands unsigned compares on
target platforms that don't support them directly. The early expansion exposes
the constants to MIR optimizations.

Unsigned comparison is expressed in terms of signed comparison by offsetting
both sides by INT_MIN.
2016-02-01 14:55:07 -08:00
Jakob Stoklund Olesen
3c43eb0443 Bug 1240796 - Implement Uint32x4 <==> Float32x4 conversions. r=sunfish
The conversion from Uint32x4 to Float32x4 is not available as an SSE
instruction, so we need to expand into a larger instruction sequence lifted
from LLVM. Make this expansion early when generating MIR so that it can be
exposed to LICM and GVN optimizations.

The conversion from Float32x4 to Uint32x4 can throw a RangeError. It is handled
similarly to LFloat32x4ToInt32x4. This expansion depends on the details of the
cvttps2dq instruction that can't be expressed in MIR, so it can't be expanded
early.
2016-02-01 14:55:07 -08:00
Jakob Stoklund Olesen
f07719e1fb Bug 1240796 - Connect SIMD.Uint32x4 operations to the Ion inliner. r=bbouvier
Add a new InlinableNative::SimdUint32x4 enumerator, and emit the corresponding
JSJitInfo objects in SIMD.cpp.

Start producing template objects for Uint32x4 operations in BaselineIC.cpp.

Add a new SimdSign enum class to SIMD.h which will be used to distinguish
between signed and unsigned integers in the few places where it matters.

Map the SIMD.Uint32x4 type to the existing MIRType_Int32x4 + SimdSign::Unsigned.
Map SIMD.Int32x4 to MITType_Int32x4 + SimdSign::Signed.

Add a 'SimdSign sign' argument to those inlineSimd...() functions that care.
Some MIR instructions will get similar fields in the following commits.

For now, abort inlining if unsigned vectors are actually encountered. These cases
will be fixed in the following commits.
2016-02-01 14:55:07 -08:00
Jakob Stoklund Olesen
236093fbab Bug 1240796 - Add Uint32x4 support to jit-test/lib/simd.js. r=bbouvier 2016-02-01 14:55:07 -08:00
Jakob Stoklund Olesen
79157fe38d Bug 1240796 - Extract baseline code to GetTemplateObjectForSimd(). r=bbouvier
Extract the code that generates template objects for SIMD operations, and
rewrite it to use the JSJitInfo nativeOp encoding.

This avoids the native function pointer comparisons, and it makes it simpler to
add new SIMD types and operations.
2016-02-01 14:55:07 -08:00
Jakob Stoklund Olesen
fcc5c766d5 Bug 1240796 - Inline SIMD operations that return scalars. r=bbouvier
The extractLane(), anyTrue(), and allTrue() SIMD functions produce scalar
values, and so they don't need a template object. The canInlineSimd() function
was rejecting these functions because of the missing template object.

At the same time, explicitly avoid inlining any SIMD operations if the JIT does
not support SIMD. This was previously controlled by the absense of the template
object.
2016-02-01 14:55:06 -08:00
Jakob Stoklund Olesen
1d208cb18f Bug 1240796 - Detemplatize getOrCreateSimdTypeDescr(). r=bbouvier
This saves some code size in a cold function, and it makes it possible to pass
in the SIMD type as a dynamic argument.

Also detemplatize the static CreateSimdType() to save some code size.

Replace all of the Get*TypeRepr() self-hosting functions with a single
GetSimdTypeDescr() which takes one of the JS_SIMDTYPEREPR_* constants as an
argument instead.

Total code shrink ~ 32 KB.
2016-02-01 14:55:06 -08:00
Jeff Walden
9621f949eb Bug 1216150 - Turn on the experimental Intl.DateTimeFormat.prototype.formatToParts in b2g certified apps. r=fabrice 2016-02-01 12:48:58 -08:00
Jeff Walden
38b610ee4e Bug 1216150 - Split xpc::InitGlobalObject into an options-setting component and a global-object-modifying component, with the options-setting component being called before global object creation in all callers. r=bz 2016-02-01 12:48:03 -08:00
Daniel Näslund
c39e2d7c85 Bug 1239710 - Use CountingSort for Uint8Array and Int8Array; r=mrrrgn 2016-02-01 12:31:17 -06:00
Terrence Cole
a873488772 Bug 1243888 - Derive RootKind automatically from TraceKind; r=sfink 2016-01-27 09:54:53 -08:00
Luke Wagner
f86ae9399e Bug 1244403 - Baldr: put import section first (r=bbouvier) 2016-02-01 10:16:26 -06:00
Luke Wagner
cdbea58a09 Bug 1244403 - Baldr: factor out DynamicLinkData (r=bbouvier) 2016-02-01 10:16:25 -06:00
Luke Wagner
5c170b7d9d Bug 1244403 - Baldr: expose export func entry offsets directly (r=bbouvier) 2016-02-01 10:16:25 -06:00
Luke Wagner
429bc5ee54 Bug 1244403 - Baldr: remove unnecessary 'end' argument from (r=bbouvier) 2016-02-01 10:16:25 -06:00
Luke Wagner
c18385edb7 Bug 1244403 - Baldr: move kind out of WasmAstNode and into WasmAstExpr (r=bbouvier) 2016-02-01 10:16:25 -06:00
Dan Gohman
949a7df989 Bug 1244272 - BaldrMonkey: Implement the f32 and 64 operators. r=luke 2016-01-29 21:14:27 -08:00
Dan Gohman
125f057812 Bug 1244272 - BaldrMonkey: Implement the rest of the i32 binary operators. r=luke 2016-01-29 21:14:22 -08:00
Dan Gohman
14b6b18a6c Bug 1244272 - BaldrMonkey: Implement support for i32.add. r=luke 2016-01-29 21:14:19 -08:00
Phil Ringnalda
b885c4b318 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas
fa7e1ad144 Bug 1235261 - Part 6: Rename AutoInfallibleTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Birunthan Mohanathas
a93e22749f Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Tom Schuster
d15f104195 Bug 1244442 - Warn about Proxy.create and Proxy.createFunction. r=Waldo 2016-01-30 17:46:52 +01:00
Kyle Huey
ce39f191af Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Luke Wagner
877360a557 Fix recent non-unified build bustage (no bug, rs=sunfish) 2016-01-29 21:54:47 -06:00
Wes Kocher
1ee8b92023 Backed out changeset 2c56aed63687 (bug 1219482) to hopefully fix the intermittent hazard failures CLOSED TREE 2016-01-29 10:15:38 -08:00
Jan de Mooij
a84d1e7652 Bug 1206652 part 2 - Disentangle ma_mov and ma_alu. r=nbp 2016-01-29 10:15:50 +01:00
Jan de Mooij
1325f5d300 Bug 1206652 part 1 - Remove ma_mov's SBit argument. r=nbp 2016-01-29 10:15:30 +01:00
Benjamin Bouvier
25ab4c5a8d Bug 1243815: Put hard limits to some variable lengths in wasm; r=luke 2016-01-28 18:56:01 +01:00
Nick Fitzgerald
6f81c8f01d Bug 1240090 - Make owned copies of filenames in JS::ubi::ByFilename. r=jimb
This commit makes the ByFilename census counter create its own owned copies of
script filenames. If we don't do this, and the heap graph we are analyzing is
the live heap, then the ScriptSource (from which we get the filename) could
disappear out from under us. We can't use a ScriptSourceHolder to keep the
ScriptSource alive because we might be analyzing an offline heap snapshot, in
which case there is no ScriptSource at all.
2016-01-28 16:33:00 -05:00
sajitk
1bb0c34cc7 Bug 1219482 - Replace PRLogModuleInfo with LazyLogModule in various files. r=bsmedberg 2016-01-28 10:35:00 -05:00
Nick Fitzgerald
4fbc196f56 Bug 1242691 - Merge overlapping SlotsEdges in the store buffer. r=terrence
Frequently, the mutator will modify nearly the same elements of an object
repeatedly. However, because the set of elements aren't exactly the same, the
single item buffer in front of MonoTypeBuffer can't de-duplicate these
edges. For example, in one CodeMirror test case, we would add 245 SlotsEdges
entries for almost the same 50,000 elements in an object, causing us to trace
these same 50,000 elements 245 times!

This patch makes `js::gc::StoreBuffer::putSlot` check to see if the new range is
overlapping with the last range added, and if so, merge the ranges rather than
adding partially duplicated elements into the store buffer.

This gives a 1000 point increase on Octane's pdf.js subsuite locally. The
CodeMirror test case mentioned above goes from ~10 seconds execution time to
~1.5 seconds, with the max minor gc pause dropping from up to 40 milliseconds,
down to 4 milliseconds.
2016-01-28 15:52:00 -05:00
Shu-yu Guo
aef716ba6e Bug 1242111 - Fix references to oomTest. (r=me) 2016-01-28 18:08:11 -08:00
Shu-yu Guo
6bda3b2173 Bug 1242111 - Handle OOM in UpdateExecutionObservabilityOfScriptsInZone. (r=jimb) 2016-01-28 17:04:01 -08:00
Shu-yu Guo
f91b342e04 Bug 1240503 - Skip the initial block scope when unwinding scopes due to an exception that's thrown in the prologue before the scope chain is properly initialized for a script that starts with a block scope. (r=jorendorff) 2016-01-28 17:04:01 -08:00
Shu-yu Guo
4593fda097 Bug 1234738 - Emit ALIASEDVAR ops or block-scoped lexicals right below global level. (r=jorendorff) 2016-01-28 17:04:01 -08:00
Terrence Cole
8a8e8f75a9 Bug 1234862 - Part 5.1: Followup comment fixes; r=sfink 2016-01-28 14:48:17 -08:00
Luke Wagner
6d10e98724 Bug 1243633 - Baldr: add call/call_import (r=bbouvier) 2016-01-28 11:51:39 -06:00
Luke Wagner
c35dacbaec Bug 1243633 - Odin: switch to lineOrBytecode from line/column (r=bbouvier) 2016-01-28 11:20:13 -06:00
Luke Wagner
7daef7c2d4 Bug 1243633 - Odin: tidy up call emitting (r=bbouvier) 2016-01-28 11:20:08 -06:00
Luke Wagner
1c4250b151 Bug 1243252 - Baldr: add import section (r=bbouvier) 2016-01-28 10:30:41 -06:00
Luke Wagner
d1440afc48 Bug 1243252 - Baldr: refactor exports (r=bbouvier) 2016-01-28 09:21:31 -06:00
Luke Wagner
f23346dd9d Bug 1243252 - Remove const restriction on CharsToNewUTF8CharsZ (r=jandem) 2016-01-28 09:20:19 -06:00
Luke Wagner
2ba311f374 Bug 1243632 - Baldr: check TypeError vs. SyntaxError (r=bbouvier) 2016-01-28 09:20:18 -06:00
Luke Wagner
db8de9d9e1 Bug 1243626 - Baldr: tweak block text format (r=bbouvier) 2016-01-28 09:19:22 -06:00
Jan de Mooij
2064e84108 Bug 1232859 - Don't crash or abort compilation if we're unable to compile the regex stubs. r=nbp 2016-01-28 14:59:42 +01:00
Benjamin Bouvier
44b6b7abd1 Bug 1243031: Throw when WebAssembly is not supported; r=luke
And in deterministic builds, print an error on stderr so that fuzzers know that
they need to abort differential testing fuzzing.
2016-01-27 11:58:41 +01:00
Tom Schuster
cb916a48e0 Bug 1242214 - Rename JSPropertyDescriptor JS::PropertyDescriptor everywhere else. r=smaug 2016-01-28 11:28:04 +01:00
Tom Schuster
32bc8216b8 Bug 1242214 - Rename JSPropertyDescriptor JS::PropertyDescriptor in js. r=sstangl 2016-01-28 11:28:04 +01:00