Skip to content
Snippets Groups Projects
Commit 1bbd1a86 authored by Per Hedbor's avatar Per Hedbor
Browse files

For ease of debugging: Have the "token" field in node_s be enum Pike_codes

This helps a lot when developing in the compiler.

Currently only happens when PIKE_DEBUG is enabled.
parent c28076f8
No related branches found
No related tags found
No related merge requests found
...@@ -106,6 +106,10 @@ union node_data ...@@ -106,6 +106,10 @@ union node_data
} integer; } integer;
}; };
#ifdef PIKE_DEBUG
#include "opcodes.h"
#endif
struct node_s struct node_s
{ {
unsigned INT32 refs; unsigned INT32 refs;
...@@ -118,7 +122,11 @@ struct node_s ...@@ -118,7 +122,11 @@ struct node_s
unsigned INT16 tree_info; unsigned INT16 tree_info;
unsigned INT16 pad; unsigned INT16 pad;
/* The stuff from this point on is hashed. */ /* The stuff from this point on is hashed. */
#ifdef PIKE_DEBUG
enum Pike_opcodes token : 16;
#else
unsigned INT16 token; unsigned INT16 token;
#endif
union node_data u; union node_data u;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment