Index: src/asmjs/asm-wasm-builder.cc |
diff --git a/src/asmjs/asm-wasm-builder.cc b/src/asmjs/asm-wasm-builder.cc |
index 60bdd9a5a8473311ae54c694fd1ec53783f33e63..091f7935f6e3b4db3651cd92f2204a5904c8f6a4 100644 |
--- a/src/asmjs/asm-wasm-builder.cc |
+++ b/src/asmjs/asm-wasm-builder.cc |
@@ -1339,13 +1339,16 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> { |
bool returns_value = true; |
switch (call_type) { |
case Call::OTHER_CALL: { |
- DCHECK_EQ(kFuncScope, scope_); |
VariableProxy* proxy = expr->expression()->AsVariableProxy(); |
if (proxy != nullptr) { |
+ DCHECK(kFuncScope == scope_ || |
+ typer_->VariableAsStandardMember(proxy->var()) == |
+ AsmTyper::kMathFround); |
if (VisitStdlibFunction(expr, proxy)) { |
return true; |
} |
} |
+ DCHECK(kFuncScope == scope_); |
VariableProxy* vp = expr->expression()->AsVariableProxy(); |
DCHECK_NOT_NULL(vp); |
if (typer_->TypeOf(vp)->AsFFIType() != nullptr) { |