mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1172517 - track sharedness in global. r=luke
This commit is contained in:
parent
ea255da2dc
commit
31dd3c33be
@ -1168,7 +1168,10 @@ class MOZ_STACK_CLASS ModuleCompiler
|
||||
uint32_t funcIndex_;
|
||||
uint32_t funcPtrTableIndex_;
|
||||
uint32_t ffiIndex_;
|
||||
Scalar::Type viewType_;
|
||||
struct {
|
||||
Scalar::Type viewType_;
|
||||
bool isSharedView_;
|
||||
} viewInfo;
|
||||
AsmJSMathBuiltinFunction mathBuiltinFunc_;
|
||||
AsmJSAtomicsBuiltinFunction atomicsBuiltinFunc_;
|
||||
AsmJSSimdType simdCtorType_;
|
||||
@ -1223,7 +1226,11 @@ class MOZ_STACK_CLASS ModuleCompiler
|
||||
}
|
||||
Scalar::Type viewType() const {
|
||||
MOZ_ASSERT(isAnyArrayView());
|
||||
return u.viewType_;
|
||||
return u.viewInfo.viewType_;
|
||||
}
|
||||
bool viewIsSharedView() const {
|
||||
MOZ_ASSERT(isAnyArrayView());
|
||||
return u.viewInfo.isSharedView_;
|
||||
}
|
||||
bool isMathFunction() const {
|
||||
return which_ == MathBuiltinFunction;
|
||||
@ -1800,7 +1807,8 @@ class MOZ_STACK_CLASS ModuleCompiler
|
||||
return false;
|
||||
if (!module_->addArrayView(vt, maybeField, isSharedView))
|
||||
return false;
|
||||
global->u.viewType_ = vt;
|
||||
global->u.viewInfo.viewType_ = vt;
|
||||
global->u.viewInfo.isSharedView_ = isSharedView;
|
||||
return globals_.putNew(varName, global);
|
||||
}
|
||||
bool addArrayViewCtor(PropertyName* varName, Scalar::Type vt, PropertyName* fieldName, bool isSharedView) {
|
||||
@ -1809,7 +1817,8 @@ class MOZ_STACK_CLASS ModuleCompiler
|
||||
return false;
|
||||
if (!module_->addArrayViewCtor(vt, fieldName, isSharedView))
|
||||
return false;
|
||||
global->u.viewType_ = vt;
|
||||
global->u.viewInfo.viewType_ = vt;
|
||||
global->u.viewInfo.isSharedView_ = isSharedView;
|
||||
return globals_.putNew(varName, global);
|
||||
}
|
||||
bool addMathBuiltinFunction(PropertyName* varName, AsmJSMathBuiltinFunction func, PropertyName* fieldName) {
|
||||
@ -3981,6 +3990,7 @@ CheckNewArrayView(ModuleCompiler& m, PropertyName* varName, ParseNode* newExpr)
|
||||
|
||||
field = nullptr;
|
||||
type = global->viewType();
|
||||
shared = global->viewIsSharedView();
|
||||
}
|
||||
|
||||
if (!CheckNewArrayViewArgs(m, ctorExpr, bufferName))
|
||||
|
@ -7,11 +7,6 @@
|
||||
// Note code is not run, so the only issue here is whether it compiles
|
||||
// properly as asm.js.
|
||||
|
||||
/*
|
||||
|
||||
// Commented out until we can fix bug #1172517, which makes this fail
|
||||
// for other reasons.
|
||||
|
||||
function module_a(stdlib, foreign, heap) {
|
||||
"use asm";
|
||||
|
||||
@ -32,8 +27,6 @@ function module_a(stdlib, foreign, heap) {
|
||||
if (this.SharedArrayBuffer)
|
||||
assertEq(isAsmJSModule(module_a), true);
|
||||
|
||||
*/
|
||||
|
||||
function module_b(stdlib, foreign, heap) {
|
||||
"use asm";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user