mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
Fix for empty function body
This commit is contained in:
parent
8c105459ae
commit
7383f26d6a
@ -1670,7 +1670,8 @@ ICodeModule *ICodeGenerator::genFunction(FunctionStmtNode *f, bool isConstructor
|
||||
const StringAtom &initName = mWorld->identifiers["__init__"]; // XXXXXXX
|
||||
icg.call(icg.getStatic(mClass, initName), thisValue, &args); // ok, so it's mis-named
|
||||
}
|
||||
icg.genStmt(f->function.body);
|
||||
if (f->function.body)
|
||||
icg.genStmt(f->function.body);
|
||||
if (isConstructor) {
|
||||
TypedRegister thisValue = TypedRegister(0, mClass);
|
||||
icg.returnStmt(thisValue);
|
||||
|
@ -1670,7 +1670,8 @@ ICodeModule *ICodeGenerator::genFunction(FunctionStmtNode *f, bool isConstructor
|
||||
const StringAtom &initName = mWorld->identifiers["__init__"]; // XXXXXXX
|
||||
icg.call(icg.getStatic(mClass, initName), thisValue, &args); // ok, so it's mis-named
|
||||
}
|
||||
icg.genStmt(f->function.body);
|
||||
if (f->function.body)
|
||||
icg.genStmt(f->function.body);
|
||||
if (isConstructor) {
|
||||
TypedRegister thisValue = TypedRegister(0, mClass);
|
||||
icg.returnStmt(thisValue);
|
||||
|
Loading…
Reference in New Issue
Block a user