Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Esprima 3.0.0-beta-3 #1235

Merged
merged 1 commit into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jint/HoistingScope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public void Visit(Node node, Node parent)
&& childNode.Type != Nodes.ArrowFunctionExpression
&& childNode.Type != Nodes.ArrowParameterPlaceHolder
&& childNode.Type != Nodes.FunctionExpression
&& childNode.ChildNodes.Count > 0)
&& !childNode.ChildNodes.IsEmpty())
{
Visit(childNode, node);
}
Expand Down Expand Up @@ -327,7 +327,7 @@ internal void Visit(Node node)
export.GetExportEntries(_exportEntries, _requestedModules);
}

if (childNode.ChildNodes.Count > 0)
if (!childNode.ChildNodes.IsEmpty())
{
Visit(childNode);
}
Expand Down
2 changes: 1 addition & 1 deletion Jint/Jint.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Esprima" Version="3.0.0-beta-2" />
<PackageReference Include="Esprima" Version="3.0.0-beta-3" />
<PackageReference Include="IsExternalInit" Version="1.0.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
<PackageReference Include="Nullable" Version="1.3.0" PrivateAssets="all" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected override ExpressionResult EvaluateInternal(EvaluationContext context)
case AssignmentOperator.BitwiseOrAssign:
operatorClrName = "op_BitwiseOr";
break;
case AssignmentOperator.BitwiseXOrAssign:
case AssignmentOperator.BitwiseXorAssign:
operatorClrName = "op_ExclusiveOr";
break;
case AssignmentOperator.LeftShiftAssign:
Expand Down Expand Up @@ -222,7 +222,7 @@ protected override ExpressionResult EvaluateInternal(EvaluationContext context)
break;
}

case AssignmentOperator.BitwiseXOrAssign:
case AssignmentOperator.BitwiseXorAssign:
{
var rval = _right.GetValue(context).Value;
lval = TypeConverter.ToInt32(lval) ^ TypeConverter.ToInt32(rval);
Expand Down
8 changes: 4 additions & 4 deletions Jint/Runtime/Interpreter/Expressions/JintBinaryExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ internal static JintExpression Build(Engine engine, BinaryExpression expression)
break;
case BinaryOperator.BitwiseAnd:
case BinaryOperator.BitwiseOr:
case BinaryOperator.BitwiseXOr:
case BinaryOperator.BitwiseXor:
case BinaryOperator.LeftShift:
case BinaryOperator.RightShift:
case BinaryOperator.UnsignedRightShift:
Expand Down Expand Up @@ -715,7 +715,7 @@ private string OperatorClrName
{
BinaryOperator.BitwiseAnd => "op_BitwiseAnd",
BinaryOperator.BitwiseOr => "op_BitwiseOr",
BinaryOperator.BitwiseXOr => "op_ExclusiveOr",
BinaryOperator.BitwiseXor => "op_ExclusiveOr",
BinaryOperator.LeftShift => "op_LeftShift",
BinaryOperator.RightShift => "op_RightShift",
BinaryOperator.UnsignedRightShift => "op_UnsignedRightShift",
Expand Down Expand Up @@ -764,7 +764,7 @@ protected override ExpressionResult EvaluateInternal(EvaluationContext context)
case BinaryOperator.BitwiseOr:
result = JsNumber.Create(leftValue | rightValue);
break;
case BinaryOperator.BitwiseXOr:
case BinaryOperator.BitwiseXor:
result = JsNumber.Create(leftValue ^ rightValue);
break;
case BinaryOperator.LeftShift:
Expand Down Expand Up @@ -810,7 +810,7 @@ private JsValue EvaluateNonInteger(Realm realm, JsValue left, JsValue right)
return JsBigInt.Create(TypeConverter.ToBigInt(left) | TypeConverter.ToBigInt(right));
}

case BinaryOperator.BitwiseXOr:
case BinaryOperator.BitwiseXor:
{
if (!left.IsBigInt())
{
Expand Down