Code Monkey home page Code Monkey logo

Comments (8)

entlicher avatar entlicher commented on May 20, 2024

What if we change Object FrameSlot.getInfo(), which says nothing from the API point of view and serves to a particular language implementor only, who know what info they put into DrameDescriptor.addFrameSlot(), to a better typed FrameSlotInfo FrameSlot.getInfo()?
FrameSlotInfo can have then <T> T FrameSlot.getCapability(Class<T> capability) (inspired by TruffleRuntime).
This would add a flexibility to functionally evolve the APIs.
We could also have a more generic CapabilityProvider interface instead of FrameSlotInfo, that could be reused on more places.
Thoughts?

from graal.

jtulach avatar jtulach commented on May 20, 2024

Using getCapability is useful if you want to tunnel through some API - e.g. create a teleinterface. I may be wrong, but I don't think we need that for slots.

from graal.

chumer avatar chumer commented on May 20, 2024

Yes I liked the FrameFormat SPI idea that is implemented by the language can be passed into the FrameDescriptor.

FrameFormat#isVisible(FrameSlot)
FrameFormat#isReadable(FrameSlot)
FrameFormat#isWritable(FrameSlot)
FrameFormat#getName(FrameSlot)
...

The FrameFormat can be null for a descriptor which means nothing is visible, nothing is readable/writable and an obfuscated name (like arg0, arg1).

I dislike FrameSlotInfo because it requires an additional allocation for each slot whereas FrameFormat could be shared accross a language.

from graal.

lukasstadler avatar lukasstadler commented on May 20, 2024

how about the following heuristic: only frame slots with String identifiers are visible in the debugger.

from graal.

chumer avatar chumer commented on May 20, 2024

Some languages might not want to use String identifiers. I also think we should be conservative if a variable is not explicitly exported.

from graal.

entlicher avatar entlicher commented on May 20, 2024

Is there some example of such non-String identifiers and an idea of how should debugger treat them?
Debugger needs to convert everything to a String in the end to display it meaningfully.

from graal.

mlvdv avatar mlvdv commented on May 20, 2024

how about the following heuristic: only frame slots with String identifiers are visible in the debugger.

This would conflate two separate issues:

  • naming (and how names should be displayed to users)
  • whether a particular slot (or frame, or anything else) should be displayed during ordinary operation.

The debugger should be able to display all slots when in special modes (not for guest language programmers), and names could be very helpful in those modes.

from graal.

chumer avatar chumer commented on May 20, 2024

Tracked elsewhere: GR-89

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.