Chromium Code Reviews| Index: src/asmjs/asm-wasm-builder.cc |
| diff --git a/src/asmjs/asm-wasm-builder.cc b/src/asmjs/asm-wasm-builder.cc |
| index 00e304bbcb76edd7b89d4408b720cd434c9b2161..ee2ac53483e3d0c0fd63f3e6c3410980d51cd5aa 100644 |
| --- a/src/asmjs/asm-wasm-builder.cc |
| +++ b/src/asmjs/asm-wasm-builder.cc |
| @@ -551,6 +551,14 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> { |
| current_function_builder_->EmitGetLocal( |
| LookupOrInsertLocal(var, var_type)); |
| } |
| + } else if (scope_ == kExportScope) { |
| + Variable* var = expr->var(); |
| + DCHECK(var->is_function()); |
| + uint32_t index = LookupOrInsertFunction(var); |
| + builder_->FunctionAt(index)->SetExported(); |
| + std::string raw_name = "__single_function__"; |
|
Mircea Trofin
2016/09/19 18:42:29
could we have these centrally defined?
bradn
2016/09/19 20:30:38
Done.
|
| + builder_->FunctionAt(index)->SetName( |
| + reinterpret_cast<const char*>(raw_name.data()), raw_name.length()); |
| } |
| } |