about summary refs log tree commit diff stats
path: root/cpp/018record
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-03-20 21:12:51 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-03-20 21:16:12 -0700
commita3d9828c190c86d9984a8e788f16dc10dfb95afa (patch)
tree3632b7319a88da648a99d595b38078ffd8d529b4 /cpp/018record
parentad68bbce689969c4b0483a148c2a5260e9256fa7 (diff)
downloadmu-a3d9828c190c86d9984a8e788f16dc10dfb95afa.tar.gz
961 - done converting names?
I'm making two changes to how I compute field offsets:
  a) I just replace offset names up front, before I even manage field
  names. I don't bother disallowing x:integer and x:offset in the same
  function. Let's see if that leads us astray. Certainly saves code.

  b) I don't bother canonizing the first arg of a get since we know it
  has to have a type that is some number of 'address' followed by a
  record. Just assume that we have the right number of 'deref's.
Diffstat (limited to 'cpp/018record')
-rw-r--r--cpp/018record2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpp/018record b/cpp/018record
index 3a9b3c37..062f35cf 100644
--- a/cpp/018record
+++ b/cpp/018record
@@ -4,6 +4,7 @@
 int point = Type_number["point"] = Next_type_number++;
 Type[point].size = 2;
 Type[point].is_record = true;
+Type[point].name = "point";
 vector<type_number> i;
 i.push_back(integer);
 Type[point].elements.push_back(i);
@@ -77,6 +78,7 @@ recipe main [
 int point_integer = Type_number["point-integer"] = Next_type_number++;
 Type[point_integer].size = 2;
 Type[point_integer].is_record = true;
+Type[point_integer].name = "point-integer";
 vector<type_number> p2;
 p2.push_back(point);
 Type[point_integer].elements.push_back(p2);