From 947f06fb5569007a5a3c444683794427c72cef52 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 26 Feb 2016 21:30:43 -0800 Subject: 2717 - bugfix for dilated reagents Make sure static arrays can take compound types. --- 032array.cc | 4 ++++ 054dilated_reagent.cc | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/032array.cc b/032array.cc index 46681654..9d5dbda6 100644 --- a/032array.cc +++ b/032array.cc @@ -226,6 +226,10 @@ case INDEX: { :(code) type_tree* array_element(const type_tree* type) { + if (type->right->left) { + assert(!type->right->left->left); + return type->right->left; + } return type->right; } diff --git a/054dilated_reagent.cc b/054dilated_reagent.cc index d90ed4df..16698152 100644 --- a/054dilated_reagent.cc +++ b/054dilated_reagent.cc @@ -30,6 +30,17 @@ recipe main [ ] $error: 0 +:(scenario dilated_reagent_in_static array) +recipe main [ + {1: (array (address shared number) 3)} <- create-array + 5:address:address:shared:number <- index-address {1: (array (address shared number) 3)}, 0 + *5:address:address:shared:number <- new number:type + **5:address:address:shared:number <- copy 34 + 6:number <- copy **5:address:address:shared:number +] ++run: creating array of size 4 ++mem: storing 34 in location 6 + //: First augment next_word to group balanced brackets together. :(before "End next_word Special-cases") -- cgit 1.4.1-2-gfad0 anti/profani-tty/tree/configure-plugins?id=9cfd17821c427ae2c129842b5f626fbdb3a73a67'>tree commit diff stats
path: root/configure-plugins
blob: af4db3d5a67796f421de59c3d5117b6a10382411 (plain) (blame)
1
2
3
4