-
Notifications
You must be signed in to change notification settings - Fork 328
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
Removing State from method signatures #12233
base: develop
Are you sure you want to change the base?
Conversation
1231c92
to
86520e3
Compare
engine/runtime/src/main/java/org/enso/interpreter/runtime/error/DataflowError.java
Outdated
Show resolved
Hide resolved
@@ -74,7 +75,7 @@ public static DataflowError withDefaultTrace( | |||
|
|||
/** Slow version of {@link #withDefaultTrace(State, Object, Node, HasContextEnabledNode)}. */ | |||
public static DataflowError withDefaultTrace(Object payload, Node location) { | |||
return withDefaultTrace(null, payload, location, HasContextEnabledNode.getUncached()); | |||
return withDefaultTrace(payload, location, HasContextEnabledNode.getUncached()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of this null
is causing the change in test behavior:
DataflowError.withDefaultTrace() (DataflowError.java:65)
DataflowError.withDefaultTrace() (DataflowError.java:78)
DivNode.doLong() (DivNode.java:29)
Previously the withDefaultTrace(Object payload, Node location)
was actually always attaching the full stack trace. That wasn't correct and we need to update the test: 952125c
...e/runtime-instrument-common/src/main/java/org/enso/interpreter/service/ExecutionService.java
Outdated
Show resolved
Hide resolved
...gger/src/main/java/org/enso/interpreter/instrument/repl/debugger/ReplDebuggerInstrument.java
Outdated
Show resolved
Hide resolved
lib/scala/interpreter-dsl/src/main/java/org/enso/interpreter/dsl/MethodProcessor.java
Outdated
Show resolved
Hide resolved
...gger/src/main/java/org/enso/interpreter/instrument/repl/debugger/ReplDebuggerInstrument.java
Outdated
Show resolved
Hide resolved
Some benchmarks still show 2-3x regression:
something has to be done to speed them up. |
Running engine bechmarks again |
Here is some difference in boxing: The previous analysis is more related to |
There are now Update: with 42e2337 the |
* ArgumentsHelper#buildArguments(Function,CallerInfo, Object, Object[])} | ||
* @return the state for the function | ||
*/ | ||
public static State getState(Object[] arguments) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
State
is no longer passed as a VirtualFrame.getArguments()
when a Function
is invoked.
With 42e2337 these benchmarks are on par with
Remaining Regessions
|
@@ -60,7 +60,8 @@ protected Object callInlineable( | |||
Object[] arguments, | |||
@Cached("function.getCallTarget()") RootCallTarget cachedTarget, | |||
@Cached("createInlineableNode(cachedTarget)") InlineableNode callNode) { | |||
var args = Function.ArgumentsHelper.buildArguments(function, callerInfo, state, arguments); | |||
var args = | |||
Function.ArgumentsHelper.buildArguments(function, callerInfo, arguments); // XXX no state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this comment mean?
Pull Request Description
Fixes #7117 by removing
State
from method signatures and moving it into Truffle thread context local variable:State
State
Everything compiles. Tests pass after fixing one of them. Benchmarks shall be OK soon.
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,