diff --git a/es2panda/compiler/core/emitter/emitter.cpp b/es2panda/compiler/core/emitter/emitter.cpp index ecec4eead8b73c44ac1e573fb0d191eb85a1ce38..31e8a224a985fb3a13ccf21d28cd8b3bfbfc8d81 100644 --- a/es2panda/compiler/core/emitter/emitter.cpp +++ b/es2panda/compiler/core/emitter/emitter.cpp @@ -208,8 +208,6 @@ void FunctionEmitter::GenInstructionDebugInfo(const IRNode *ins, panda::pandasm: constexpr size_t INVALID_LINE = -1; constexpr uint32_t INVALID_COL = -1; - ASSERT(astNode != nullptr); - if (astNode == FIRST_NODE_OF_FUNCTION) { astNode = pg_->Debuginfo().firstStmt; if (!astNode) { diff --git a/es2panda/ir/base/classDefinition.cpp b/es2panda/ir/base/classDefinition.cpp index 03507d5551a53b359b0c0b38dd5d62dcea60d561..e249bcd7f80f8e0b91a341f345bf765c333c41bb 100644 --- a/es2panda/ir/base/classDefinition.cpp +++ b/es2panda/ir/base/classDefinition.cpp @@ -165,6 +165,10 @@ int32_t ClassDefinition::CreateClassStaticProperties(compiler::PandaGen *pg, uti break; } + if (!prop->IsStatic()) { + instancePropertyCount++; + } + literalBuf->Add(pg->Allocator()->New(name)); literalBuf->Add(nullptr); // save for method internalname literalBuf->Add(nullptr); // save for method affiliate @@ -198,10 +202,6 @@ int32_t ClassDefinition::CreateClassStaticProperties(compiler::PandaGen *pg, uti UNREACHABLE(); } } - - if (!prop->IsStatic()) { - instancePropertyCount++; - } } /* Static items are stored at the end of the buffer */