| Index: src/asmjs/asm-typer.cc
|
| diff --git a/src/asmjs/asm-typer.cc b/src/asmjs/asm-typer.cc
|
| index 0ac40ec6f7ad73d0c30bc6ded3ba706e43a071dd..af0b5310bf0b4174992505fb7fc12f83268558ef 100644
|
| --- a/src/asmjs/asm-typer.cc
|
| +++ b/src/asmjs/asm-typer.cc
|
| @@ -2854,6 +2854,12 @@ AsmType* AsmTyper::VariableTypeAnnotations(
|
| // However, the errata doc (and actual programs), use integer values
|
| // with fround(..).
|
| // Skipping the check that would go here to enforce this.
|
| + // Checking instead the literal expression is at least a number.
|
| + if (!src_expr->raw_value()->IsNumber()) {
|
| + FAIL(initializer,
|
| + "Invalid float type annotation - expected numeric literal for call "
|
| + "to fround.");
|
| + }
|
|
|
| return AsmType::Float();
|
| }
|
|
|