sulong | Moved to oracle/graal | Blockchain library
kandi X-RAY | sulong Summary
kandi X-RAY | sulong Summary
Obsolete repository. Moved to oracle/graal.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Generate an extract element
- Generate a readModify write operation
- Create a CompareExchange instruction
- Write a cast instruction
- Write a binary operation
- Write a ShuffleVector instruction
- Write a Select instruction
- Generate an insert element
- Generate a allocate instruction
- Generate the stack instruction
- Translate a conditional branch instruction
- Process a call instruction
- Process a void call instruction
- This method generates the list of successors for a switch
- Handles a VoidInvokeInvoke instruction
- Handles an extract value instruction
- Visit a switch instruction
- Add an indirect branch
- Process an InsertValue instruction
- Visits a store instruction
- Process the return value
- Processes a MD derived type
- Process a single composite type
- This method is called when a mdBasicType is being processed
- Registers a local variable
- Processes the symbol table
- Visit a MDSSubroutine This method is called from a MDSSubroutine
- To BigInteger
- Performs the operation
- We don t need to override this
- Initializes the VM with the given virtual frame address
sulong Key Features
sulong Examples and Code Snippets
Community Discussions
Trending Discussions on sulong
QUESTION
What are the (architectural) differences in implementing a programming language on the GraalVM architecture – in particular between Graal, Truffle, and LLVM using Sulong?
I plan to reimplement an existing statically typed programming language on the GraalVM architecture, so that I can use it from Java without much of a hassle.
There are at moment three options:
- Emit JVM bytecode
- Write a Truffle interpreter
- Emit LLVM bitcode, use Sulong to run it on GraalVM
ANSWER
Answered 2019-Feb-12 at 19:14Emitting JVM bytecode is the traditional option. You will have to work at the bytecode level, and you'll have to optimise your code your before emitting bytecode as the options that the JVM has for optimising it after it has been emitted are limited. To get good performance you may have to use invokedynamic.
Using Truffle is I'd say the easy option. You only have to write an AST interpreter and then code generation is all done for you. It's also the high performance option - in all languages where there is a Truffle version and a bytecode version, the Truffle version confidently outperforms the bytecode version as well as being simpler due to no bytecode generation stage.
Emitting LLVM bitcode and running on Sulong is an option, but it's not one I would recommend unless you have other constraints that lead you towards that option. Again you have to do that bitcode generation yourself, and you'll have to optimise yourself before emitting the bitcode as optimisations are limited after the bitcode is set.
Ruby is good for comparing these options - because there is a version that emits JVM bytecode (JRuby), a version using Truffle (TruffleRuby) and a version that emits LLVM bitcode (Rubinius, but it doesn't then run that bitcode on Sulong). I'd say that TruffleRuby is both faster and simpler in implementation than Rubinius or JRuby. (I work on TruffleRuby.)
I wouldn't worry about the fact that your language is statically typed. Truffle can work with static types, and it can use profiling specialisation to detect more fine-grained types again at runtime than are expressed statically.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sulong
You can use sulong like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the sulong component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page