about summary refs log tree commit diff stats
path: root/085scenario_console.cc
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 3260Kartik K. Agaram2016-08-261-2/+2
| | | | | array length = number of elements array size = in locations
* 3259Kartik K. Agaram2016-08-261-1/+1
| | | | | | | | | | | 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).
* 3241Kartik K. Agaram2016-08-211-29/+26
| | | | Use allocate() in 'assume-console'.
* 3240Kartik K. Agaram2016-08-211-8/+8
|
* 3239Kartik K. Agaram2016-08-211-4/+4
|
* 3229 - fake file systems using 'assume-filesystem'Kartik K. Agaram2016-08-201-2/+2
| | | | Built with Stephen Malina.
* 3178Kartik K. Agaram2016-08-131-0/+4
|
* 3083Kartik K. Agaram2016-07-011-2/+2
|
* 2990Kartik K. Agaram2016-05-201-1/+1
| | | | | | | | | | Standardize quotes around reagents in error messages. I'm still sure there's issues. For example, the messages when type-checking 'copy'. I'm not putting quotes around them because in layer 60 I end up creating dilated reagents, and then it's a bit much to have quotes and (two kinds of) brackets. But I'm sure I'm doing that somewhere..
* 2973 - reclaim refcounts for local scopes againKartik K. Agaram2016-05-181-0/+2
| | | | | | More thorough redo of commit 2767 (Mar 12), which was undone in commit 2810 (Mar 24). It's been a long slog. Next step: write a bunch of mu code in the edit/ app in search of bugs.
* 2864 - replace all address:shared with just addressKartik K. Agaram2016-04-241-10/+10
| | | | | | | Now that we no longer have non-shared addresses, we can just always track refcounts for all addresses. Phew!
* 2773 - switch to 'int'Kartik K. Agaram2016-03-131-21/+21
| | | | This should eradicate the issue of 2771.
* 2771 - fix for clang on 32-bit machinesKartik K. Agaram2016-03-131-1/+1
| | | | | | | | | | | Turns out that LLVM/Clang still doesn't support multiplying 64-bit numbers on a 32-bit platform. https://llvm.org/bugs/show_bug.cgi?id=14469 This is just a quick fix, because it turns out I don't have any integer multiplication anywhere else. In the long run I think I'm going to just drop 'long long int' in favor of 'int'. Overflow is less likely than this configuration on somebody's machine.
* 2767 - reclaim refcounts for local variablesKartik K. Agaram2016-03-121-0/+2
| | | | | | This uncovered a second bug (besides 2766) -- I was manually doing the work of 'new-fake-console' inside 'assume-console' but forgetting to increment a refcount.
* 2712Kartik K. Agaram2016-02-261-2/+2
|
* 2677Kartik K. Agaram2016-02-201-2/+2
| | | | Include type names in the type tree. Though we aren't using them yet.
* 2581 - make space for the refcount in address:sharedKartik K. Agaram2016-01-201-5/+13
| | | | | | | | | | | We don't yet actually maintain the refcount. That's next. Hardest part of this was debugging the assume-console scenarios in layer 85. That took some detailed manual diffing of traces (because the output of diff was no good). New tracing added in this commit add 8% to .traces LoC. Commented out trace() calls (used during debugging) make that 45%.
* 2576 - distinguish allocated addresses from othersKartik K. Agaram2016-01-191-10/+10
| | | | | | | | | | | | | | | | This is the one major refinement on the C programming model I'm planning to introduce in mu. Instead of Rust's menagerie of pointer types and static checking, I want to introduce just one new type, and use it to perform ref-counting at runtime. So far all we're doing is updating new's interface. The actual ref-counting implementation is next. One implication: I might sometimes need duplicate implementations for a recipe with allocated vs vanilla addresses of the same type. So far it seems I can get away with just always passing in allocated addresses; the situations when you want to pass an unallocated address to a recipe should be few and far between.
* 2430 - make room for more transformsKartik K. Agaram2015-11-131-0/+287
<vc@akkartik.com> 2015-04-27 01:42:07 -0700 1206 - 'wait' state for synchronizing routines' href='/akkartik/mu/commit/cpp/039wait.cc?h=main&id=c76b49e74ad8b66ac2c077dc0da62c2846131585'>c76b49e7 ^
f8e6e864 ^
166e3c0d ^
f8e6e864 ^
2cc42dce ^
2b250717 ^
2cc42dce ^

53881567 ^
f8e6e864 ^
2cc42dce ^
166e3c0d ^

c76b49e7 ^
f8e6e864 ^

c442a5ad ^
f8e6e864 ^
c442a5ad ^
f8e6e864 ^


c442a5ad ^
c76b49e7 ^
2cc42dce ^
f8e6e864 ^










