about summary refs log tree commit diff stats
path: root/089scenario_filesystem.cc
Commit message (Collapse)AuthorAgeFilesLines
* 4258 - undo 4257Kartik Agaram2018-06-151-9/+7
|
* 4257 - abortive attempt at safe fat pointersKartik Agaram2018-06-151-7/+9
| | | | | | | | | | | | | | | | I've been working on this slowly over several weeks, but it's too hard to support 0 as the null value for addresses. I constantly have to add exceptions for scalar value corresponding to an address type (now occupying 2 locations). The final straw is the test for 'reload': x:num <- reload text 'reload' returns an address. But there's no way to know that for arbitrary instructions. New plan: let's put this off for a bit and first create support for literals. Then use 'null' instead of '0' for addresses everywhere. Then it'll be easy to just change what 'null' means.
* 4179 - experiment: rip out memory reclamationKartik K. Agaram2018-01-031-12/+4
| | | | | | | | | | | | | | | | | | | | | I have a plan for a way to avoid use-after-free errors without all the overheads of maintaining refcounts. Has the nice side-effect of requiring manual memory management. The Mu way is to leak memory by default and build tools to help decide when and where to expend effort plugging memory leaks. Arguably programs should be distributed with summaries of their resource use characteristics. Eliminating refcount maintenance reduces time to run tests by 30% for `mu edit`: this commit parent mu test: 3.9s 4.5s mu test edit: 2:38 3:48 Open questions: - making reclamation easier; some sort of support for destructors - reclaiming local scopes (which are allocated on the heap) - should we support automatically reclaiming allocations inside them?
* 4104Kartik K. Agaram2017-11-031-9/+9
| | | | | Stop hardcoding Max_depth everywhere; we had a default value for a reason but then we forgot all about it.
* 3668 - $read a word, stopping at whitespaceKartik K. Agaram2016-11-111-8/+0
| | | | | | | | | | | | Useful for programming contests like https://halite.io Doesn't suffer from C++'s usual buffered gotchas: it'll skip leading whitespace. Slow, though. Can be speeded up, though. - 20 minutes later But what's the point? Typewriter mode is actually harder to test than 'raw' console mode. Writing Mu programs in typewriter mode is just going to encourage us all to slack off on writing tests.
* 3643Kartik K. Agaram2016-11-071-1/+1
| | | | | Standardize on calling literate waypoints "Special-cases" rather than "Cases". Invariably there's a default path already present.
* 3608 - concurrent writes to fake file systemKartik K. Agaram2016-10-291-1/+1
|
* 3539Kartik K. Agaram2016-10-211-0/+15
| | | | | | | | | | | | | Always check if next_word() returned an empty string (if it hit eof). Thanks Rebecca Allard for running into a crash when a .mu file ends with '{' (without a following newline). Open question: how to express the constraint that next_word() should always check if its result is empty? Can *any* type system do that?! Even the usual constraint that we must use a result isn't iron-clad: you could save the result in a variable but then ignore it. Unless you go to Go's extraordinary lengths of considering any dead code an error.
* 3522Kartik K. Agaram2016-10-191-2/+2
|
* 3505Kartik K. Agaram2016-10-151-4/+2
|
* 3504Kartik K. Agaram2016-10-151-58/+58
|
* 3503Kartik K. Agaram2016-10-151-2/+2
| | | | | Undo commit 3500; turns out we need the duplicate scenario names for good test failure messages.
* 3502Kartik K. Agaram2016-10-151-2/+4
| | | | | | | | Better implementation of commit 3445: not requiring types for special variables in scenarios. It turned out that it wasn't working anytime we needed to call 'get' on a special variable inside a scenario. After moving that work to an earlier transform we can now use 'filesystem' without a type inside scenarios.
* 3500Kartik K. Agaram2016-10-151-2/+2
|
* 3438Kartik K. Agaram2016-10-041-16/+3
|
* 3390Kartik K. Agaram2016-09-171-10/+10
|
* 3389Kartik K. Agaram2016-09-171-2/+2
|
* 3379Kartik K. Agaram2016-09-171-8/+8
| | | | Can't use type abbreviations inside 'memory-should-contain'.
* 3377Kartik K. Agaram2016-09-171-8/+8
|
* 3374Kartik K. Agaram2016-09-161-2/+2
|
* 3273Kartik K. Agaram2016-08-281-2/+2
| | | | | | | | | | | Undo 3272. The trouble with creating a new section for constants is that there's no good place to order it since constants can be initialized using globals as well as vice versa. And I don't want to add constraints disallowing either side. Instead, a new plan: always declare constants in the Globals section using 'extern const' rather than just 'const', since otherwise constants implicitly have internal linkage (http://stackoverflow.com/questions/14894698/why-does-extern-const-int-n-not-work-as-expected)
* 3272Kartik K. Agaram2016-08-281-1/+1
| | | | | | Move global constants into their own section since we seem to be having trouble linking in 'extern const' variables when manually cleaving mu.cc into separate compilation units.
* 3259Kartik K. Agaram2016-08-261-2/+2
| | | | | | | | | | | Prefer preincrement operators wherever possible. Old versions of compilers used to be better at optimizing them. Even if we don't care about performance it's useful to make unary operators look like unary operators wherever possible, and to distinguish the 'statement form' which doesn't care about the value of the expression from the postincrement which usually increments as a side-effect in some larger computation (and so is worth avoiding except for some common idioms, or perhaps even there).
* 3256Kartik K. Agaram2016-08-261-2/+15
| | | | | Bugfix in filesystem creation. I'm sure there are other fake-filesystem bugs.
* 3239Kartik K. Agaram2016-08-211-1/+1
|
* 3233 - change how Mu escapes stringsKartik K. Agaram2016-08-201-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks Sam Putman for helping think through this idea. When you encounter a backslash, strip it out and pass through any following run of backslashes. If we 'escaped' a single following character like C, then the character '\' would be the same as: '\\' escaped once '\\\\' escaped twice '\\\\\\\\' escaped thrice (8 backslashes) ..and so on, the number of backslashes doubling each time. Instead, our approach is to make the character '\' the same as: '\\' escaped once '\\\' escaped twice '\\\\' escaped thrice ..and so on, the number of backslashes merely increasing by one each time. This approach only works as long as backslashes aren't also overloaded to create special characters. So Mu doesn't follow C's approach of overloading backslashes both to escape quote characters and also as a notation for unprintable characters like '\n'.
* 3232Kartik K. Agaram2016-08-201-1/+34
| | | | Support pipe characters in fake files. Still super ugly, though.
* 3229 - fake file systems using 'assume-filesystem'Kartik K. Agaram2016-08-201-0/+210
Built with Stephen Malina.
2020-09-29 03:43:19 -0700 committer Kartik Agaram <vc@akkartik.com> 2020-09-29 03:51:19 -0700 6898 - names for floating-point xmm* registers' href='/akkartik/mu/commit/201register-names.subx?h=main&id=8b1da9bbb23bf9049a2f764a1b8bbc42a17f045f'>8b1da9bb ^
cf1ddc41 ^
8b1da9bb ^
cf1ddc41 ^
8b1da9bb ^
cf1ddc41 ^
8b1da9bb ^
cf1ddc41 ^
8b1da9bb ^
cf1ddc41 ^
8b1da9bb ^
cf1ddc41 ^
8b1da9bb ^
cf1ddc41 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164