Skip to content
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

J2EO & Polystat compatibility. About runtime support #31

Open
someilay opened this issue May 30, 2022 · 0 comments
Open

J2EO & Polystat compatibility. About runtime support #31

someilay opened this issue May 30, 2022 · 0 comments

Comments

@someilay
Copy link

Runtime support

It's collection of files that makes translated code runnable by Eo compiler.

Now supported:

  • Partially all primitives (operations +, -, *, / and %; casting to int)
  • Partially String (operation +; String.valueOf)
  • Partially System (System.out.println)
  • Partially Random (nextInt; nextFloat)

Example Eo:

# 2022-05-30T14:14:20.359245787
# j2eo team
+alias stdlib.lang.class__Object
+alias stdlib.lang.class__System
+alias stdlib.lang.class__String

[] > class__Main
  class__Object > super
  super > @
  [] > new
    [] > this
      class__Object.new > super
      super > @
      "class__Main" > className
      [this] > init
        seq > @
          TRUE
    seq > @
      this
  # main :: String[] -> void
  [args] > main
    seq > @
      s1048027629
    [] > s1048027629
      class__System.out.println > @
        class__System.out
        l928466577
    [] > l928466577
      class__String.constructor_2 > @
        class__String.new
        "Hello!"
  # null :: null -> void
  [this] > constructor
    seq > @
      initialization
      s1691875296
      this
    [] > initialization
      this.init > @
        this
    [] > s1691875296
      super.constructor > @
        this.super

[args...] > main
  class__Main.main > @
    *

Runtime out:

Hello!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant