blob: 3a7b0b0e602a0c2d79a27b4fea817375e368d144 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
:(scenario "trace")
recipe main [
trace [foo], [this is a trace in mu]
]
+foo: this is a trace in mu
:(before "End Globals")
const int TRACE = 32;
:(before "End Primitive Recipe Numbers")
Recipe_number["trace"] = TRACE;
assert(Next_recipe_number == TRACE);
Next_recipe_number++;
:(before "End Primitive Recipe Implementations")
case TRACE: {
assert(isa_literal(instructions[pc].ingredients[0]));
string label = instructions[pc].ingredients[0].name;
assert(isa_literal(instructions[pc].ingredients[1]));
string message = instructions[pc].ingredients[1].name;
trace(label) << message;
break;
}
|