diff --git a/mozilla/js/js2/icodegenerator.cpp b/mozilla/js/js2/icodegenerator.cpp index d7219084f43..07910156b34 100644 --- a/mozilla/js/js2/icodegenerator.cpp +++ b/mozilla/js/js2/icodegenerator.cpp @@ -35,6 +35,7 @@ #include "world.h" #include "vmtypes.h" #include "jstypes.h" +#include "jsclasses.h" #include "icodegenerator.h" #include @@ -1195,6 +1196,17 @@ void ICodeGenerator::preprocess(StmtNode *p) genStmt(t->finally); } break; + case StmtNode::Class: + { + ClassStmtNode *classStmt = static_cast(p); + ASSERT(classStmt->name->getKind() == ExprNode::identifier); + IdentifierExprNode* nameExpr = static_cast(classStmt->name); + using JSClasses::JSClass; + JSClass* jsclass = new JSClass(nameExpr->name); + // put this class into the current defining scope, and as a side-effect(?) make it + // the current defining scope, for later compilation into? + } + break; } } diff --git a/mozilla/js2/src/icodegenerator.cpp b/mozilla/js2/src/icodegenerator.cpp index d7219084f43..07910156b34 100644 --- a/mozilla/js2/src/icodegenerator.cpp +++ b/mozilla/js2/src/icodegenerator.cpp @@ -35,6 +35,7 @@ #include "world.h" #include "vmtypes.h" #include "jstypes.h" +#include "jsclasses.h" #include "icodegenerator.h" #include @@ -1195,6 +1196,17 @@ void ICodeGenerator::preprocess(StmtNode *p) genStmt(t->finally); } break; + case StmtNode::Class: + { + ClassStmtNode *classStmt = static_cast(p); + ASSERT(classStmt->name->getKind() == ExprNode::identifier); + IdentifierExprNode* nameExpr = static_cast(classStmt->name); + using JSClasses::JSClass; + JSClass* jsclass = new JSClass(nameExpr->name); + // put this class into the current defining scope, and as a side-effect(?) make it + // the current defining scope, for later compilation into? + } + break; } }