Back out 3dbc486831a4 (bug 882012) for jit-test failures on a CLOSED TREE

This commit is contained in:
Matt Brubeck 2013-06-12 17:02:04 -07:00
parent 473f3f52c4
commit 986a98a293
2 changed files with 1 additions and 17 deletions

View File

@ -3246,19 +3246,9 @@ CheckStoreArray(FunctionCompiler &f, ParseNode *lhs, ParseNode *rhs, MDefinition
if (!CheckArrayAccess(f, lhs, &viewType, &pointerDef))
return false;
Use use;
switch (TypedArrayStoreType(viewType)) {
case ArrayStore_Intish:
use = Use::ToInt32;
break;
case ArrayStore_Doublish:
use = Use::ToNumber;
break;
}
MDefinition *rhsDef;
Type rhsType;
if (!CheckExpr(f, rhs, use, &rhsDef, &rhsType))
if (!CheckExpr(f, rhs, Use::NoCoercion, &rhsDef, &rhsType))
return false;
switch (TypedArrayStoreType(viewType)) {

View File

@ -1,8 +1,5 @@
load(libdir + "asm.js");
assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { i32[0>>2] = 4.0; return i32[0>>2]|0; } return f');
assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { f32[0>>2] = 4; return +f32[0>>2]; } return f');
assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { var x=0,y=0; return i8[x+y]|0 } return f');
assertAsmTypeFail('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { var x=0,y=0; return u8[x+y]|0 } return f');
@ -164,6 +161,3 @@ assertEq(new Int32Array(BUF_64KB)[12], 11);
assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return u32[12]|0 } return f'), this, null, BUF_64KB)(), 11);
new Float64Array(BUF_64KB)[0] = 3.5;
assertEq(asmLink(asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f() { return +-f64[0] } return f'), this, null, BUF_64KB)(), -3.5);
// Bug 882012
assertEq(asmLink(asmCompile('stdlib', 'foreign', 'heap', USE_ASM + "var identity=foreign.identity;var doubles=new stdlib.Float64Array(heap);function g(){doubles[0]=identity(2.0);return +doubles[0];}return g"), this, {identity: x => x}, BUF_64KB)(), 2.0);