idlc 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/idlc/ast.rb +3 -18
- data/lib/idlc/interfaces.rb +5 -1
- data/lib/idlc/type.rb +2 -2
- data/lib/idlc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c6a598289cd691aa5a1028035e20c0e9f554200e51ce52ebb7967bd3de7d41f3
|
|
4
|
+
data.tar.gz: f652abe793498a4bbdabdef2c671378de7947e1cb42a3560f43fbbef1234133f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2cca5f966b9d32509cc2227fdf942ad24524cb13a0f65eafa9a3ef26e05d2e42c6cbd8445bdbbc72ba4243939bf767a448f47488654f82f6635f72cc98e140d2
|
|
7
|
+
data.tar.gz: 5504f53b32b22d1e16fb6fcad86b69ffce33dd11a95f2267d43637633dd1b8d475d7c29923018feeea462a2f447f5aae9590431bf06194a27626a39753531a43
|
data/lib/idlc/ast.rb
CHANGED
|
@@ -4799,27 +4799,12 @@ module Idl
|
|
|
4799
4799
|
# @return [Integer] the number of bits needed to represent value in two's complement
|
|
4800
4800
|
def bits_needed(value, signed)
|
|
4801
4801
|
if signed
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
1
|
|
4805
|
-
when 1
|
|
4806
|
-
2
|
|
4807
|
-
else
|
|
4808
|
-
if value > 0
|
|
4809
|
-
# need bit_legnth plus a sign bit
|
|
4810
|
-
bits = value.bit_length + 1
|
|
4811
|
-
else
|
|
4812
|
-
# need bit_length plus a sign bit, unless value is a power of 2
|
|
4813
|
-
if (value.abs & (value.abs - 1)) == 0
|
|
4814
|
-
value.bit_length
|
|
4815
|
-
else
|
|
4816
|
-
value.bit_length + 1
|
|
4817
|
-
end
|
|
4818
|
-
end
|
|
4819
|
-
end
|
|
4802
|
+
# add sign bit
|
|
4803
|
+
value.bit_length + 1
|
|
4820
4804
|
else
|
|
4821
4805
|
internal_error "unsigned value is negative" if value < 0
|
|
4822
4806
|
|
|
4807
|
+
# 0 needs a single bit; `0.bit_length` returns 0.
|
|
4823
4808
|
value == 0 ? 1 : value.bit_length
|
|
4824
4809
|
end
|
|
4825
4810
|
end
|
data/lib/idlc/interfaces.rb
CHANGED
|
@@ -79,6 +79,10 @@ module Idl
|
|
|
79
79
|
sig { abstract.returns(T::Boolean) }
|
|
80
80
|
def defined_in_base64?; end
|
|
81
81
|
|
|
82
|
+
# whether or not this field is defined in the given base
|
|
83
|
+
sig { abstract.params(xlen: Integer).returns(T::Boolean) }
|
|
84
|
+
def defined_in_base?(xlen); end
|
|
85
|
+
|
|
82
86
|
# whether or not this field is defined only in RV64
|
|
83
87
|
sig { abstract.returns(T::Boolean) }
|
|
84
88
|
def base64_only?; end
|
|
@@ -90,7 +94,7 @@ module Idl
|
|
|
90
94
|
# returns the location of the field in the CSR.
|
|
91
95
|
# base is required when the field moves locations between RV32 and RV64
|
|
92
96
|
sig { abstract.params(base: T.nilable(Integer)).returns(T::Range[Integer]) }
|
|
93
|
-
def location(base); end
|
|
97
|
+
def location(base = nil); end
|
|
94
98
|
|
|
95
99
|
sig { abstract.params(base: T.nilable(Integer)).returns(Integer) }
|
|
96
100
|
def width(base); end
|
data/lib/idlc/type.rb
CHANGED
data/lib/idlc/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: idlc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Derek Hower
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-
|
|
10
|
+
date: 2026-08-15 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: activesupport
|