2b250717 ^
f8e6e864 ^










c442a5ad ^
c76b49e7 ^





6c96a437 ^
05d17773 ^
f8e6e864 ^

c442a5ad ^
f8e6e864 ^
05d17773 ^
f8e6e864 ^
c76b49e7 ^

363685b8 ^
f8e6e864 ^


53881567 ^


7a84094a ^

53881567 ^










2b250717 ^
53881567 ^

3473c63a ^
53881567 ^
af023b32 ^





9dcbec39 ^
53881567 ^


3473c63a ^
53881567 ^
9dcbec39 ^
53881567 ^


49620728 ^

53881567 ^

9dcbec39 ^
53881567 ^







9dcbec39 ^
53881567 ^





3473c63a ^
53881567 ^


2b250717 ^
53881567 ^

b55b15a9 ^
53881567 ^
b55b15a9 ^
53881567 ^
6c96a437 ^
471839da ^
c442a5ad ^
53881567 ^





3473c63a ^
53881567 ^

860895ed ^
53881567 ^





7a84094a ^


53881567 ^

9dcbec39 ^
53881567 ^



7a84094a ^


53881567 ^

9dcbec39 ^
53881567 ^



d52406cc ^

53881567 ^

d52406cc ^


53881567 ^
9dcbec39 ^
53881567 ^



23d3a022 ^


53881567 ^
23d3a022 ^
53881567 ^
b0bf5321 ^
53881567 ^
23d3a022 ^


760f683f ^
53881567 ^
23d3a022 ^
53881567 ^
5e080ed4 ^
029a3bdf ^
5e080ed4 ^
029a3bdf ^
5e080ed4 ^
7a84094a ^


5e080ed4 ^
7a84094a ^
029a3bdf ^

7a84094a ^
5e080ed4 ^
7a84094a ^
5e080ed4 ^


7a84094a ^

029a3bdf ^

5e080ed4 ^
029a3bdf ^
5e080ed4 ^


029a3bdf ^
5e080ed4 ^

029a3bdf ^


5e080ed4 ^
029a3bdf ^
5e080ed4 ^
029a3bdf ^

5e080ed4 ^
029a3bdf ^
5e080ed4 ^
029a3bdf ^
5e080ed4 ^
029a3bdf ^
2b250717 ^
029a3bdf ^


5e080ed4 ^
029a3bdf ^




5e080ed4 ^
029a3bdf ^
2b250717 ^
029a3bdf ^


5e080ed4 ^
c442a5ad ^
029a3bdf ^



5e080ed4 ^


6c96a437 ^
029a3bdf ^

5e080ed4 ^

029a3bdf ^
6c96a437 ^
029a3bdf ^
5e080ed4 ^

c442a5ad ^
029a3bdf ^
5e080ed4 ^
029a3bdf ^



666191cb ^















5a820205 ^














666191cb ^
05fe4be5 ^


666191cb ^
7d07cd1d ^
05fe4be5 ^



















2b250717 ^
05fe4be5 ^
















2b250717 ^
05fe4be5 ^









5e080ed4 ^
05fe4be5 ^
363685b8 ^
5e080ed4 ^
1ead3562 ^
7a84094a ^

5e080ed4 ^
7a84094a ^
363685b8 ^
1ead3562 ^
7a84094a ^
363685b8 ^
6e698858 ^
5e080ed4 ^
029a3bdf ^
05fe4be5 ^
6e698858 ^
5e080ed4 ^

363685b8 ^


5e080ed4 ^
363685b8 ^
5e080ed4 ^
363685b8 ^

5e080ed4 ^
363685b8 ^
5e080ed4 ^
166e3c0d ^
5e080ed4 ^
166e3c0d ^
2b250717 ^
e4630643 ^

5f98a10c ^
5e080ed4 ^
e4630643 ^

166e3c0d ^


5e080ed4 ^
e4630643 ^
2b250717 ^
e4630643 ^

363685b8 ^
5e080ed4 ^
c442a5ad ^
363685b8 ^



5e080ed4 ^
6c96a437 ^
05d17773 ^
029a3bdf ^
5e080ed4 ^

029a3bdf ^
6c96a437 ^
029a3bdf ^
05fe4be5 ^

c442a5ad ^
029a3bdf ^
5e080ed4 ^
363685b8 ^


134dad7c ^
be52aad2 ^

0de5692b ^






2b250717 ^
0de5692b ^










6c96a437 ^
0de5692b ^
be52aad2 ^

36b927a6 ^
0de5692b ^




be52aad2 ^




7a84094a ^

be52aad2 ^

7a84094a ^
be52aad2 ^

7a84094a ^
be52aad2 ^

36b927a6 ^




7a84094a ^
36b927a6 ^







7a84094a ^








36b927a6 ^


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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597