Skip to content

Commit 2824579

Browse files
committed
Update cpp-jsonnet
1 parent f3873a7 commit 2824579

11 files changed

+23072
-13827
lines changed

astgen/stdast.go

Lines changed: 23043 additions & 13798 deletions
Large diffs are not rendered by default.

builtins.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,8 +867,8 @@ func liftBitwise(f func(int64, int64) int64) func(*interpreter, traceElement, va
867867
}
868868

869869
// TODO(sbarzowski) negative shifts
870-
var builtinShiftL = liftBitwise(func(x, y int64) int64 { return x << uint(y) })
871-
var builtinShiftR = liftBitwise(func(x, y int64) int64 { return x >> uint(y) })
870+
var builtinShiftL = liftBitwise(func(x, y int64) int64 { return x << uint(y%64) })
871+
var builtinShiftR = liftBitwise(func(x, y int64) int64 { return x >> uint(y%64) })
872872
var builtinBitwiseAnd = liftBitwise(func(x, y int64) int64 { return x & y })
873873
var builtinBitwiseOr = liftBitwise(func(x, y int64) int64 { return x | y })
874874
var builtinBitwiseXor = liftBitwise(func(x, y int64) int64 { return x ^ y })

testdata/assert_equal4.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
RUNTIME ERROR: Assertion failed. {"x": 1} != {"x": 2}
22
-------------------------------------------------
3-
<std>:792:7-50 function <anonymous>
3+
<std>:807:7-50 function <anonymous>
44

55
error 'Assertion failed. ' + a + ' != ' + b,
66

testdata/assert_equal5.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ RUNTIME ERROR: Assertion failed.
22
!=
33

44
-------------------------------------------------
5-
<std>:792:7-50 function <anonymous>
5+
<std>:807:7-50 function <anonymous>
66

77
error 'Assertion failed. ' + a + ' != ' + b,
88

testdata/assert_equal6.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
RUNTIME ERROR: Assertion failed.  !=
22
-------------------------------------------------
3-
<std>:792:7-50 function <anonymous>
3+
<std>:807:7-50 function <anonymous>
44

55
error 'Assertion failed. ' + a + ' != ' + b,
66

testdata/percent_bad2.golden

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
RUNTIME ERROR: Too many values to format: 1, expected 0
22
-------------------------------------------------
3-
<std>:662:11-86 function <format_codes_arr>
3+
<std>:677:11-86 function <format_codes_arr>
44

55
error ('Too many values to format: ' + std.length(arr) + ', expected ' + j)
66

77
-------------------------------------------------
8-
<std>:668:11-59 function <format_codes_arr>
8+
<std>:683:11-59 function <format_codes_arr>
99

1010
format_codes_arr(codes, arr, i + 1, j, v + code) tailstrict
1111

1212
-------------------------------------------------
13-
<std>:759:7-48 function <anonymous>
13+
<std>:774:7-48 function <anonymous>
1414

1515
format_codes_arr(codes, [vals], 0, 0, ''),
1616

testdata/percent_format_str4.golden

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
RUNTIME ERROR: Too many values to format: 2, expected 1
22
-------------------------------------------------
3-
<std>:662:11-86 function <format_codes_arr>
3+
<std>:677:11-86 function <format_codes_arr>
44

55
error ('Too many values to format: ' + std.length(arr) + ', expected ' + j)
66

77
-------------------------------------------------
8-
<std>:668:11-59 function <format_codes_arr>
8+
<std>:683:11-59 function <format_codes_arr>
99

1010
format_codes_arr(codes, arr, i + 1, j, v + code) tailstrict
1111

1212
-------------------------------------------------
13-
<std>:755:7-46 function <anonymous>
13+
<std>:770:7-46 function <anonymous>
1414

1515
format_codes_arr(codes, vals, 0, 0, '')
1616

testdata/percent_format_str5.golden

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
RUNTIME ERROR: Not enough values to format: 1, expected more than 1
22
-------------------------------------------------
3-
<std>:695:15-103 thunk <val> from <function <format_codes_arr>>
3+
<std>:710:15-103 thunk <val> from <function <format_codes_arr>>
44

55
error ('Not enough values to format: ' + std.length(arr) + ', expected more than ' + j2);
66

77
-------------------------------------------------
8-
<std>:700:27-30 thunk from <thunk <s> from <function <format_codes_arr>>>
8+
<std>:715:27-30 thunk from <thunk <s> from <function <format_codes_arr>>>
99

1010
format_code(val, code, tmp.fw, tmp2.prec, j2);
1111

1212
-------------------------------------------------
13-
<std>:570:22-25 thunk from <function <format_code>>
13+
<std>:585:22-25 thunk from <function <format_code>>
1414

1515
std.toString(val)
1616

1717
-------------------------------------------------
18-
<std>:570:9-26 function <format_code>
18+
<std>:585:9-26 function <format_code>
1919

2020
std.toString(val)
2121

2222
-------------------------------------------------
2323
... (skipped 10 frames)
2424
-------------------------------------------------
25-
<std>:711:11-64 function <format_codes_arr>
25+
<std>:726:11-64 function <format_codes_arr>
2626

2727
format_codes_arr(codes, arr, i + 1, j3, v + s_padded) tailstrict;
2828

2929
-------------------------------------------------
30-
<std>:755:7-46 function <anonymous>
30+
<std>:770:7-46 function <anonymous>
3131

3232
format_codes_arr(codes, vals, 0, 0, '')
3333

testdata/percent_format_str6.golden

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
RUNTIME ERROR: Not enough values to format: 1, expected more than 1
22
-------------------------------------------------
3-
<std>:695:15-103 thunk <val> from <function <format_codes_arr>>
3+
<std>:710:15-103 thunk <val> from <function <format_codes_arr>>
44

55
error ('Not enough values to format: ' + std.length(arr) + ', expected more than ' + j2);
66

77
-------------------------------------------------
8-
<std>:700:27-30 thunk from <thunk <s> from <function <format_codes_arr>>>
8+
<std>:715:27-30 thunk from <thunk <s> from <function <format_codes_arr>>>
99

1010
format_code(val, code, tmp.fw, tmp2.prec, j2);
1111

1212
-------------------------------------------------
13-
<std>:570:22-25 thunk from <function <format_code>>
13+
<std>:585:22-25 thunk from <function <format_code>>
1414

1515
std.toString(val)
1616

1717
-------------------------------------------------
18-
<std>:570:9-26 function <format_code>
18+
<std>:585:9-26 function <format_code>
1919

2020
std.toString(val)
2121

2222
-------------------------------------------------
2323
... (skipped 10 frames)
2424
-------------------------------------------------
25-
<std>:711:11-64 function <format_codes_arr>
25+
<std>:726:11-64 function <format_codes_arr>
2626

2727
format_codes_arr(codes, arr, i + 1, j3, v + s_padded) tailstrict;
2828

2929
-------------------------------------------------
30-
<std>:759:7-48 function <anonymous>
30+
<std>:774:7-48 function <anonymous>
3131

3232
format_codes_arr(codes, [vals], 0, 0, ''),
3333

0 commit comments

Comments
 (0)