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

Return old recursion limit capabilities #1695

Merged
merged 1 commit into from
Nov 30, 2023
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
2 changes: 1 addition & 1 deletion Jint.Tests/Runtime/EngineLimitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class EngineLimitTests
{

#if RELEASE
const int FunctionNestingCount = 840;
const int FunctionNestingCount = 1010;
#else
const int FunctionNestingCount = 510;
#endif
Expand Down
2 changes: 1 addition & 1 deletion Jint/Runtime/Interpreter/Expressions/JintExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public virtual JsValue GetValue(EvaluationContext context)
return context.Engine.GetValue(reference, true);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[MethodImpl(MethodImplOptions.AggressiveInlining | (MethodImplOptions) 512)]
public object Evaluate(EvaluationContext context)
{
var oldSyntaxElement = context.LastSyntaxElement;
Expand Down
2 changes: 1 addition & 1 deletion Jint/Runtime/Interpreter/JintFunctionDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public JintFunctionDefinition(IFunction function)
/// <summary>
/// https://tc39.es/ecma262/#sec-ordinarycallevaluatebody
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[MethodImpl(MethodImplOptions.AggressiveInlining | (MethodImplOptions) 512)]
internal Completion EvaluateBody(EvaluationContext context, FunctionInstance functionObject, JsValue[] argumentsList)
{
Completion result;
Expand Down
3 changes: 3 additions & 0 deletions Jint/Runtime/Interpreter/JintStatementList.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Runtime.CompilerServices;
using Esprima.Ast;
using Jint.Native;
using Jint.Native.Error;
Expand Down Expand Up @@ -63,6 +64,8 @@ private void Initialize(EvaluationContext context)
_jintStatements = jintStatements;
}


[MethodImpl(MethodImplOptions.AggressiveInlining | (MethodImplOptions) 512)]
public Completion Execute(EvaluationContext context)
{
if (!_initialized)
Expand Down
2 changes: 1 addition & 1 deletion Jint/Runtime/Interpreter/Statements/JintStatement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected JintStatement(Statement statement)
_statement = statement;
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
[MethodImpl(MethodImplOptions.AggressiveInlining | (MethodImplOptions) 512)]
public Completion Execute(EvaluationContext context)
{
if (_statement.Type != Nodes.BlockStatement)
Expand Down