depot/users/tazjin/rlox/src/bytecode/vm.rs, branch refs/r/4276 monorepo for the virus lounge http://code.tvl.fyi/depot/atom?h=refs%2Fr%2F4276 2022-02-07T16:58:59+00:00 fix(users/tazjin): rustfmt code with non-default settings 2022-02-07T16:58:59+00:00 Vincent Ambo mail@tazj.in 2022-02-07T16:29:52+00:00 urn:sha1:0d0b43ed8819e66a0888eb6d1d1f47b171ae62e0 rustfmt only sometimes detects path-based nested config files (probably some kind of race?), so my users folder uses a separate formatting check for rustfmt to avoid flaky CI. Enough flakes around already ... Change-Id: Ifd862f9974f071b3a256643dd8e56c019116156a Reviewed-on: https://cl.tvl.fyi/c/depot/+/5242 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI feat(tazjin/rlox): Implement else clauses 2021-10-22T09:42:38+00:00 Vincent Ambo mail@tazj.in 2021-10-21T09:18:49+00:00 urn:sha1:33e71ba97fd3df598daa217ec36a48334136dcfc Change-Id: I0bc2333c0b4dd3e2e584a90d0d15b28c48130f03 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3740 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> feat(tazjin/rlox): Implement simple conditionals 2021-10-22T09:42:38+00:00 Vincent Ambo mail@tazj.in 2021-10-21T09:00:33+00:00 urn:sha1:670662a360447509940dac417195cf419d7f42c5 ... basically just optional blocks (no else). Change-Id: If091c6b8fdeb6c13a5f3dd284d0a9a87f9f4228d Reviewed-on: https://cl.tvl.fyi/c/depot/+/3739 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> refactor(tazjin/rlox): Introduce newtypes for various indices 2021-10-20T12:50:36+00:00 Vincent Ambo mail@tazj.in 2021-10-19T20:59:48+00:00 urn:sha1:050a2b473c48b87994e56ade381afbfc2bca4de3 Since this code is essentially a fairly plain translation from C, it is a bit confusing to deal with the original untyped code. This is an attempt to try and clean some of it up. Change-Id: Icd21f531932e1a811c0d6dbf2e9acba61ca9c45d Reviewed-on: https://cl.tvl.fyi/c/depot/+/3734 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> feat(tazjin/rlox): Support local variables 2021-10-19T12:58:43+00:00 Vincent Ambo mail@tazj.in 2021-10-03T11:20:44+00:00 urn:sha1:c318f42c119f3dd13bf0cfd7917bfdd41fea7085 WIP Change-Id: I78fbc885faaac165c380cbd9aa98b4b64a9b8274 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3685 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> feat(tazjin/rlox): Global variable assignment 2021-10-19T12:58:43+00:00 Vincent Ambo mail@tazj.in 2021-10-02T12:55:58+00:00 urn:sha1:ad7e591c8046d6e179476192ef9928d5fae78422 Needed for example code compatibility. Change-Id: Id83210eaaad7dcfef5aa238dd3a7ec159f6935e9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3684 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> feat(tazjin/rlox): Implement global variable access 2021-03-06T11:52:00+00:00 Vincent Ambo mail@tazj.in 2021-03-05T20:35:02+00:00 urn:sha1:4162186a1963b0dcf3dc47946a1cd8ad81467ac4 This also includes a fix for an issue where the identifiers of variables were pushed onto the stack, which is incorrect. Change-Id: Id89b388268efad295f29978d767aa4b33c4ded14 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2594 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI feat(tazjin/rlox): Implement global variable definition 2021-03-06T11:52:00+00:00 Vincent Ambo mail@tazj.in 2021-03-05T15:48:07+00:00 urn:sha1:29b2a547055ba1adaf3f0d79055b7d7657eb3a5e identifier_str might look a bit overengineered, but we want to reuse this bit of code and it needs a reference to the token from which to pick the identifier. The problem with this is that the token would be owned by self, but the function needs to mutate (the interner), so this implementation is the most straightforward way of acquiring and working with an immutable reference to the token before interning the identifier. Change-Id: I618ce8f789cb59b3a9c5b79a13111ea6d00b2424 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2592 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI feat(tazjin/rlox): Implement expression statements 2021-03-03T10:51:05+00:00 Vincent Ambo mail@tazj.in 2021-03-02T20:26:02+00:00 urn:sha1:ed3fce2b19fa0d28054382093b019967a9a16177 These aren't particularly useful without side effects, but one step at a time. This diverges slightly from the book, in that OpPop retains the last value it "forgot" from the stack in a special field on the interpreter. This makes it possible to return values from expression statements, which helps in cases where Lox is embedded as a scripting language (please don't do this ever) or in tests. Change-Id: Ided0bc04c6e80ddb23ba4693d61ac9e08b002d58 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2584 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI feat(tazjin/rlox): Add support for print statement 2021-03-03T10:50:39+00:00 Vincent Ambo mail@tazj.in 2021-03-02T20:15:08+00:00 urn:sha1:2cd77ea26d76b20ff820f1ebe5e77f1360f5d1f5 Change-Id: Ic3e7e722325c8784b848c0bcd573c2e51e123c40 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2583 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<feed xmlns="http://www.w3.org/2005/Atom">
<title>depot/users/tazjin/rlox/src/bytecode/vm.rs, branch refs/r/4276</title>
<subtitle>monorepo for the virus lounge</subtitle>
<id>http://code.tvl.fyi/depot/atom?h=refs%2Fr%2F4276</id>
<link rel="self" href="http://code.tvl.fyi/depot/atom?h=refs%2Fr%2F4276"/>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/"/>
<updated>2022-02-07T16:58:59+00:00</updated>
<entry>
<title>fix(users/tazjin): rustfmt code with non-default settings</title>
<updated>2022-02-07T16:58:59+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>mail@tazj.in</email>
</author>
<published>2022-02-07T16:29:52+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=0d0b43ed8819e66a0888eb6d1d1f47b171ae62e0"/>
<id>urn:sha1:0d0b43ed8819e66a0888eb6d1d1f47b171ae62e0</id>
<content type="text"> rustfmt only sometimes detects path-based nested config files (probably some kind of race?), so my users folder uses a separate formatting check for rustfmt to avoid flaky CI. Enough flakes around already ... Change-Id: Ifd862f9974f071b3a256643dd8e56c019116156a Reviewed-on: https://cl.tvl.fyi/c/depot/+/5242 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI </content>
</entry>
<entry>
<title>feat(tazjin/rlox): Implement else clauses</title>
<updated>2021-10-22T09:42:38+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>mail@tazj.in</email>
</author>
<published>2021-10-21T09:18:49+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=33e71ba97fd3df598daa217ec36a48334136dcfc"/>
<id>urn:sha1:33e71ba97fd3df598daa217ec36a48334136dcfc</id>
<content type="text"> Change-Id: I0bc2333c0b4dd3e2e584a90d0d15b28c48130f03 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3740 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> </content>
</entry>
<entry>
<title>feat(tazjin/rlox): Implement simple conditionals</title>
<updated>2021-10-22T09:42:38+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>mail@tazj.in</email>
</author>
<published>2021-10-21T09:00:33+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=670662a360447509940dac417195cf419d7f42c5"/>
<id>urn:sha1:670662a360447509940dac417195cf419d7f42c5</id>
<content type="text"> ... basically just optional blocks (no else). Change-Id: If091c6b8fdeb6c13a5f3dd284d0a9a87f9f4228d Reviewed-on: https://cl.tvl.fyi/c/depot/+/3739 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> </content>
</entry>
<entry>
<title>refactor(tazjin/rlox): Introduce newtypes for various indices</title>
<updated>2021-10-20T12:50:36+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>mail@tazj.in</email>
</author>
<published>2021-10-19T20:59:48+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=050a2b473c48b87994e56ade381afbfc2bca4de3"/>
<id>urn:sha1:050a2b473c48b87994e56ade381afbfc2bca4de3</id>
<content type="text"> Since this code is essentially a fairly plain translation from C, it is a bit confusing to deal with the original untyped code. This is an attempt to try and clean some of it up. Change-Id: Icd21f531932e1a811c0d6dbf2e9acba61ca9c45d Reviewed-on: https://cl.tvl.fyi/c/depot/+/3734 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> </content>
</entry>
<entry>
<title>feat(tazjin/rlox): Support local variables</title>
<updated>2021-10-19T12:58:43+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>mail@tazj.in</email>
</author>
<published>2021-10-03T11:20:44+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=c318f42c119f3dd13bf0cfd7917bfdd41fea7085"/>
<id>urn:sha1:c318f42c119f3dd13bf0cfd7917bfdd41fea7085</id>
<content type="text"> WIP Change-Id: I78fbc885faaac165c380cbd9aa98b4b64a9b8274 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3685 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> </content>
</entry>
<entry>
<title>feat(tazjin/rlox): Global variable assignment</title>
<updated>2021-10-19T12:58:43+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>mail@tazj.in</email>
</author>
<published>2021-10-02T12:55:58+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=ad7e591c8046d6e179476192ef9928d5fae78422"/>
<id>urn:sha1:ad7e591c8046d6e179476192ef9928d5fae78422</id>
<content type="text"> Needed for example code compatibility. Change-Id: Id83210eaaad7dcfef5aa238dd3a7ec159f6935e9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3684 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> </content>
</entry>
<entry>
<title>feat(tazjin/rlox): Implement global variable access</title>
<updated>2021-03-06T11:52:00+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>mail@tazj.in</email>
</author>
<published>2021-03-05T20:35:02+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=4162186a1963b0dcf3dc47946a1cd8ad81467ac4"/>
<id>urn:sha1:4162186a1963b0dcf3dc47946a1cd8ad81467ac4</id>
<content type="text"> This also includes a fix for an issue where the identifiers of variables were pushed onto the stack, which is incorrect. Change-Id: Id89b388268efad295f29978d767aa4b33c4ded14 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2594 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI </content>
</entry>
<entry>
<title>feat(tazjin/rlox): Implement global variable definition</title>
<updated>2021-03-06T11:52:00+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>mail@tazj.in</email>
</author>
<published>2021-03-05T15:48:07+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=29b2a547055ba1adaf3f0d79055b7d7657eb3a5e"/>
<id>urn:sha1:29b2a547055ba1adaf3f0d79055b7d7657eb3a5e</id>
<content type="text"> identifier_str might look a bit overengineered, but we want to reuse this bit of code and it needs a reference to the token from which to pick the identifier. The problem with this is that the token would be owned by self, but the function needs to mutate (the interner), so this implementation is the most straightforward way of acquiring and working with an immutable reference to the token before interning the identifier. Change-Id: I618ce8f789cb59b3a9c5b79a13111ea6d00b2424 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2592 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI </content>
</entry>
<entry>
<title>feat(tazjin/rlox): Implement expression statements</title>
<updated>2021-03-03T10:51:05+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>mail@tazj.in</email>
</author>
<published>2021-03-02T20:26:02+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=ed3fce2b19fa0d28054382093b019967a9a16177"/>
<id>urn:sha1:ed3fce2b19fa0d28054382093b019967a9a16177</id>
<content type="text"> These aren't particularly useful without side effects, but one step at a time. This diverges slightly from the book, in that OpPop retains the last value it "forgot" from the stack in a special field on the interpreter. This makes it possible to return values from expression statements, which helps in cases where Lox is embedded as a scripting language (please don't do this ever) or in tests. Change-Id: Ided0bc04c6e80ddb23ba4693d61ac9e08b002d58 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2584 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI </content>
</entry>
<entry>
<title>feat(tazjin/rlox): Add support for print statement</title>
<updated>2021-03-03T10:50:39+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>mail@tazj.in</email>
</author>
<published>2021-03-02T20:15:08+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=2cd77ea26d76b20ff820f1ebe5e77f1360f5d1f5"/>
<id>urn:sha1:2cd77ea26d76b20ff820f1ebe5e77f1360f5d1f5</id>
<content type="text"> Change-Id: Ic3e7e722325c8784b848c0bcd573c2e51e123c40 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2583 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI </content>
</entry>
</feed>