mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Merge pull request #4203 from karl-zylinski/file-tags-without-comments
Make tags use #+ syntax instead of //+
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
// This is purely for documentation
|
// This is purely for documentation
|
||||||
//+build ignore
|
#+build ignore
|
||||||
package intrinsics
|
package intrinsics
|
||||||
|
|
||||||
// Package-Related
|
// Package-Related
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
// This could change at a later date if the all these data structures are
|
// This could change at a later date if the all these data structures are
|
||||||
// implemented within the compiler rather than in this "preload" file
|
// implemented within the compiler rather than in this "preload" file
|
||||||
//
|
//
|
||||||
//+no-instrumentation
|
#+no-instrumentation
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//+private
|
#+private
|
||||||
//+build linux, darwin, freebsd, openbsd, netbsd, haiku
|
#+build linux, darwin, freebsd, openbsd, netbsd, haiku
|
||||||
//+no-instrumentation
|
#+no-instrumentation
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//+private
|
#+private
|
||||||
//+build wasm32, wasm64p32
|
#+build wasm32, wasm64p32
|
||||||
//+no-instrumentation
|
#+no-instrumentation
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//+private
|
#+private
|
||||||
//+build windows
|
#+build windows
|
||||||
//+no-instrumentation
|
#+no-instrumentation
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build orca
|
#+build orca
|
||||||
//+private
|
#+private
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
foreign {
|
foreign {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build js, wasi, freestanding, essence
|
#+build js, wasi, freestanding, essence
|
||||||
//+private
|
#+private
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
_heap_alloc :: proc "contextless" (size: int, zero_memory := true) -> rawptr {
|
_heap_alloc :: proc "contextless" (size: int, zero_memory := true) -> rawptr {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build linux, darwin, freebsd, openbsd, netbsd, haiku
|
#+build linux, darwin, freebsd, openbsd, netbsd, haiku
|
||||||
//+private
|
#+private
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
when ODIN_OS == .Darwin {
|
when ODIN_OS == .Darwin {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+vet !cast
|
#+vet !cast
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build freebsd, openbsd, netbsd
|
#+build freebsd, openbsd, netbsd
|
||||||
//+private
|
#+private
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
foreign import libc "system:c"
|
foreign import libc "system:c"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build darwin
|
#+build darwin
|
||||||
//+private
|
#+private
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build freestanding
|
#+build freestanding
|
||||||
//+private
|
#+private
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
// TODO(bill): reimplement `os.write`
|
// TODO(bill): reimplement `os.write`
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build haiku
|
#+build haiku
|
||||||
//+private
|
#+private
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
foreign import libc "system:c"
|
foreign import libc "system:c"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build js
|
#+build js
|
||||||
//+private
|
#+private
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
foreign import "odin_env"
|
foreign import "odin_env"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+private
|
#+private
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build orca
|
#+build orca
|
||||||
//+private
|
#+private
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build wasi
|
#+build wasi
|
||||||
//+private
|
#+private
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
foreign import wasi "wasi_snapshot_preview1"
|
foreign import wasi "wasi_snapshot_preview1"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build windows
|
#+build windows
|
||||||
//+private
|
#+private
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
foreign import kernel32 "system:Kernel32.lib"
|
foreign import kernel32 "system:Kernel32.lib"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+private
|
#+private
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
foreign import "system:Foundation.framework"
|
foreign import "system:Foundation.framework"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build js
|
#+build js
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
init_default_context_for_js: Context
|
init_default_context_for_js: Context
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build wasm32, wasm64p32
|
#+build wasm32, wasm64p32
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
@(private="file")
|
@(private="file")
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+private
|
#+private
|
||||||
//+no-instrumentation
|
#+no-instrumentation
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
foreign import kernel32 "system:Kernel32.lib"
|
foreign import kernel32 "system:Kernel32.lib"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+private
|
#+private
|
||||||
//+no-instrumentation
|
#+no-instrumentation
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
@require foreign import "system:int64.lib"
|
@require foreign import "system:int64.lib"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build wasm32, wasm64p32
|
#+build wasm32, wasm64p32
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+vet !using-param
|
#+vet !using-param
|
||||||
package compress_zlib
|
package compress_zlib
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build amd64
|
#+build amd64
|
||||||
package aes_hw_intel
|
package aes_hw_intel
|
||||||
|
|
||||||
import "core:sys/info"
|
import "core:sys/info"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
//+build amd64
|
#+build amd64
|
||||||
package aes_hw_intel
|
package aes_hw_intel
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
//+build amd64
|
#+build amd64
|
||||||
package aes_hw_intel
|
package aes_hw_intel
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build amd64
|
#+build amd64
|
||||||
package chacha20_simd256
|
package chacha20_simd256
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build !amd64
|
#+build !amd64
|
||||||
package chacha20_simd256
|
package chacha20_simd256
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build amd64
|
#+build amd64
|
||||||
package aes
|
package aes
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build amd64
|
#+build amd64
|
||||||
package aes
|
package aes
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build amd64
|
#+build amd64
|
||||||
package aes
|
package aes
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build !amd64
|
#+build !amd64
|
||||||
package aes
|
package aes
|
||||||
|
|
||||||
@(private = "file")
|
@(private = "file")
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build amd64
|
#+build amd64
|
||||||
package aes
|
package aes
|
||||||
|
|
||||||
import "core:crypto/_aes/hw_intel"
|
import "core:crypto/_aes/hw_intel"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build freebsd, openbsd, netbsd
|
#+build freebsd, openbsd, netbsd
|
||||||
package crypto
|
package crypto
|
||||||
|
|
||||||
foreign import libc "system:c"
|
foreign import libc "system:c"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
//+build !linux
|
#+build !linux
|
||||||
//+build !windows
|
#+build !windows
|
||||||
//+build !openbsd
|
#+build !openbsd
|
||||||
//+build !freebsd
|
#+build !freebsd
|
||||||
//+build !netbsd
|
#+build !netbsd
|
||||||
//+build !darwin
|
#+build !darwin
|
||||||
//+build !js
|
#+build !js
|
||||||
package crypto
|
package crypto
|
||||||
|
|
||||||
HAS_RAND_BYTES :: false
|
HAS_RAND_BYTES :: false
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+private file
|
#+private file
|
||||||
//+build linux, darwin
|
#+build linux, darwin
|
||||||
package debug_trace
|
package debug_trace
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//+build !windows
|
#+build !windows
|
||||||
//+build !linux
|
#+build !linux
|
||||||
//+build !darwin
|
#+build !darwin
|
||||||
package debug_trace
|
package debug_trace
|
||||||
|
|
||||||
import "base:runtime"
|
import "base:runtime"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+private
|
#+private
|
||||||
//+build windows
|
#+build windows
|
||||||
package debug_trace
|
package debug_trace
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build js
|
#+build js
|
||||||
//+private
|
#+private
|
||||||
package dynlib
|
package dynlib
|
||||||
|
|
||||||
_load_library :: proc(path: string, global_symbols := false) -> (Library, bool) {
|
_load_library :: proc(path: string, global_symbols := false) -> (Library, bool) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build linux, darwin, freebsd, openbsd, netbsd
|
#+build linux, darwin, freebsd, openbsd, netbsd
|
||||||
//+private
|
#+private
|
||||||
package dynlib
|
package dynlib
|
||||||
|
|
||||||
import "core:os"
|
import "core:os"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build windows
|
#+build windows
|
||||||
//+private
|
#+private
|
||||||
package dynlib
|
package dynlib
|
||||||
|
|
||||||
import win32 "core:sys/windows"
|
import win32 "core:sys/windows"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build netbsd, openbsd
|
#+build netbsd, openbsd
|
||||||
package flags
|
package flags
|
||||||
|
|
||||||
import "base:runtime"
|
import "base:runtime"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build !netbsd
|
#+build !netbsd
|
||||||
//+build !openbsd
|
#+build !openbsd
|
||||||
package flags
|
package flags
|
||||||
|
|
||||||
import "base:runtime"
|
import "base:runtime"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+private
|
#+private
|
||||||
package flags
|
package flags
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+private
|
#+private
|
||||||
package flags
|
package flags
|
||||||
|
|
||||||
import "core:container/bit_array"
|
import "core:container/bit_array"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+private
|
#+private
|
||||||
package flags
|
package flags
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//+private
|
#+private
|
||||||
//+build !netbsd
|
#+build !netbsd
|
||||||
//+build !openbsd
|
#+build !openbsd
|
||||||
package flags
|
package flags
|
||||||
|
|
||||||
import "core:net"
|
import "core:net"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+private
|
#+private
|
||||||
package flags
|
package flags
|
||||||
|
|
||||||
@require import "base:runtime"
|
@require import "base:runtime"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build ignore
|
#+build ignore
|
||||||
package custom_formatter_example
|
package custom_formatter_example
|
||||||
import "core:fmt"
|
import "core:fmt"
|
||||||
import "core:io"
|
import "core:io"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build js
|
#+build js
|
||||||
package fmt
|
package fmt
|
||||||
|
|
||||||
import "core:bufio"
|
import "core:bufio"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//+build !freestanding
|
#+build !freestanding
|
||||||
//+build !js
|
#+build !js
|
||||||
//+build !orca
|
#+build !orca
|
||||||
package fmt
|
package fmt
|
||||||
|
|
||||||
import "base:runtime"
|
import "base:runtime"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build js
|
#+build js
|
||||||
package core_image_bmp
|
package core_image_bmp
|
||||||
|
|
||||||
load :: proc{load_from_bytes, load_from_context}
|
load :: proc{load_from_bytes, load_from_context}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build !js
|
#+build !js
|
||||||
package core_image_bmp
|
package core_image_bmp
|
||||||
|
|
||||||
import "core:os"
|
import "core:os"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build js
|
#+build js
|
||||||
package image
|
package image
|
||||||
|
|
||||||
load :: proc{
|
load :: proc{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build !js
|
#+build !js
|
||||||
package image
|
package image
|
||||||
|
|
||||||
import "core:os"
|
import "core:os"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+vet !using-stmt
|
#+vet !using-stmt
|
||||||
package netpbm
|
package netpbm
|
||||||
|
|
||||||
import "core:bytes"
|
import "core:bytes"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build js
|
#+build js
|
||||||
package netpbm
|
package netpbm
|
||||||
|
|
||||||
load :: proc {
|
load :: proc {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build !js
|
#+build !js
|
||||||
package netpbm
|
package netpbm
|
||||||
|
|
||||||
import "core:os"
|
import "core:os"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
//+vet !using-stmt
|
#+vet !using-stmt
|
||||||
package png
|
package png
|
||||||
|
|
||||||
import "core:compress"
|
import "core:compress"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build js
|
#+build js
|
||||||
package png
|
package png
|
||||||
|
|
||||||
load :: proc{load_from_bytes, load_from_context}
|
load :: proc{load_from_bytes, load_from_context}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build !js
|
#+build !js
|
||||||
package png
|
package png
|
||||||
|
|
||||||
import "core:os"
|
import "core:os"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build js
|
#+build js
|
||||||
package qoi
|
package qoi
|
||||||
|
|
||||||
save :: proc{save_to_buffer}
|
save :: proc{save_to_buffer}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build !js
|
#+build !js
|
||||||
package qoi
|
package qoi
|
||||||
|
|
||||||
import "core:os"
|
import "core:os"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build js
|
#+build js
|
||||||
package tga
|
package tga
|
||||||
|
|
||||||
save :: proc{save_to_buffer}
|
save :: proc{save_to_buffer}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build !js
|
#+build !js
|
||||||
package tga
|
package tga
|
||||||
|
|
||||||
import "core:os"
|
import "core:os"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build !freestanding
|
#+build !freestanding
|
||||||
//+build !orca
|
#+build !orca
|
||||||
package log
|
package log
|
||||||
|
|
||||||
import "core:encoding/ansi"
|
import "core:encoding/ansi"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
The code started out as an idiomatic source port of libTomMath, which is in the public domain, with thanks.
|
The code started out as an idiomatic source port of libTomMath, which is in the public domain, with thanks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//+build ignore
|
#+build ignore
|
||||||
package math_big
|
package math_big
|
||||||
|
|
||||||
import "core:time"
|
import "core:time"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build !js
|
#+build !js
|
||||||
package math
|
package math
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build js
|
#+build js
|
||||||
package math
|
package math
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
Ported from https://github.com/KdotJPG/OpenSimplex2.
|
Ported from https://github.com/KdotJPG/OpenSimplex2.
|
||||||
Copyright 2022 Yuki2 (https://github.com/NoahR02)
|
Copyright 2022 Yuki2 (https://github.com/NoahR02)
|
||||||
*/
|
*/
|
||||||
//+private
|
#+private
|
||||||
package math_noise
|
package math_noise
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build !freestanding
|
#+build !freestanding
|
||||||
package mem
|
package mem
|
||||||
|
|
||||||
import "core:sync"
|
import "core:sync"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build !freestanding
|
#+build !freestanding
|
||||||
package mem
|
package mem
|
||||||
|
|
||||||
import "base:runtime"
|
import "base:runtime"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build linux
|
#+build linux
|
||||||
//+private
|
#+private
|
||||||
package mem_virtual
|
package mem_virtual
|
||||||
|
|
||||||
import "core:sys/linux"
|
import "core:sys/linux"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
//+private
|
#+private
|
||||||
//+build !darwin
|
#+build !darwin
|
||||||
//+build !freebsd
|
#+build !freebsd
|
||||||
//+build !openbsd
|
#+build !openbsd
|
||||||
//+build !netbsd
|
#+build !netbsd
|
||||||
//+build !linux
|
#+build !linux
|
||||||
//+build !windows
|
#+build !windows
|
||||||
package mem_virtual
|
package mem_virtual
|
||||||
|
|
||||||
_reserve :: proc "contextless" (size: uint) -> (data: []byte, err: Allocator_Error) {
|
_reserve :: proc "contextless" (size: uint) -> (data: []byte, err: Allocator_Error) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+private
|
#+private
|
||||||
package mem_virtual
|
package mem_virtual
|
||||||
|
|
||||||
Platform_Memory_Block :: struct {
|
Platform_Memory_Block :: struct {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build darwin, netbsd, freebsd, openbsd
|
#+build darwin, netbsd, freebsd, openbsd
|
||||||
//+private
|
#+private
|
||||||
package mem_virtual
|
package mem_virtual
|
||||||
|
|
||||||
import "core:sys/posix"
|
import "core:sys/posix"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//+build windows
|
#+build windows
|
||||||
//+private
|
#+private
|
||||||
package mem_virtual
|
package mem_virtual
|
||||||
|
|
||||||
foreign import Kernel32 "system:Kernel32.lib"
|
foreign import Kernel32 "system:Kernel32.lib"
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// +build windows, linux, darwin, freebsd
|
#+build windows, linux, darwin, freebsd
|
||||||
package net
|
package net
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// +build windows, linux, darwin, freebsd
|
#+build windows, linux, darwin, freebsd
|
||||||
package net
|
package net
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// +build windows, linux, darwin, freebsd
|
#+build windows, linux, darwin, freebsd
|
||||||
package net
|
package net
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build linux, darwin, freebsd
|
#+build linux, darwin, freebsd
|
||||||
package net
|
package net
|
||||||
/*
|
/*
|
||||||
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build windows
|
#+build windows
|
||||||
package net
|
package net
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
#+build darwin
|
||||||
package net
|
package net
|
||||||
// +build darwin
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build freebsd
|
#+build freebsd
|
||||||
package net
|
package net
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
#+build linux
|
||||||
package net
|
package net
|
||||||
// +build linux
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
#+build windows
|
||||||
package net
|
package net
|
||||||
// +build windows
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// +build windows, linux, darwin, freebsd
|
#+build windows, linux, darwin, freebsd
|
||||||
package net
|
package net
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
#+build darwin
|
||||||
package net
|
package net
|
||||||
//+build darwin
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build freebsd
|
#+build freebsd
|
||||||
package net
|
package net
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
#+build linux
|
||||||
package net
|
package net
|
||||||
//+build linux
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
#+build windows
|
||||||
package net
|
package net
|
||||||
//+build windows
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// +build windows, linux, darwin, freebsd
|
#+build windows, linux, darwin, freebsd
|
||||||
package net
|
package net
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
#+build darwin
|
||||||
package net
|
package net
|
||||||
// +build darwin
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//+build freebsd
|
#+build freebsd
|
||||||
package net
|
package net
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
#+build linux
|
||||||
package net
|
package net
|
||||||
// +build linux
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
#+build windows
|
||||||
package net
|
package net
|
||||||
// +build windows
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures.
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ File :: struct {
|
|||||||
fullpath: string,
|
fullpath: string,
|
||||||
src: string,
|
src: string,
|
||||||
|
|
||||||
|
tags: [dynamic]tokenizer.Token,
|
||||||
docs: ^Comment_Group,
|
docs: ^Comment_Group,
|
||||||
|
|
||||||
pkg_decl: ^Package_Decl,
|
pkg_decl: ^Package_Decl,
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ get_build_arch_from_string :: proc(str: string) -> runtime.Odin_Arch_Type {
|
|||||||
parse_file_tags :: proc(file: ast.File, allocator := context.allocator) -> (tags: File_Tags) {
|
parse_file_tags :: proc(file: ast.File, allocator := context.allocator) -> (tags: File_Tags) {
|
||||||
context.allocator = allocator
|
context.allocator = allocator
|
||||||
|
|
||||||
if file.docs == nil {
|
if file.docs == nil && file.tags == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,11 +95,9 @@ parse_file_tags :: proc(file: ast.File, allocator := context.allocator) -> (tags
|
|||||||
build_project_names: [dynamic][]string
|
build_project_names: [dynamic][]string
|
||||||
defer shrink(&build_project_names)
|
defer shrink(&build_project_names)
|
||||||
|
|
||||||
for comment in file.docs.list {
|
parse_tag :: proc(text: string, tags: ^File_Tags, build_kinds: ^[dynamic]Build_Kind,
|
||||||
if len(comment.text) < 3 || comment.text[:2] != "//" {
|
build_project_name_strings: ^[dynamic]string,
|
||||||
continue
|
build_project_names: ^[dynamic][]string) {
|
||||||
}
|
|
||||||
text := comment.text[2:]
|
|
||||||
i := 0
|
i := 0
|
||||||
|
|
||||||
skip_whitespace(text, &i)
|
skip_whitespace(text, &i)
|
||||||
@@ -124,7 +122,7 @@ parse_file_tags :: proc(file: ast.File, allocator := context.allocator) -> (tags
|
|||||||
groups_loop: for {
|
groups_loop: for {
|
||||||
index_start := len(build_project_name_strings)
|
index_start := len(build_project_name_strings)
|
||||||
|
|
||||||
defer append(&build_project_names, build_project_name_strings[index_start:])
|
defer append(build_project_names, build_project_name_strings[index_start:])
|
||||||
|
|
||||||
for {
|
for {
|
||||||
skip_whitespace(text, &i)
|
skip_whitespace(text, &i)
|
||||||
@@ -143,10 +141,10 @@ parse_file_tags :: proc(file: ast.File, allocator := context.allocator) -> (tags
|
|||||||
}
|
}
|
||||||
|
|
||||||
scan_value(text, &i)
|
scan_value(text, &i)
|
||||||
append(&build_project_name_strings, text[name_start:i])
|
append(build_project_name_strings, text[name_start:i])
|
||||||
}
|
}
|
||||||
|
|
||||||
append(&build_project_names, build_project_name_strings[index_start:])
|
append(build_project_names, build_project_name_strings[index_start:])
|
||||||
}
|
}
|
||||||
case "build":
|
case "build":
|
||||||
kinds_loop: for {
|
kinds_loop: for {
|
||||||
@@ -156,7 +154,7 @@ parse_file_tags :: proc(file: ast.File, allocator := context.allocator) -> (tags
|
|||||||
arch_positive: runtime.Odin_Arch_Types
|
arch_positive: runtime.Odin_Arch_Types
|
||||||
arch_negative: runtime.Odin_Arch_Types
|
arch_negative: runtime.Odin_Arch_Types
|
||||||
|
|
||||||
defer append(&build_kinds, Build_Kind{
|
defer append(build_kinds, Build_Kind{
|
||||||
os = (os_positive == {} ? runtime.ALL_ODIN_OS_TYPES : os_positive) -os_negative,
|
os = (os_positive == {} ? runtime.ALL_ODIN_OS_TYPES : os_positive) -os_negative,
|
||||||
arch = (arch_positive == {} ? runtime.ALL_ODIN_ARCH_TYPES : arch_positive)-arch_negative,
|
arch = (arch_positive == {} ? runtime.ALL_ODIN_ARCH_TYPES : arch_positive)-arch_negative,
|
||||||
})
|
})
|
||||||
@@ -200,6 +198,27 @@ parse_file_tags :: proc(file: ast.File, allocator := context.allocator) -> (tags
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if file.docs != nil {
|
||||||
|
for comment in file.docs.list {
|
||||||
|
if len(comment.text) < 3 || comment.text[:2] != "//" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
text := comment.text[2:]
|
||||||
|
|
||||||
|
parse_tag(text, &tags, &build_kinds, &build_project_name_strings, &build_project_names)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for tag in file.tags {
|
||||||
|
if len(tag.text) < 3 || tag.text[:2] != "#+" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
// Only skip # because parse_tag skips the plus
|
||||||
|
text := tag.text[1:]
|
||||||
|
|
||||||
|
parse_tag(text, &tags, &build_kinds, &build_project_name_strings, &build_project_names)
|
||||||
|
}
|
||||||
|
|
||||||
tags.build = build_kinds[:]
|
tags.build = build_kinds[:]
|
||||||
tags.build_project_name = build_project_names[:]
|
tags.build_project_name = build_project_names[:]
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user