shithub: rgbds

Download patch

ref: 9ce8a9f5f09d126a7885c500df108cf98b157e57
parent: cc59730c5be4ed9efc164238fb58e15108a5b2ff
author: ISSOtm <[email protected]>
date: Mon Jan 20 10:20:09 EST 2020

Add comments to RPN expr struct

--- a/include/asm/rpn.h
+++ b/include/asm/rpn.h
@@ -17,13 +17,14 @@
 #define MAXRPNLEN 1048576
 
 struct Expression {
-	int32_t  nVal;
-	uint8_t  *tRPN;
-	uint32_t nRPNCapacity;
-	uint32_t nRPNLength;
-	uint32_t nRPNPatchSize;
-	uint32_t nRPNOut;
-	bool isKnown;
+	bool     isKnown;       // Whether the expression's value is known
+	int32_t  nVal;          // If the expression's value is known, it's here
+	uint8_t  *tRPN;         // Array of bytes serializing the RPN expression
+	uint32_t nRPNCapacity;  // Size of the `tRPN` buffer
+	uint32_t nRPNLength;    // Used size of the `tRPN` buffer
+	uint32_t nRPNPatchSize; // Size the expression will take in the obj file
+	// FIXME: does this need to be part of the struct?
+	uint32_t nRPNOut;       // How many bytes have been written
 };
 
 /* FIXME: Should be defined in `asmy.h`, but impossible with POSIX Yacc */