@@ -4,7 +4,7 @@ import "core:bytes"
import "core:io"
import "core:mem"
import "core:unicode/utf8"
-import "intrinsics"
+import "core:intrinsics"
// Extra errors returns by scanning procedures
Scanner_Extra_Error :: enum i32 {
@@ -1,6 +1,6 @@
package container
_ :: intrinsics;
@@ -10,7 +10,7 @@ import "core:strconv"
import "core:strings"
import "core:time"
Info :: struct {
minus: bool,
package hash
@(optimization_mode="speed")
crc32 :: proc(data: []byte, seed := u32(0)) -> u32 #no_bounds_check {
@@ -1,7 +1,7 @@
adler32 :: proc(data: []byte, seed := u32(1)) -> u32 #no_bounds_check {
package io
import "core:runtime"
package math_bits
U8_MIN :: 0;
U16_MIN :: 0;
@@ -3,7 +3,7 @@ package math_fixed
import "core:math"
import "core:strconv"
Fixed :: struct($Backing: typeid, $Fraction_Width: uint)
package linalg
-import "builtin"
+import "core:builtin"
radians :: proc(degrees: $T) -> (out: T) where IS_NUMERIC(ELEM_TYPE(T)) {
// Generic
package math
Float_Class :: enum {
package mem
nil_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
package os
import win32 "core:sys/windows"
is_path_separator :: proc(c: byte) -> bool {
return c == '/' || c == '\\';
@@ -2,7 +2,7 @@ package reflect
Type_Info :: runtime.Type_Info;
@@ -20,7 +20,7 @@
//
package runtime
// NOTE(bill): This must match the compiler's
Calling_Convention :: enum u8 {
@builtin
Maybe :: union($T: typeid) #maybe {T};
/*
INITIAL_MAP_CAP :: 16;
bswap_16 :: proc "none" (x: u16) -> u16 {
return x>>8 | x<<8;
@(link_name="__umodti3")
umodti3 :: proc "c" (a, b: u128) -> u128 {
@@ -2,7 +2,7 @@
//+build windows
foreign import kernel32 "system:Kernel32.lib"
udivmod128 :: proc "c" (a, b: u128, rem: ^u128) -> u128 {
_ctz :: intrinsics.count_trailing_zeros;
package slice
import "core:math/bits"
ORD :: intrinsics.type_is_ordered;
@@ -2,7 +2,7 @@ package sort
import _slice "core:slice"
package sync
Ordering :: enum {
Relaxed, // Monotonic
@@ -2,7 +2,7 @@ package sync
import "core:math/rand"
_, _ :: time, rand;
cpu_relax :: #force_inline proc "contextless" () {
intrinsics.cpu_relax();
package sync2
cpu_relax :: intrinsics.cpu_relax;
@@ -4,7 +4,7 @@ package sync2
import "core:c"
foreign import pthread "System.framework"
Wait_Group :: struct {
counter: int,
@@ -4,7 +4,7 @@ package testing
Sema :: struct {
@@ -2,7 +2,7 @@ package thread
package thread
import "core:sync"
package time
Duration :: distinct i64;
@@ -2,7 +2,7 @@ package utf8string
String :: struct {
contents: string,
@@ -5184,7 +5184,12 @@ bool determine_path_from_string(BlockingMutex *file_mutex, Ast *node, String bas
if (is_package_name_reserved(file_str)) {
*path = file_str;
- return true;
+ if (collection_name == "core") {
+ return true;
+ } else {
+ syntax_error(node, "The package '%.*s' must be imported with the core library collection: 'core:%.*s'", LIT(file_str), LIT(file_str));
+ return false;
+ }
}
if (file_mutex) mutex_lock(file_mutex);