diff --git a/es2panda/binder/binder.h b/es2panda/binder/binder.h index 7f07e686e203f76e8e12131625a62b5037b58526..45ae663186a4ec881260d39b7ffb879c3bdd491e 100644 --- a/es2panda/binder/binder.h +++ b/es2panda/binder/binder.h @@ -111,9 +111,9 @@ public: } static constexpr std::string_view FUNCTION_ARGUMENTS = "arguments"; - static constexpr std::string_view MANDATORY_PARAM_FUNC = "=f"; - static constexpr std::string_view MANDATORY_PARAM_NEW_TARGET = "=nt"; - static constexpr std::string_view MANDATORY_PARAM_THIS = "=t"; + static constexpr std::string_view MANDATORY_PARAM_FUNC = "4funcObj"; + static constexpr std::string_view MANDATORY_PARAM_NEW_TARGET = "4newTarget"; + static constexpr std::string_view MANDATORY_PARAM_THIS = "this"; static constexpr std::string_view CJS_MANDATORY_PARAM_EXPORTS = "exports"; static constexpr std::string_view CJS_MANDATORY_PARAM_REQUIRE = "require"; @@ -125,9 +125,9 @@ public: static constexpr uint32_t MANDATORY_PARAMS_NUMBER = 3; static constexpr uint32_t CJS_MANDATORY_PARAMS_NUMBER = 8; - static constexpr std::string_view LEXICAL_MANDATORY_PARAM_FUNC = "!f"; - static constexpr std::string_view LEXICAL_MANDATORY_PARAM_NEW_TARGET = "!nt"; - static constexpr std::string_view LEXICAL_MANDATORY_PARAM_THIS = "!t"; + static constexpr std::string_view LEXICAL_MANDATORY_PARAM_FUNC = "0funcObj"; + static constexpr std::string_view LEXICAL_MANDATORY_PARAM_NEW_TARGET = "0newTarget"; + static constexpr std::string_view LEXICAL_MANDATORY_PARAM_THIS = "0this"; static constexpr std::string_view MAIN_FUNC_NAME = "func_main_0"; static constexpr std::string_view ANONYMOUS_FUNC_NAME = ""; diff --git a/es2panda/ir/expressions/thisExpression.cpp b/es2panda/ir/expressions/thisExpression.cpp index 397b0bab53c3ca6331eaf1a6e26812af2fe7aef0..95b94aa69b2570d94d6e7204903dc4134ec527f5 100644 --- a/es2panda/ir/expressions/thisExpression.cpp +++ b/es2panda/ir/expressions/thisExpression.cpp @@ -36,7 +36,7 @@ void ThisExpression::Compile(compiler::PandaGen *pg) const ASSERT(res.variable && res.variable->IsLocalVariable()); if (pg->isDebuggerEvaluateExpressionMode()) { - pg->LoadObjByNameViaDebugger(this, "this", true); + pg->LoadObjByNameViaDebugger(this, binder::Binder::MANDATORY_PARAM_THIS, true); } else { pg->LoadAccFromLexEnv(this, res); }