Files
ark_js_runtime/ecmascript/compiler/pass_manager.h
T
luochuhao 86fda0792b Modify option source of stub compiler.
Using options in js runtime option list and delete stub compiler option.

Add path check for stub compiler generation phase.

Load stub file before loading of aot file.

Add runtime option for optimization level configuration.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I557Q2
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: Ifbaa7a2dc4333310c62f1f8e230eefb7a2136ca5
2022-04-29 14:40:18 +08:00

38 lines
1.3 KiB
C++

/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ECMASCRIPT_COMPILER_PASS_MANAGER_H
#define ECMASCRIPT_COMPILER_PASS_MANAGER_H
#include "compiler_log.h"
#include "ecmascript/ecma_vm.h"
#include "bytecode_circuit_builder.h"
namespace panda::ecmascript::kungfu {
class PassManager {
public:
PassManager(EcmaVM* vm, std::string entry) : vm_(vm), entry_(entry) {}
PassManager() = default;
bool CollectInfoOfPandaFile(const std::string &filename, std::string_view entryPoint,
BytecodeTranslationInfo *translateInfo);
bool Compile(const std::string &fileName, const std::string &triple, const std::string &outputFileName,
const AotLog &log, size_t optLevel);
private:
EcmaVM* vm_;
std::string entry_;
};
}
#endif