Code Monkey home page Code Monkey logo

Comments (7)

chumer avatar chumer commented on May 18, 2024

Agreed. This is an artifact from a time where types in the type system where mandatory. Feel free to push the change (should not require a change in the processor). Otherwise I can push it with my next Truffle changeset.

from graal.

smarr avatar smarr commented on May 18, 2024

Just wondering, what is the concrete use of @TypeSystem without a list of times?

From the javadoc, I would assume it helps the DSL to keep specializations of different node hierarchies separated.

from graal.

chrisseaton avatar chrisseaton commented on May 18, 2024

@ImplicitCast?

from graal.

smarr avatar smarr commented on May 18, 2024

You mean the @TypeSystem is useful to define @TypeCast, and @TypeCheck methods? Ok, forgot about that.

But, what was @ImplicitCast again? It happens to be neither referenced from the TypeSystem JavaDoc nor documented :)

from graal.

chrisseaton avatar chrisseaton commented on May 18, 2024

JRuby uses @ImplicitCast to promote integer and floating-point types where we don't want specialisation for individual types. I think I've been told it's not ideal for some reason but haven't resolved it yet https://github.com/jruby/jruby/blob/34b32e9c786b916471c1077755340129b1d90d56/truffle/src/main/java/org/jruby/truffle/language/RubyTypes.java.

If something needs more documentation that's a separate issue to adding this default value.

from graal.

chumer avatar chumer commented on May 18, 2024

The only use-case for having the types specified in @TypeSystem is to have the generated is* and as* methods in the generated type system code. For types in @ImplicitCast, @TypeCast and @TypeCheck to work they don't need to be specified in the type system anymore.

I was tempted in the past to deprecate the typesystem types all together because the benefit is rather small. Objections?

Yes documentation also needs to be updated. Will do as part of this issue.

from graal.

chrisseaton avatar chrisseaton commented on May 18, 2024

I don't mind it being deprecated as I'm not using it.

from graal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.