Index: src/asmjs/asm-typer.cc |
diff --git a/src/asmjs/asm-typer.cc b/src/asmjs/asm-typer.cc |
index a98c18b5328d4ae12dc5746130b9a56afeffdfa2..20b8d96053d31477ff81d9e9e54a8daa035706e1 100644 |
--- a/src/asmjs/asm-typer.cc |
+++ b/src/asmjs/asm-typer.cc |
@@ -128,7 +128,6 @@ |
script_(script), |
root_(root), |
forward_definitions_(zone), |
- ffi_use_signatures_(zone), |
stdlib_types_(zone), |
stdlib_math_types_(zone), |
module_info_(VariableInfo::ForSpecialSymbol(zone_, kModule)), |
@@ -330,8 +329,8 @@ |
return i->second; |
} |
-AsmTyper::VariableInfo* AsmTyper::Lookup(Variable* variable) const { |
- const ZoneHashMap* scope = in_function_ ? &local_scope_ : &global_scope_; |
+AsmTyper::VariableInfo* AsmTyper::Lookup(Variable* variable) { |
+ ZoneHashMap* scope = in_function_ ? &local_scope_ : &global_scope_; |
ZoneHashMap::Entry* entry = |
scope->Lookup(variable, ComputePointerHash(variable)); |
if (entry == nullptr && in_function_) { |
@@ -423,8 +422,6 @@ |
return AsmType::None(); |
} |
- |
-AsmType* AsmTyper::TypeOf(Variable* v) const { return Lookup(v)->type(); } |
AsmTyper::StandardMember AsmTyper::VariableAsStandardMember(Variable* var) { |
auto* var_info = Lookup(var); |
@@ -2309,20 +2306,9 @@ |
FAIL(call, "Calling something that's not a function."); |
} |
- if (callee_type->AsFFIType() != nullptr) { |
- if (return_type == AsmType::Float()) { |
- FAIL(call, "Foreign functions can't return float."); |
- } |
- // Record FFI use signature, since the asm->wasm translator must know |
- // all uses up-front. |
- ffi_use_signatures_.emplace_back( |
- FFIUseSignature(call_var_proxy->var(), zone_)); |
- FFIUseSignature* sig = &ffi_use_signatures_.back(); |
- sig->return_type_ = return_type; |
- sig->arg_types_.reserve(args.size()); |
- for (size_t i = 0; i < args.size(); ++i) { |
- sig->arg_types_.emplace_back(args[i]); |
- } |
+ if (callee_type->AsFFIType() != nullptr && |
+ return_type == AsmType::Float()) { |
+ FAIL(call, "Foreign functions can't return float."); |
} |
if (!callee_type->CanBeInvokedWith(return_type, args)) { |