Comments (7)
Thanks for this suggestion. Its already on the way. We are , very likely, going to deprecate SourceSection#createUnavailalble and replace it with Source#createUnavailableSection() including a SourceSection#isUnavailable().
We are also going to shrink SourceSection to just charIndex with length. lines and columns indices are going to be computed lazily. All of this we are doing to minimize the footprint of source sections.
BTW.: You can also compute source sections lazily in Node#getSourceSection() by storing the indices in the Node directly and the Source object in the RootNode.
from graal.
@chumer: If I remember correctly, the instrumentation API checks for source sections to be available as a precondition for checking tags. Is that going to be removed as part of the change you mentioned?
from graal.
No not due to this change. Source sections are only queried if instrumentations are actually installed (does not yet apply for root nodes, but that will change). We optimize for the fast case where we only execute but not instrument the application.
The source section restriction might change, as soon as we add support for dynamic changes in tags. Its on the TODO list, but not yet appeared on top.
from graal.
Sorry for getting off-topic for this issue here:
@chumer ok, but this means instrumentation usage force lazy source section creation? That's how I'd read https://github.com/graalvm/truffle/blob/master/truffle/com.oracle.truffle.api.instrumentation/src/com/oracle/truffle/api/instrumentation/InstrumentationHandler.java#L908
from graal.
Yes in this case we would need to request the source section atm. We could remove the call to #getSourceSection if we lift the source section restriction, which i am not yet sure if its going to happen.
from graal.
Source sections are only queried if instrumentations are actually installed
Won't there be a need for source information when a language implementation prints a stack trace?
Also: some languages offer features that depend on instrumentation, where the line between language and tool support is blurry.
from graal.
Michael is right that the source information might also be materialized when the stack trace is printed. It still can be deferred until when it is actually printed.
The discussed method SourceSection#createUnavailable was already removed from the API.
from graal.
Related Issues (20)
- [GR-53340] The documentation uses the `libz-dev` package which does not exist under Ubuntu 22.04.4 HOT 1
- Inconsistent Null return of getImplementationTitle() HOT 3
- An error occurred when Build a Native Executable from a JAR File. Exception is java.lang.RuntimeException: There was an error linking the native image: Linker command exited with 1. HOT 5
- core-dump / segfault on ubuntu 22.04 HOT 2
- Better way to avoid unused fields being dead-code eliminated HOT 2
- [GR-53397] Apparent compiler bug in GraalVM HOT 2
- Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: ai.onnxruntime.OrtSession$SessionOptions HOT 2
- jdk.tls.server.enableStatusRequestExtension is not working
- No factory for objects of type DefaultGradleConnector available in ConnectorServiceRegistry HOT 2
- -Djdk.tls.server.enableStatusRequestExtension=true is not working HOT 1
- [GR-50774] `ByteArrayAccessCloneBenchmark#unsafeCopyMemory` does not use `ARRAY_BYTE_BASE_OFFSET` HOT 1
- jdk.tls.rejectClientInitiatedRenegotiation=true not working
- [GR-53444] Typo in error message "java.lang.AssertionError: Expected number of params 2, actual 2" HOT 2
- No language for id regex found, Supported languages are: [js] HOT 2
- [GR-53929] How to create and load SVM auxiliary image? HOT 5
- Current state of iOS platform is not clear HOT 4
- [GR-53491] Consider adding support for Callback on closing event of polyglot Context object
- Accented characters issue when using java.nio.file.Path HOT 2
- Premature initialization of SVM encodings HOT 2
- [GR-53706] Behaviour of `Class#getPackage()` in Native Image is different than Java for Proxy classes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graal.