From 1bb0ae2fc2ff3f8ead99b512ffd8c8a1efca1859 Mon Sep 17 00:00:00 2001 From: "beard%netscape.com" Date: Sun, 25 Jun 2000 17:04:01 +0000 Subject: [PATCH] Conditionally set constructor, if it has any instructions. git-svn-id: svn://10.0.0.236/trunk@73196 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/js2/icodegenerator.cpp | 3 ++- mozilla/js2/src/icodegenerator.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mozilla/js/js2/icodegenerator.cpp b/mozilla/js/js2/icodegenerator.cpp index 8807b3d6010..f42ed3fdb67 100644 --- a/mozilla/js/js2/icodegenerator.cpp +++ b/mozilla/js/js2/icodegenerator.cpp @@ -1400,7 +1400,8 @@ TypedRegister ICodeGenerator::genStmt(StmtNode *p, LabelSet *currentLabelSet) s = s->next; } // FIXME: what about static member initialization? that's what mcg should be collecting. - thisClass->setConstructor(ccg.complete()); + if (ccg.get_iCode()->size()) + thisClass->setConstructor(ccg.complete()); } } break; diff --git a/mozilla/js2/src/icodegenerator.cpp b/mozilla/js2/src/icodegenerator.cpp index 8807b3d6010..f42ed3fdb67 100644 --- a/mozilla/js2/src/icodegenerator.cpp +++ b/mozilla/js2/src/icodegenerator.cpp @@ -1400,7 +1400,8 @@ TypedRegister ICodeGenerator::genStmt(StmtNode *p, LabelSet *currentLabelSet) s = s->next; } // FIXME: what about static member initialization? that's what mcg should be collecting. - thisClass->setConstructor(ccg.complete()); + if (ccg.get_iCode()->size()) + thisClass->setConstructor(ccg.complete()); } } break;