Our great sponsors
-
I poked around the code a bit, and it looks like the LAssembler (via OperationStatement in this case or another one of the LStatement classes) registers all variables encountered in the code, which happens after parsing but before the execution loop begins, I think. It doesn't assign any value to it (only handles constants, replacing them with hidden variables instead), and the value field of BVar is just an Object, so it defaults to null I believe. The LExecutor then loads the variables from the LAssembler, and since the value isn't a Number, it sets isobj to true. Later, when an instruction is executed and requires a numeric value (as op does in this case), it calls the num method, which returns zero if the value is an object and null. And then the result of the operation becomes a proper double.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.