-
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.
- Loading branch information
Showing
5 changed files
with
69 additions
and
141 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
98 changes: 0 additions & 98 deletions
98
...untime/src/main/java/org/enso/interpreter/node/expression/builtin/runtime/AssertNode.java
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
...ain/java/org/enso/interpreter/node/expression/builtin/runtime/IsAssertionEnabledNode.java
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,20 @@ | ||
package org.enso.interpreter.node.expression.builtin.runtime; | ||
|
||
import com.oracle.truffle.api.frame.VirtualFrame; | ||
import com.oracle.truffle.api.nodes.Node; | ||
import org.enso.interpreter.dsl.BuiltinMethod; | ||
import org.enso.interpreter.runtime.EnsoContext; | ||
|
||
@BuiltinMethod( | ||
type = "Runtime", | ||
name = "assertions_enabled", | ||
description = "Returns True iff assertions are enabled") | ||
public class IsAssertionEnabledNode extends Node { | ||
public static IsAssertionEnabledNode build() { | ||
return new IsAssertionEnabledNode(); | ||
} | ||
|
||
public boolean execute(VirtualFrame frame) { | ||
return EnsoContext.get(this).isAssertionsEnabled(); | ||
} | ||
} |
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