diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-01-10 16:14:56 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-10 16:14:56 -0800 |
commit | 66385f1ad6c16b104e2cf4e9c7010aec8e3b3432 (patch) | |
tree | a3b851ab0cbd9a0549c60d4f36c45f622edc517a /src | |
parent | 1cc353a06dce586fb1515026d091f62335493280 (diff) | |
download | binaryen-66385f1ad6c16b104e2cf4e9c7010aec8e3b3432.tar.gz binaryen-66385f1ad6c16b104e2cf4e9c7010aec8e3b3432.tar.bz2 binaryen-66385f1ad6c16b104e2cf4e9c7010aec8e3b3432.zip |
runFunction => runOnFunction (we run on the function, not run the function) (#1356)
Diffstat (limited to 'src')
-rw-r--r-- | src/asm2wasm.h | 4 | ||||
-rw-r--r-- | src/binaryen-c.cpp | 4 | ||||
-rw-r--r-- | src/pass.h | 6 | ||||
-rw-r--r-- | src/passes/ReReloop.cpp | 2 | ||||
-rw-r--r-- | src/passes/SSAify.cpp | 2 | ||||
-rw-r--r-- | src/passes/pass.cpp | 4 | ||||
-rw-r--r-- | src/wasm-module-building.h | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 8688edb87..b5f701dac 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -976,10 +976,10 @@ void Asm2WasmBuilder::processAsm(Ref ast) { passRunner.addDefaultFunctionOptimizationPasses(); for (auto& pair : trappingFunctions.getFunctions()) { auto* func = pair.second; - passRunner.runFunction(func); + passRunner.runOnFunction(func); } for (auto* func : extraSupportFunctions) { - passRunner.runFunction(func); + passRunner.runOnFunction(func); } }, debug, false /* do not validate globally yet */); } diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index c91825882..0c687c249 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -2193,7 +2193,7 @@ void BinaryenFunctionOptimize(BinaryenFunctionRef func, BinaryenModuleRef module Module* wasm = (Module*)module; PassRunner passRunner(wasm); passRunner.addDefaultOptimizationPasses(); - passRunner.runFunction((Function*)func); + passRunner.runOnFunction((Function*)func); } void BinaryenFunctionRunPasses(BinaryenFunctionRef func, BinaryenModuleRef module, const char **passes, BinaryenIndex numPasses) { if (tracing) { @@ -2213,7 +2213,7 @@ void BinaryenFunctionRunPasses(BinaryenFunctionRef func, BinaryenModuleRef modul for (BinaryenIndex i = 0; i < numPasses; i++) { passRunner.add(passes[i]); } - passRunner.runFunction((Function*)func); + passRunner.runOnFunction((Function*)func); } // diff --git a/src/pass.h b/src/pass.h index 236878a1a..cc8261731 100644 --- a/src/pass.h +++ b/src/pass.h @@ -130,7 +130,7 @@ struct PassRunner { void run(); // Run the passes on a specific function - void runFunction(Function* func); + void runOnFunction(Function* func); // Get the last pass that was already executed of a certain type. template<class P> @@ -182,7 +182,7 @@ public: // Implement this with code to run the pass on a single function, for // a function-parallel pass - virtual void runFunction(PassRunner* runner, Module* module, Function* function) { + virtual void runOnFunction(PassRunner* runner, Module* module, Function* function) { WASM_UNREACHABLE(); } @@ -231,7 +231,7 @@ public: WalkerType::walkModule(module); } - void runFunction(PassRunner* runner, Module* module, Function* func) override { + void runOnFunction(PassRunner* runner, Module* module, Function* func) override { setPassRunner(runner); WalkerType::setModule(module); WalkerType::walkFunction(func); diff --git a/src/passes/ReReloop.cpp b/src/passes/ReReloop.cpp index ff1eec6b5..d96b95715 100644 --- a/src/passes/ReReloop.cpp +++ b/src/passes/ReReloop.cpp @@ -296,7 +296,7 @@ struct ReReloop final : public Pass { // TODO: optimize with this? } - void runFunction(PassRunner* runner, Module* module, Function* function) override { + void runOnFunction(PassRunner* runner, Module* module, Function* function) override { // since control flow is flattened, this is pretty simple // first, traverse the function body. note how we don't need to traverse // into expressions, as we know they contain no control flow diff --git a/src/passes/SSAify.cpp b/src/passes/SSAify.cpp index fd274e28d..b2e75fce3 100644 --- a/src/passes/SSAify.cpp +++ b/src/passes/SSAify.cpp @@ -54,7 +54,7 @@ struct SSAify : public Pass { Function* func; std::vector<Expression*> functionPrepends; // things we add to the function prologue - void runFunction(PassRunner* runner, Module* module_, Function* func_) override { + void runOnFunction(PassRunner* runner, Module* module_, Function* func_) override { module = module_; func = func_; LocalGraph graph(func, module); diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index 9fe2980fd..2820b59e5 100644 --- a/src/passes/pass.cpp +++ b/src/passes/pass.cpp @@ -308,7 +308,7 @@ void PassRunner::run() { } } -void PassRunner::runFunction(Function* func) { +void PassRunner::runOnFunction(Function* func) { if (options.debug) { std::cerr << "[PassRunner] running passes on function " << func->name << std::endl; } @@ -332,7 +332,7 @@ void PassRunner::runPassOnFunction(Pass* pass, Function* func) { assert(pass->isFunctionParallel()); // function-parallel passes get a new instance per function auto instance = std::unique_ptr<Pass>(pass->create()); - instance->runFunction(this, wasm, func); + instance->runOnFunction(this, wasm, func); } int PassRunner::getPassDebug() { diff --git a/src/wasm-module-building.h b/src/wasm-module-building.h index 61e98ba71..866019328 100644 --- a/src/wasm-module-building.h +++ b/src/wasm-module-building.h @@ -243,7 +243,7 @@ private: PassRunner passRunner(wasm, passOptions); addPrePasses(passRunner); passRunner.addDefaultFunctionOptimizationPasses(); - passRunner.runFunction(func); + passRunner.runOnFunction(func); } static void workerMain(OptimizingIncrementalModuleBuilder* self) { |