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-56345] Provide an `espresso-runtime-<RuntimeResourceId>` with UPL or GPL as the LICENSE? HOT 3
- Static native executables using G1 GC crashes when attempting to run it (Segmentation fault) HOT 2
- ScriptEngine does not support `require()`
- [GR-57127] Native Image generated by `native-image` tool is not working with ZoomBA project HOT 4
- [GR-56749] Missing Documentation Video/Tutorial HOT 2
- Failure to build libgraal on OpenJDK change
- [GR-56882] PLDI 2017, June 18-23, Barcelona, Spain presentation and video unavailable. HOT 4
- Cannot convert "1682293037722628098'(1anguage: Java, type: com.oracle.truffle.api.strings.Trufflestring) to Java type "java.lang .0bject[]':Unsupported target type HOT 3
- Got ClassNotFoundException while building native image with grpc-netty-shaded HOT 2
- native-image-configure tool is throwing a ClassCastException on latest Oracle EA Build HOT 5
- Getting Error: Missing CAP cache value for: NativeCodeInfo:RISCV64LibCHelperDirectives:StructInfo:CPUFeatures HOT 3
- Exception in thread "main" java.lang.IllegalArgumentException: invalid type parameter: void HOT 1
- Using GraalVM with JBOSS/Wildfly throws warning: does not support runtime compilation HOT 4
- GraalVM Fatal error reported via JNI: Could not allocate library name HOT 1
- [GR-57252] Improve error message when trying to build static image on unsupported platforms
- NPE in com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntimeAccess.createRuntime(): "jdk.internal.module.Modules.JLA" is null HOT 1
- [Feature Request] Turn off truffle compilation dynamically
- [GR-57284] `JAVA_TOOL_OPTIONS` environment variable in native executables HOT 1
- JavaFX native image doesnt work on different cpu (both windows and 64 bit) HOT 1
- Provide graaljs that's useable across JDK versions 11 through 22 by backporting #7510 HOT 1
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.