Class ValueLibrary
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.library.Library
com.oracle.truffle.js.api.ValueLibrary
- All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface, Cloneable
public abstract class ValueLibrary
extends com.oracle.truffle.api.library.Library
Value library provides basic operations that are common to all JavaScript values (like
ToString() and ToNumber() operations). It also provides basic value type
information.-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.nodes.Node.Child, com.oracle.truffle.api.nodes.Node.Children -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.oracle.truffle.api.library.LibraryFactory<ValueLibrary> Returns the library factory for the value library.static ValueLibraryReturns the uncached automatically dispatched version of the value library.booleanisArrayBuffer(Object value) Returnstrueif the value is JavaScriptArrayBuffer, returnsfalseotherwise.booleanReturnstrueif the value is JavaScriptPromise, returnsfalseotherwise.booleanReturnstrueif the value is JavaScriptProxy, returnsfalseotherwise.booleanPerformsToBoolean()operation on the givenvalue.PerformsToNumber()operation on the givenvalue.com.oracle.truffle.api.strings.TruffleStringPerformsToString()operation on the givenvalue.Methods inherited from class com.oracle.truffle.api.library.Library
acceptsMethods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, reportReplace, toString
-
Constructor Details
-
ValueLibrary
public ValueLibrary()
-
-
Method Details
-
getFactory
Returns the library factory for the value library. -
getUncached
Returns the uncached automatically dispatched version of the value library. -
isProxy
Returnstrueif the value is JavaScriptProxy, returnsfalseotherwise. -
isPromise
Returnstrueif the value is JavaScriptPromise, returnsfalseotherwise. -
isArrayBuffer
Returnstrueif the value is JavaScriptArrayBuffer, returnsfalseotherwise. -
toString
PerformsToString()operation on the givenvalue. -
toNumber
-
toBoolean
PerformsToBoolean()operation on the givenvalue.
-