diff --git a/es2panda/binder/binder.h b/es2panda/binder/binder.h index 414ff63344732770753dc12bfde8f73a8fe5a1a3..5d3edaaf959e157f38cfe8d9c7c3378cbdc66f46 100644 --- a/es2panda/binder/binder.h +++ b/es2panda/binder/binder.h @@ -128,9 +128,9 @@ public: bool HasVariableName(const util::StringView &name) const; 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"; @@ -142,9 +142,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 2bd432c7872155114e62b394021cf8bb83164ca5..dde3633ac7f53ec851c03c4085caa21caa4d6d18 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); }