Matt Knight
cf3194804e
changed enums to lower case
2020-09-07 07:17:21 -07:00
Tadeo Kondrak
acdf1f0bde
@Type for union fixes
2020-09-07 06:23:50 -06:00
Tadeo Kondrak
771f35c593
Use less inefficient method of replacing TypeInfo.UnionField.enum_field
2020-09-07 06:23:27 -06:00
Tadeo Kondrak
ac19ccf595
Update standard library for removal of TypeInfo.UnionField.enum_field
2020-09-07 06:23:26 -06:00
Tadeo Kondrak
ff2ed966bb
Implement @Type for Union
...
This removes TypeInfo.UnionField.enum_field, which is redundant with
TypeInfo.Union.tag_type.
2020-09-07 06:23:24 -06:00
Matt Knight
e7547eeefa
fixed missing 'packed' keyword
2020-09-06 22:31:35 -07:00
Matt Knight
caaa9ad2af
added btf
2020-09-06 21:44:16 -07:00
Matt Knight
67817b230f
fixed improper builtin import
2020-09-06 17:09:25 -07:00
Matt Knight
cf06817768
improved compile error message
2020-09-06 16:21:05 -07:00
Andrew Kelley
d7268cbb24
Merge pull request #6232 from LemonBoy/fix-readall
...
std: Don't trust stat() size in readAllAlloc fns
2020-09-06 19:19:57 -04:00
Matt Knight
a993c7dd1b
removed redundant pseudo insn
2020-09-06 16:19:49 -07:00
Matt Knight
295f09eadc
implemented and testing op codes for instructions documented in the unofficial bpf insn reference
2020-09-06 16:12:27 -07:00
Daniel Ludwig
a8a806e925
std.ChildProcess: use "\Device\Null" on Windows
2020-09-06 18:25:33 -04:00
dec05eba
ff58f09b68
Use better haystack size and needle size for cutoff between linear and BMH
2020-09-06 16:23:18 +02:00
Andrew Kelley
32a77a6047
Merge pull request #6239 from pfgithub/patch-1
...
Support allocating 0 bit types
2020-09-06 01:16:33 -04:00
dec05eba
8af1f8ba1a
Add comment to clearify why the first/last element in preprocess is
...
skipped
2020-09-05 21:15:44 +02:00
dec05eba
0a016e8fc2
Fix indexOf and lastIndexOf with empty needle
2020-09-05 16:55:32 +02:00
dec05eba
f93498d2d8
Fix start index if @sizeOf(T) > 1
2020-09-05 15:31:22 +02:00
dec05eba
3a6e6bd538
Check if the type has unique bit representation to see if it can be compared byte-wise
2020-09-05 15:20:48 +02:00
dec05eba
db51821a97
Remove type size check, looks like its not needed
...
Add check if the type is float. Float byte comparison doesn't work
because +0.0 and -0.0 are considered equal but their byte
representations are not equal.
2020-09-05 14:56:59 +02:00
dec05eba
997451da03
Make preprocess function take comptime sized slice
2020-09-05 14:25:44 +02:00
dec05eba
a394a6300c
Fix lastIndexOf and add tests that do not fallback to linear search
...
Use sliceAsBytes to convert []const T to []const u8.
Cleanup.
2020-09-05 14:17:38 +02:00
Veikka Tuominen
41bbadbb9a
Merge pull request #6246 from Vexu/field
...
Remove deprecated fields on `type`
2020-09-05 13:58:02 +03:00
dec05eba
f65f3d24f8
Only use boyer-moore-horsepool for types that are power of 2
2020-09-05 12:57:05 +02:00
dec05eba
d012507a8f
Use boyer-moore-horspool with all types of T
2020-09-05 12:02:18 +02:00
dec05eba
e297b4815c
Create skipping table
...
Also fallback to naive implementation if haystack is small
or if the needle is small or if sizeof type is not 1.
2020-09-05 11:24:05 +02:00
dec05eba
50c52e0135
Use boyer-moore-horspool algorithm for indexOfPos and lastIndexOf
2020-09-05 11:22:12 +02:00
Andrew Kelley
cff14dc2c6
Merge pull request #6247 from alexnask/stage2_pe
...
Added a basic Portable Executable linker to stage2
2020-09-04 16:05:58 -04:00
Andrew Kelley
209a3da4f7
provide default implementation of std.log on freestanding
...
closes #6252
2020-09-04 13:00:10 -07:00
Vexu
09c861b829
update rest of tests
2020-09-04 22:49:14 +03:00
yettinmoor
0c43b6ef5c
document how to escape curly braces in fmt.format
2020-09-04 22:11:09 +03:00
Vexu
6b2f4fd20d
langref: atomic ops are allowed on pointers
...
Closes #6217
2020-09-04 22:02:39 +03:00
LemonBoy
3c8e1bc25b
std: Fix for 32bit systems
2020-09-04 12:48:36 +02:00
LemonBoy
90743881cf
std: Minor changes to the fs module
...
* Add a size_hint parameter to the read{toEnd,File}AllocOptions fns
* Rename readAllAlloc{,Options} to readToEndAlloc{,Options} as they
don't rewind the file before reading
* Fix missing rewind in test case
2020-09-04 10:17:00 +02:00
Andrew Kelley
338f155a02
Merge remote-tracking branch 'origin/master' into llvm11
2020-09-03 23:52:19 -07:00
Alexandros Naskos
e9807418e7
Added .pe ObjectFormat
...
MachO linker no longer collects unused dwarf debug information
2020-09-04 05:22:26 +03:00
Alexandros Naskos
e9b137f23a
Completed basic PE linker for stage2
...
Added std.coff.MachineType
Added image characteristic and section flag valued to std.coff
Added std.Target.Cpu.Arch.toCoffMachine
Fixed stage2 --watch flag on windows
2020-09-04 05:15:03 +03:00
Alexandros Naskos
fe0ad8d6e9
Write PE section table
2020-09-04 05:12:27 +03:00
Alexandros Naskos
fac9a4e286
Start working on PE/COFF linking.
2020-09-04 05:12:26 +03:00
pfg
abe672956e
Test 0 bit allocation
2020-09-03 16:33:47 -07:00
Felix (xq) Queißner
88724b2a89
Introduces a space after the ellipsis for test and progress.
2020-09-03 18:07:30 -04:00
Andrew Kelley
1034459170
Merge pull request #6243 from ifreund/uid-gid-cleanup
...
std: clean up usage of uid_t/gid_t, add seteuid/setegid to std.os
2020-09-03 18:05:59 -04:00
Andrew Kelley
17f36566de
stage2: upgrade Scope.Container decls from ArrayList to HashMap
2020-09-03 15:02:38 -07:00
Andrew Kelley
f2bbd8a548
Merge pull request #6242 from Vexu/stage2
...
Stage2: slicing and split container scope from file scope
2020-09-03 17:22:57 -04:00
Jakub Konka
dac1cd7750
Write out simple Mach-O object file
...
This commit adds enough Mach-O linker implementation to write out simple
Mach-O object file. Be warned however, the object file is largely incomplete:
misses relocation info, debug symbols, etc. However, it seemed like a
good starting to get the basic understanding right.
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-09-03 16:43:47 -04:00
Lachlan Easton
2a58e30bd5
std meta: fix use of alignOf in meta.cast
2020-09-03 14:11:04 -04:00
Andrew Kelley
39a80cf59e
Merge pull request #6238 from Aransentin/master
...
Add the "sync" family of functions
2020-09-03 14:07:36 -04:00
Kenta Iwasaki
50e3906951
os: return error.SocketNotListening for EINVAL on accept ( #6226 )
2020-09-03 13:57:08 -04:00
LemonBoy
969547902b
std: Fix silent overflow in float parsing code
...
A u64 can only hold 19 decimal digits, adjust the limit.
2020-09-03 18:14:19 +03:00
Vexu
1df0f3ac24
update uses of deprecated type field access
2020-09-03 18:10:40 +03:00