Fixed gcc warnings. Added .xml test case.

git-svn-id: svn://10.0.0.236/trunk@85190 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rogerl%netscape.com
2001-01-20 00:02:56 +00:00
parent e56b80d07d
commit bebeeb668d
4 changed files with 82 additions and 0 deletions

View File

@@ -1977,6 +1977,9 @@ TypedRegister ICodeGenerator::genStmt(StmtNode *p, LabelSet *currentLabelSet)
case FunctionName::normal:
thisClass->defineMethod(name, NULL);
break;
default:
NOT_REACHED("unexpected prefix");
break;
}
}
}
@@ -2073,6 +2076,9 @@ TypedRegister ICodeGenerator::genStmt(StmtNode *p, LabelSet *currentLabelSet)
case FunctionName::normal:
thisClass->defineMethod(name, new JSFunction(icm));
break;
default:
NOT_REACHED("unexpected prefix");
break;
}
}
}
@@ -2153,6 +2159,9 @@ TypedRegister ICodeGenerator::genStmt(StmtNode *p, LabelSet *currentLabelSet)
case FunctionName::normal:
mContext->getGlobalObject()->defineFunction(name, icm);
break;
default:
NOT_REACHED("unexpected prefix");
break;
}
}
}

View File

@@ -0,0 +1,32 @@
<class name="D">
<field name="f" type="Integer" />
<constructor name="D" static>
RETURN R0
</constructor>
<method name="bar" type="Void">
<parameter name="a" type="Integer"/> <!-- in R1 -->
<parameter name="b" type="Integer"/> <!-- in R2 -->
GENERIC_BINARY_OP R3, Add, R1, R2
SET_SLOT R0, 0, R3
RETURN_VOID
</method>
</class>
<script>
NEW_CLASS R2, "D"
GET_STATIC R3, "D", 1 <!-- 0'th static is __init__ -->
<!-- 1st static is D::D constructor -->
BIND_THIS R4, R2, R3
CALL R1, R4, ()
LOAD_IMMEDIATE R2, 1
LOAD_IMMEDIATE R3, 2
GET_METHOD R4, R1, 0 <!-- 0'th method is 'bar' above -->
CALL R5, R4, (R2, R3)
GET_SLOT R2, R1, 0
RETURN R2
</script>

View File

@@ -1977,6 +1977,9 @@ TypedRegister ICodeGenerator::genStmt(StmtNode *p, LabelSet *currentLabelSet)
case FunctionName::normal:
thisClass->defineMethod(name, NULL);
break;
default:
NOT_REACHED("unexpected prefix");
break;
}
}
}
@@ -2073,6 +2076,9 @@ TypedRegister ICodeGenerator::genStmt(StmtNode *p, LabelSet *currentLabelSet)
case FunctionName::normal:
thisClass->defineMethod(name, new JSFunction(icm));
break;
default:
NOT_REACHED("unexpected prefix");
break;
}
}
}
@@ -2153,6 +2159,9 @@ TypedRegister ICodeGenerator::genStmt(StmtNode *p, LabelSet *currentLabelSet)
case FunctionName::normal:
mContext->getGlobalObject()->defineFunction(name, icm);
break;
default:
NOT_REACHED("unexpected prefix");
break;
}
}
}

View File

@@ -0,0 +1,32 @@
<class name="D">
<field name="f" type="Integer" />
<constructor name="D" static>
RETURN R0
</constructor>
<method name="bar" type="Void">
<parameter name="a" type="Integer"/> <!-- in R1 -->
<parameter name="b" type="Integer"/> <!-- in R2 -->
GENERIC_BINARY_OP R3, Add, R1, R2
SET_SLOT R0, 0, R3
RETURN_VOID
</method>
</class>
<script>
NEW_CLASS R2, "D"
GET_STATIC R3, "D", 1 <!-- 0'th static is __init__ -->
<!-- 1st static is D::D constructor -->
BIND_THIS R4, R2, R3
CALL R1, R4, ()
LOAD_IMMEDIATE R2, 1
LOAD_IMMEDIATE R3, 2
GET_METHOD R4, R1, 0 <!-- 0'th method is 'bar' above -->
CALL R5, R4, (R2, R3)
GET_SLOT R2, R1, 0
RETURN R2
</script>