Also, an assert could have been incorrectly triggered, if eviction occurred on a source buffer while data was also being appended to it.
MozReview-Commit-ID: 6gVHZdbL07B
Currently endTime is calculated when getComputedTiming() is called. As a
result, the value returned there doesn't necessarily reflect what we are using
in the model. It would be more simple, consistent and useful if we simply
calculate this as part of GetComputedTimingAt and use it both internally and in
the result to getComputedTiming().
Before we go fixing endTime, we should add tests that activeDuration (which
endTime builds on) is being calculated correctly. (Spoiler: it wasn't, hence
parts 2 and 3 in this patch series.)
With the added tests in part 4 we crash without this change because we end up
trying to multiply an infinite iteration duration by a zero iteration count
which trips an assertion in StickyTimeDuration. Hence we fix this behavior
before adding the tests.
This patch brings the behavior of this method into line with the comment that
describes it and other methods in this class that have a similar test.
I discovered this bug while exercising this code from animation code and was
getting test failures due to returning -Infinity instead of the expected
Infinity.
This patch just simplifies the keyframe-effect tests so that we don't have to
repeat default values. This makes the tests shorter, easier to scan, and
easier to understand what is being tested.
In some cases we still repeat the default values in order to indicate that
we're testing that we get a particular default value.
These functions have been replaced by the shiftRightByScalar function which
behaves differently on signed and unsigned SIMD types.
Add some Uint32x4 tests to make up for the reduced test coverage.
MozReview-Commit-ID: 6BKSMR07zDa
With part 1, many more GCs are compartmental, so it is no longer a
good indication that there is heavy activity. If we don't regularly
try to shrink GC buffers, we don't decommit arenas enough, causing a
large regression in memory usage.
Specifically we make the following changes:
1) Remove WorkerSameThreadRunnable::PostRun, because it does exactly the same
things as WorkerRunnable::PostRun.
2) Always treat ModifyBusyCountFromWorker as infallible in terms of throwing
JS exceptions.
3) Change ExtendableFunctionalEventWorkerRunnable::PostRun to properly call
its superclass PostRun so we will correctly decrement the busy count our
PreDispatch incremented.
4) Document why some overrides of PreDispatch/PostDispatch are needed and
don't call into the superclass
- Generate and pass sequential frame indexes into the ovr_GetTrackingState call and the corresponding call to ovr_SubmitFrame
MozReview-Commit-ID: 5tJl5YJt7Eo
Treat global variables the same as function arguments and return values: No
unsigned SIMD types allowed. This simplifies interoperation with WebAssembly.
Add a Type::isGloblVarType() which can be used to check for valid types.
Fold CheckGlobalVariableImportExpr into its single caller.
Remove Type::var(ValType) and Type::ret(ExprType). These backwards conversions
were only used for diagnostics, and we can use the existing ToCString() function
for that. Move this function form Wasm.cpp to WasmTypes.h so it can be used
everywhere.
MozReview-Commit-ID: FolGlCTVmgZ
Add Uint32x4 to NumLit and Type classes.
Reject unsigned SIMD types in function signatures to avoid confusion when
interoperating with WebAssembly.
MozReview-Commit-ID: 7FvQKKITVKR
Also move IsSimdTypeName() into builtin/SIMD.cpp and handle all SIMD type names
there too.
Use IsSimdValidOperationType(simdType, SimdOperation::Constructor) to check for
supported SIMD types in asm.js instead of depending on IsSimdTypeName() to only
return true on supported types.
MozReview-Commit-ID: FZrnPZc8zmJ
The wasm types don't have signed/unsigned SIMD integers. Add enumerators for
those unsigned simd operations that behave differently than their signed I32x4
counterparts.
Implement wasm code generation for unsigned SIMD types.
Split the convertSimd() function into two variants for conversions and bitcasts
respectively. Add a SimdSign argument to the conversion variants.
Add a SimdSign argument to the extractSimdElement() function. This is not
strictly needed for I32x4 since wasm uses I32 for both signed and unsigned ints.
It will be required for the I8x16 and I16x8 types, though, because the lane
value needs to be extended to an I32.
Split out the binarySimdComp function for binary comparisons, and thread
through a SimdSign argument.
Add a SimdSign to EmitSimdOp() and thread it through where needed.
MozReview-Commit-ID: B8FHOHzjbBX
The MSimd*::NewAsmJS() factory functions are not longer needed since the normal
MSimd*::New() functions also require the SIMD arguments to be unboxed since
bug 1244254.
Remove the trivial NewAsmJS functions here. The remaining SIMD NewAsmJS
functions will be removed in the next commit.
MozReview-Commit-ID: JtgRKZTmrzS
These two functions can also take a Type argument instead of ValType/ExprType.
This makes it possible to avoid some explicit SIMD type enumerations, and the
Type <= ValType subtyping test is no longer needed.
MozReview-Commit-ID: 1nkMDUdgLkE
When validating function calls and coercions, use a canonical Type instead of a
wasm::ExprType to express the desired return type.
This will make it possible to distinguish signed/unsigned SIMD types during
validation.
MozReview-Commit-ID: 4S0SuRRgCzm
The WebAssembly and the asm.js type systems are diverging. In particular,
WebAssembly will not distinguish signed/unsigned SIMD types, while asm.js must
since it is compatible with SIMD.js. The wasm::ValType enum also has an I64
which is not supported by asm.js
Reduce OdinMonkey's dependency on wasm::ValType by returning a canonical 'class
Type' instead from these functions:
- IsCoercionCall()
- CheckTypeAnnotation()
- CheckArgumentType()
Avoid wasm::ValType for asm.js locals. We want to allow signed/unsigned SIMD
locals.
Remove NumLit::type().
MozReview-Commit-ID: Eutj6QKqn02
This subset of the asm.js types corresponds to the Void type and all the
coercion targets. It corresponds to wasm::ExprType, except:
- asm.js does not support I64.
- asm.js distinguishes signed/unsigned SIMD types, wasm does not.
The function Type::canonicalize() maps a type into the canonical set.
Type::isCanonical() checks for membership.
This subset of Type::Which will be used to replace wasm::ValType and
wasm::ExprType in the asm.js type checking code. This makes it possible to
type-check unsigned SIMD types correctly.
Eliminate Type:checkedValueType(). Use Type::canonicalToValType() instead.
MozReview-Commit-ID: EBrCiPVYzh8
This function is only used by CheckIsVarType which is actually used for
checking function arguments.
Rename isVarType -> isArgType and CheckIsVarType -> CheckIsArgType to better
match the usage.
This frees up the concept of a "var type" for the following patch.
MozReview-Commit-ID: 4J63ammf3zS