Skip to content

Commit

Permalink
Merge branch 'master' into josh/text_document
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaBatty authored Jul 30, 2024
2 parents 805ea7d + ec01af4 commit 8d6bb55
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
- [Attributes](./reference/attributes.md)
- [Style Guide](./reference/style_guide.md)
- [Known Issues and Workarounds](./reference/known_issues_and_workarounds.md)
- [Behavior Considered Undefined](./reference/undefined_behavior.md)
- [Differences From Solidity](./reference/solidity_differences.md)
- [Differences From Rust](./reference/rust_differences.md)
- [Contributing To Sway](./reference/contributing_to_sway.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/reference/known_issues_and_workarounds.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Missing Features

* [#1182](https://github.com/FuelLabs/sway/issues/1182) Arrays in a `storage` block are not yet supported. See the [Manual Storage Management](../blockchain-development/storage.md#manual-storage-management) section for details on how to use `store` and `get` from the standard library to manage storage slots directly. Note, however, that `StorageMap<K, V>` _does_ support arbitrary types for `K` and `V` without any limitations.
* [#1182](https://github.com/FuelLabs/sway/issues/1182) Arrays in a `storage` block are not yet supported. See the [Manual Storage Management](../advanced/advanced_storage.md#manual-storage-management) section for details on how to use `store` and `get` from the standard library to manage storage slots directly. Note, however, that `StorageMap<K, V>` _does_ support arbitrary types for `K` and `V` without any limitations.

## General

Expand Down
15 changes: 15 additions & 0 deletions docs/book/src/reference/undefined_behavior.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Behavior Considered Undefined

Sway code that contains any of the following behavior is considered undefined.
The compiler is allowed to treat undefined Sway code however it desires,
including removing it or replacing it with any other Sway code.

This is not an exhaustive list, it may grow or shrink, there is no formal model
of Sway's semantics so there may be more behavior considered undefined. We
reserve the right to make some of the listed behavior defined in the future.

* Invalid arithmetic operations (overflows, underflows, division by zero, etc)
* Misuse of compiler intrinsics
* Incorrect use of inline assembly
* Reading and writing `raw_ptr` and `raw_slice`
* Slicing and indexing out of bounds by directly using compiler intrinsics.

0 comments on commit 8d6bb55

Please sign in to comment.