From b8f931c96901af60246d3b40dff96b262a1cd7fc Mon Sep 17 00:00:00 2001 From: "rogerl%netscape.com" Date: Fri, 14 Jul 2000 22:23:20 +0000 Subject: [PATCH] Fixed slots for non-function vars, plus bug in slot xcrement. git-svn-id: svn://10.0.0.236/trunk@74265 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 fba28abc33b..ce0c25d57cd 100644 --- a/mozilla/js/js2/icodegenerator.cpp +++ b/mozilla/js/js2/icodegenerator.cpp @@ -906,7 +906,7 @@ TypedRegister ICodeGenerator::handleDot(BinaryExprNode *b, ExprNode::Kind use, I lValueKind = (isConstructor) ? Constructor : Static; } } - if ((lValueKind == Property) && (base.first == NotARegister)) + if ((lValueKind == Property) || (base.first == NotARegister)) base = loadName(baseName, base.second); } else { @@ -998,6 +998,7 @@ TypedRegister ICodeGenerator::handleDot(BinaryExprNode *b, ExprNode::Kind use, I break; case Slot: ret = slotXcr(base, slotIndex, xcrementOp); + break; default: NOT_REACHED("Bad lvalue kind"); } diff --git a/mozilla/js2/src/icodegenerator.cpp b/mozilla/js2/src/icodegenerator.cpp index fba28abc33b..ce0c25d57cd 100644 --- a/mozilla/js2/src/icodegenerator.cpp +++ b/mozilla/js2/src/icodegenerator.cpp @@ -906,7 +906,7 @@ TypedRegister ICodeGenerator::handleDot(BinaryExprNode *b, ExprNode::Kind use, I lValueKind = (isConstructor) ? Constructor : Static; } } - if ((lValueKind == Property) && (base.first == NotARegister)) + if ((lValueKind == Property) || (base.first == NotARegister)) base = loadName(baseName, base.second); } else { @@ -998,6 +998,7 @@ TypedRegister ICodeGenerator::handleDot(BinaryExprNode *b, ExprNode::Kind use, I break; case Slot: ret = slotXcr(base, slotIndex, xcrementOp); + break; default: NOT_REACHED("Bad lvalue kind"); }