-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Encapsulating State access by moving nodes to runtime.state package (#…
- Loading branch information
1 parent
96440df
commit 6709d47
Showing
25 changed files
with
406 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Context_Helpers.enso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
private | ||
|
||
import project.Error.Error | ||
import project.Runtime.Context | ||
import project.Data.Numbers.Integer | ||
import project.Data.Text.Text | ||
from project.Data.Boolean import Boolean, False, True | ||
|
||
|
||
Integer.from (that:Context) = case that of | ||
Context.Input -> 1 | ||
Context.Output -> 2 | ||
Context.Dataflow_Stack_Trace -> 4 | ||
_ -> Error.throw "Unknown context "+that.to_text | ||
|
||
|
||
type Context_Helpers | ||
is_enabled c env = @Builtin_Method "Context.is_enabled_builtin" | ||
with_enabled_context_builtin context environment ~action = @Builtin_Method "Runtime.with_enabled_context_builtin" | ||
with_disabled_context_builtin context environment ~action = @Builtin_Method "Runtime.with_disabled_context_builtin" | ||
current_execution_environment = @Builtin_Method "Runtime.current_execution_environment" |
14 changes: 14 additions & 0 deletions
14
distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Runtime_Helpers.enso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
private | ||
|
||
## PRIVATE | ||
|
||
Returns a raw representation of the current execution stack trace. | ||
You probably want `Runtime.get_stack_trace` instead. | ||
primitive_get_stack_trace = @Builtin_Method "Runtime.primitive_get_stack_trace" | ||
|
||
gc = @Builtin_Method "Runtime.gc" | ||
assertions_enabled = @Builtin_Method "Runtime.assertions_enabled" | ||
no_inline ~action = @Builtin_Method "Runtime.no_inline" | ||
no_inline_with_arg function arg = @Builtin_Method "Runtime.no_inline_with_arg" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.