diff --git a/ts2panda/src/cmdOptions.ts b/ts2panda/src/cmdOptions.ts index 4e108670db4789dfb4ba0e5bde0af7bc345a089b..d4049f6c375a9b3269fd3c188dafc6d089626c5a 100644 --- a/ts2panda/src/cmdOptions.ts +++ b/ts2panda/src/cmdOptions.ts @@ -34,7 +34,7 @@ const ts2pandaOptions = [ { name: 'timeout', alias: 't', type: Number, defaultValue: 0, description: "js to abc timeout threshold(unit: seconds)." }, { name: 'opt-log-level', type: String, defaultValue: "error", description: "specifie optimizer log level. Possible values: ['debug', 'info', 'error', 'fatal']" }, { - name: 'opt-level', type: Number, defaultValue: 1, description: "Optimization level. Possible values: [0, 1, 2]. Default: 0\n 0: no optimizations\n \ + name: 'opt-level', type: Number, defaultValue: 0, description: "Optimization level. Possible values: [0, 1, 2]. Default: 0\n 0: no optimizations\n \ 1: basic bytecode optimizations, including valueNumber, lowering, constantResolver, regAccAllocator\n \ 2: other bytecode optimizations, unimplemented yet"}, { name: 'help', alias: 'h', type: Boolean, description: "Show usage guide." }, diff --git a/ts2panda/ts2abc/ts2abc.cpp b/ts2panda/ts2abc/ts2abc.cpp index f66e50ce9f674b76c53e2e5425e966c79f8519ee..c4ab2e4688ab4b81fe8fb624df050eca60bb503d 100644 --- a/ts2panda/ts2abc/ts2abc.cpp +++ b/ts2panda/ts2abc/ts2abc.cpp @@ -1327,8 +1327,9 @@ bool GenerateProgram([[maybe_unused]] const std::string &data, const std::string if (g_optLevel != static_cast(OptLevel::O_LEVEL0) || optLevel != static_cast(OptLevel::O_LEVEL0)) { optLogLevel = (optLogLevel != "error") ? optLogLevel : g_optLogLevel; - const uint32_t componentMask = panda::Logger::Component::CLASS2PANDA | panda::Logger::Component::ASSEMBLER | - panda::Logger::Component::BYTECODE_OPTIMIZER | panda::Logger::Component::COMPILER; + const uint32_t componentMask = panda::Logger::Component::ASSEMBLER | + panda::Logger::Component::BYTECODE_OPTIMIZER | + panda::Logger::Component::COMPILER; panda::Logger::InitializeStdLogging(panda::Logger::LevelFromString(optLogLevel), componentMask); bool emitDebugInfo = true;