зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1240524: Fix AsmJS checkedValueType of Bool32x4; r=luke
--HG-- extra : rebase_source : a0787940cc94668766e7e14c3b865c1083d83eb0
This commit is contained in:
Родитель
97ef42843e
Коммит
f20249c9de
|
@ -1250,6 +1250,9 @@ class Type
|
|||
return ValType::F64;
|
||||
else if (isInt32x4())
|
||||
return ValType::I32x4;
|
||||
else if (isBool32x4())
|
||||
return ValType::B32x4;
|
||||
MOZ_ASSERT(isFloat32x4());
|
||||
return ValType::F32x4;
|
||||
}
|
||||
|
||||
|
@ -4388,7 +4391,7 @@ CheckInternalCall(FunctionValidator& f, ParseNode* callNode, PropertyName* calle
|
|||
ExprType ret, Type* type)
|
||||
{
|
||||
switch (ret) {
|
||||
case ExprType::Void: if (!f.writeOp(Expr::CallInternal)) return false; break;
|
||||
case ExprType::Void: if (!f.writeOp(Expr::CallInternal)) return false; break;
|
||||
case ExprType::I32: if (!f.writeOp(Expr::I32CallInternal)) return false; break;
|
||||
case ExprType::I64: MOZ_CRASH("no int64 in asm.js");
|
||||
case ExprType::F32: if (!f.writeOp(Expr::F32CallInternal)) return false; break;
|
||||
|
|
|
@ -1221,6 +1221,9 @@ for (var i = 1; i < 10; ++i) {
|
|||
asmLink(asmCompile('glob', 'ffi', c), this, ffi)();
|
||||
}
|
||||
|
||||
// Bug 1240524
|
||||
assertAsmTypeFail(USE_ASM + B32 + 'var x = b4(0, 0, 0, 0); frd(x);');
|
||||
|
||||
// Passing boolean results to extern functions.
|
||||
// Verify that these functions are typed correctly.
|
||||
function isone(x) { return (x===1)|0 }
|
||||
|
|
Загрузка…
Ссылка в новой задаче