-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use native byte/char arrays in Go #2818
Merged
Merged
Changes from 87 commits
Commits
Show all changes
90 commits
Select commit
Hold shift + click to select a range
fd573f8
chore: Improve formatting
RustanLeino 0593726
Change Array from a struct to an interface in Go
RustanLeino d398d89
fix: Cast to non-box type after let in Java
RustanLeino 310fca6
fix: Comparison of arrays in JavaScript
RustanLeino 9a5da01
fix: Add needed casts in C#
RustanLeino ed1c1d6
Add tests
RustanLeino 06232a3
Improve EqualsGeneric for ArrayStruct
RustanLeino 6dc48fc
Further improve NewValue…
RustanLeino 37e7c2e
Add more tests
RustanLeino b7160e1
Improve NewArray… methods further
RustanLeino 7e1adf7
Change “interface{}” to its alias “any” in Go
RustanLeino ca2205d
chore: Remove unused method
RustanLeino e6cb5b5
Remove a use of EmitArraySelectAsLvalue
RustanLeino 91b44b3
Remove another use of EmitArraySelectAsLvalue
RustanLeino c3f810a
Make EmitArrayUpdate return RHS wr rather than take RHS as parameter
RustanLeino 8fb3c25
Replace EmitArraySelectAsLvalue by ArrayLvalueImpl
RustanLeino a15454a
Replace ArrayIndex pointers with Set/Get
RustanLeino 4b841ae
Remove unused runtime routines
RustanLeino 254100f
Change dims() into dimensionCount()/dimensionLength()
RustanLeino 3b9086c
Move Get1/Set1 into Array interface
RustanLeino af8c60d
Use ArraySet1 instead of ArrayUpdate
RustanLeino 6bb4e63
Remove contents() from Array interface
RustanLeino e792511
fix: Print array-display size as given in program
RustanLeino bf6eeeb
Improve C# array-size run-time checking
RustanLeino a883bd8
Add exampleElement parameter to EmitNewArray
RustanLeino c12c102
Create Go arrays using example element
RustanLeino d8940f6
Add start parameter to CreateForLoop
RustanLeino 8246df6
Change virtual EmitNewArray to take strings instead of Expressions
RustanLeino 1482bfd
Rework new-array with init-funciton to support example
RustanLeino 5bda65d
Add tests for more array types
RustanLeino 7fbf35c
Add tests for 2-dimensional arrays
RustanLeino 7cf4641
fix: Select tightest integer bound among IntBoundedPool’s
RustanLeino c1b5563
Clean up Array interface
RustanLeino de94752
Specialize array representation for byte and char
RustanLeino aebdbef
fix: Fix enumerations of long Java values
RustanLeino fe341f0
chore: Rename EmitExprAsInt to EmitExprAsNativeInt
RustanLeino 669d189
chore: Add Type parameter to CreateIntLiteral/CreateDecrement
RustanLeino 1631b31
Remove Type parameter from ArrayIndexToInt method
RustanLeino 9e6655d
Add virtual ArrayIndexLiteral method
RustanLeino 2a6b744
Add/improve comments
RustanLeino 5007e25
Add virtual ExprToInt method
RustanLeino 453aba3
fix: Don’t share inner arrays in arrays with 3 or more dimensions
RustanLeino fb1265d
Tidy up target types of array indices
RustanLeino 452feb0
Reduce boxing across array Get/Set for byte/char
RustanLeino 449eb02
Merge branch 'master' into go-array-refresh
RustanLeino 2975fa8
Fix merge
RustanLeino df0536f
Add release notes
RustanLeino 7529154
chore: Code improvements
RustanLeino 1756f9a
Follow up on Python support from PR #2742
RustanLeino 4d40379
Add other targets to test
RustanLeino 5e4d38a
Merge branch 'master' into go-array-refresh
RustanLeino b389f2a
Update Source/DafnyCore/Compilers/Compiler-python.cs
RustanLeino 57c77a3
Update Source/DafnyRuntime/DafnyRuntime.py
RustanLeino e947e0b
Update Source/DafnyRuntime/DafnyRuntime.py
RustanLeino a9f57b8
Update Source/DafnyRuntime/DafnyRuntime.py
RustanLeino 83c200d
Update Source/DafnyRuntime/DafnyRuntime.py
RustanLeino 23c6040
Act on reviewer comments for Python
RustanLeino dea64da
Merge branch 'master' into go-array-refresh
RustanLeino 8b34ea0
Fix code formatting
RustanLeino 723dd86
Reverse use of “any” to the older “interface{}” in Go
RustanLeino a4acb70
Merge branch 'master' into go-array-refresh
RustanLeino 5aa8360
Merge branch 'master' into go-array-refresh
RustanLeino 43947ed
Merge branch 'master' into go-array-refresh
RustanLeino f341c12
Merge branch 'master' into go-array-refresh
RustanLeino 855627f
Change a last occurrence of “any” to “interface{}” for Go
RustanLeino 71e791a
Merge branch 'master' into go-array-refresh
RustanLeino 82399d9
Mention a fixed issue
RustanLeino e96af9b
Add tests for another fixed issue
RustanLeino 84137fb
Point out file issue in a test file
RustanLeino 9015d2f
Merge branch 'master' into go-array-refresh
RustanLeino 362dbe9
Act on PR comments
RustanLeino a5d2c22
Merge branch 'master' into go-array-refresh
RustanLeino f9349af
Optimize Go arrays for CodePoint
RustanLeino a2d8340
fix: Type descriptors and default values of Unicode char for C#
RustanLeino e842bfc
fix: Default value of unicode char for JavaScript
RustanLeino e5ee2aa
Big cop-out: Java unicode boxing/unboxing not yet working
RustanLeino b9b7831
Some unicode fixes, and giving up on Java and Python
RustanLeino 5069cee
Merge branch 'master' into go-array-refresh
RustanLeino 027e17c
Export only Array, not ArrayStruct, ArrayForByte, …
RustanLeino 8cc0b87
Merge branch 'master' into go-array-refresh
RustanLeino 3a8c6fe
Merge branch 'master' into go-array-refresh
robin-aws 6835539
Ensure isStr inference is disabled in more cases for —unicode-char in…
robin-aws 93720cc
Merge branch 'go-array-refresh' of github.com:RustanLeino/dafny into …
robin-aws 3522080
Merge branch 'master' into go-array-refresh
atomb bcd2f04
Enabling Python in —unicode-char versino of Arrays.dfy
robin-aws 0353ee3
Merge branch 'master' into go-array-refresh
robin-aws 57b80d0
Overload + and - on CodePoint instead
robin-aws ec525c9
None and None == None
robin-aws d332ca3
Apply suggestions from code review
robin-aws 41bad87
Merge branch 'master' into go-array-refresh
robin-aws File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm already happy that we've abstracted away from "C# array size must not be larger than max 32-bit int" to this more general message, but it still implies that we're actually out of memory, or above a configured limit, when that's not actually true. Perhaps "array size exceeds supported maximum" instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should make this change consistently for all the compilers. That is, I think we should decide on such a maximum limit for each target (either 31, 32, 63, or 64 bits, or unlimited). Then, the compilers can always use the corresponding native word size for array sizes and indices. I suggest this be done as a separate PR. I filed Issue #3212 to track this.