Commit Graph

31 Commits

Author SHA1 Message Date
Oliver Schneider
eba199a437 Document the reason for Pointer's existence 2017-07-11 12:50:03 +02:00
Oliver Schneider
0dd6ef8301 Simplify with_extra 2017-07-11 12:39:12 +02:00
Oliver Schneider
d0d1d2d5e8
Remove *offset* methods from PrimVal onto Pointer 2017-07-11 12:28:11 +02:00
Oliver Schneider
03f0a88002
Use a wrapper type to differentiate between PrimVal and pointers 2017-07-11 12:28:11 +02:00
Oliver Schneider
2d52054fb2
Rename Pointer to MemoryPointer 2017-07-11 10:32:01 +02:00
Oliver Schneider
823b952ef2 Only check pointers when dereferencing
Before we also checked whether pointers had alloc_ids when we created rvalue references
2017-07-03 14:16:11 +02:00
Oliver Schneider
91409f1d76 Code nits 2017-06-28 13:10:50 +02:00
Oliver Schneider
eca9e3429a PrimVal used to allow comparing Undef 2017-06-23 16:12:03 +02:00
Ralf Jung
d5c031640f use PrimVal::to_bool rather than bytes_to_bool 2017-06-22 20:20:26 -07:00
Ralf Jung
14cb31fb88 permit bit-anding in pointer values below the alignment
This makes HashMap work!
2017-06-22 14:46:53 -07:00
Oliver Schneider
8de111018d Merge pull request #201 from oli-obk/test_suite_fails
"Support" more libc functions
2017-06-22 14:16:45 +02:00
Ralf Jung
7b1582b383 permit integer addition and subtraction on ptr-integers 2017-06-21 21:38:43 -07:00
Ralf Jung
b8c5e7fd0e refactor pointer handling in binops 2017-06-21 21:02:11 -07:00
Oliver Schneider
f22c7e43df Store env vars where necessary 2017-06-21 15:46:30 +02:00
Oliver Schneider
fcf495821e
Get rid of the integer allocation 2017-06-20 14:28:18 +02:00
Ralf Jung
684de68d6c properly wrap pointer offsets at pointer size 2017-06-05 18:07:26 -07:00
Ralf Jung
36505c7b40 fix bitops being accidentally allowed on pointers from the same allocation 2017-06-05 17:17:16 -07:00
Ralf Jung
f39e015163 check for overflow when doing pointer arithmetic 2017-06-05 14:23:35 -07:00
Oliver Schneider
6aed897c70
1 > -1 2017-02-09 09:43:45 +01:00
Oliver Schneider
3a658e09e8
rustup (i128) 2017-01-12 08:28:42 +01:00
Scott Olson
6b7c68bec2 Rename bits to bytes for consistency. 2016-12-17 03:19:32 -08:00
Scott Olson
4fe41ad8d5 Refactor PrimVal::bits() out of existence. 2016-12-17 03:09:57 -08:00
Scott Olson
d63ab5f8c3 Refactor PrimVal::relocation out of existence. 2016-12-17 01:47:24 -08:00
Scott Olson
3bad50e114 Rename PrimVal::from_{u,}int to from_{u,i}64. 2016-12-16 22:11:44 -08:00
Scott Olson
f83c45e367 Turn invalid panics into Results and rename fns. 2016-12-16 22:08:40 -08:00
Scott Olson
33f97feafb Shorten PrimVal::Undefined to PrimVal::Undef. 2016-12-16 22:03:34 -08:00
Scott Olson
e615f671ce Remove potentially wrong PartialEq from PrimVal. 2016-12-16 22:03:34 -08:00
Scott Olson
67e1627a55 Rename PrimVal::Pointer to PrimVal::Ptr.
Also fill out the PrimVal doc comments.
2016-12-16 22:03:34 -08:00
Scott Olson
b36a83171b Turn PrimVal into an enum including Undefined.
This is step 1 of a refactoring to fix #95. The `Undefined` variant is
so far unused and the old `bits` and `relocation` fields are emulated
with two new temporary methods. There should be no functional change due
to this commit.
2016-12-16 22:03:34 -08:00
Scott Olson
1af63171f8 Split primval into operator and value. 2016-12-10 16:23:07 -08:00
Scott Olson
4702d97093 Flatten 'interpreter' mod tree into the root. 2016-12-07 20:30:37 -08:00