Propagate warnings when calling .length on Vector#14744
Propagate warnings when calling .length on Vector#14744JaroslavTulach merged 25 commits intodevelopfrom
.length on Vector#14744Conversation
|
There seems to be one test failure:
Failure in JVM tests seems to be caused by outdated caches - e.g. not clean build |
|
|
...e/src/main/java/org/enso/interpreter/node/expression/builtin/immutable/LengthVectorNode.java
Outdated
Show resolved
Hide resolved
|
…gVectorLength11570
|
Let's try to back f476f85 out!
|
| results_multiple.if_not_error (results_multiple.at 0) | ||
| res = results_multiple.if_not_error (results_multiple.at 0) | ||
| if propagate_warnings then res else | ||
| Warning.remove_warnings res |
There was a problem hiding this comment.
- there is a lot of changes in this PR some kept, some backed out
- with the assumption of the PR becoming greenish soon, here is my retrospective
- the key fixed in this PR are:
Differentiate between length and raw_size
Vector.lengthdoesn't propagate vectorWarningwith the length value #11570 requireslengthto carry out warnings- however for many internal usages this is not desirable
- hence 665414a offers and uses internal
raw_sizemethod
Warning.remove_warning was Broken
- it didn't work at all for
VectorandArray - e.g. for anything else than
WithWarningswrapper - this got fixed in 1924195
Explicitly Removing Warnings
- once the previous problem got fixed and removing warnings is reliable
- it is now possible to explicitly remove warnings when
propagate_warnings.not - done 58802e4
- doing the removal explicitly at the right place seems to be the core of obtaining consistency
Intricate Construction of ArrayList
- 4cd21cb introduces a way to construct
Arraywith elements with warnings - that provides consistent behavior of various
Vectortypes inVector_Spec - bringing more clarity into the test suite
Benchmarking Engine
|
| var add = | ||
| Stream.of( | ||
| "--foe=true", | ||
| "-jvmArgsAppend=--add-opens=org.graalvm.polyglot/org.graalvm.polyglot=ALL-UNNAMED"); |
|
|
||
| @Specialization | ||
| long doLong(long l) { | ||
| return l; |
There was a problem hiding this comment.
The VectorBenchmarks were slow because of expensive check for isNull:
Avoiding the check in a623bb3 for typical Enso values.







Pull Request Description
Vector.lengthdoesn't propagate vectorWarningwith the length value #11570Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,