From bebeeb668d464e509af72a66a78b1e2cfd687f2e Mon Sep 17 00:00:00 2001 From: "rogerl%netscape.com" Date: Sat, 20 Jan 2001 00:02:56 +0000 Subject: [PATCH] Fixed gcc warnings. Added .xml test case. git-svn-id: svn://10.0.0.236/trunk@85190 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/js2/icodegenerator.cpp | 9 +++++++++ mozilla/js/js2/tests/class.xml | 32 ++++++++++++++++++++++++++++++ mozilla/js2/src/icodegenerator.cpp | 9 +++++++++ mozilla/js2/src/tests/class.xml | 32 ++++++++++++++++++++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 mozilla/js/js2/tests/class.xml create mode 100644 mozilla/js2/src/tests/class.xml diff --git a/mozilla/js/js2/icodegenerator.cpp b/mozilla/js/js2/icodegenerator.cpp index ed93bd247ea..d19f7652ed3 100644 --- a/mozilla/js/js2/icodegenerator.cpp +++ b/mozilla/js/js2/icodegenerator.cpp @@ -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; } } } diff --git a/mozilla/js/js2/tests/class.xml b/mozilla/js/js2/tests/class.xml new file mode 100644 index 00000000000..928cbe0ea1b --- /dev/null +++ b/mozilla/js/js2/tests/class.xml @@ -0,0 +1,32 @@ + + + + + RETURN R0 + + + + + + GENERIC_BINARY_OP R3, Add, R1, R2 + SET_SLOT R0, 0, R3 + RETURN_VOID + + + + + diff --git a/mozilla/js2/src/icodegenerator.cpp b/mozilla/js2/src/icodegenerator.cpp index ed93bd247ea..d19f7652ed3 100644 --- a/mozilla/js2/src/icodegenerator.cpp +++ b/mozilla/js2/src/icodegenerator.cpp @@ -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; } } } diff --git a/mozilla/js2/src/tests/class.xml b/mozilla/js2/src/tests/class.xml new file mode 100644 index 00000000000..928cbe0ea1b --- /dev/null +++ b/mozilla/js2/src/tests/class.xml @@ -0,0 +1,32 @@ + + + + + RETURN R0 + + + + + + GENERIC_BINARY_OP R3, Add, R1, R2 + SET_SLOT R0, 0, R3 + RETURN_VOID + + + + +