From 201458e3bd2f1d79a0ea0b853552e9df267e92b1 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 26 Dec 2016 20:44:10 -0800 Subject: 3713 - cross-link calls with definitions in html --- html/039location_array.cc.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'html/039location_array.cc.html') diff --git a/html/039location_array.cc.html b/html/039location_array.cc.html index 07ba21a3..a3d2a113 100644 --- a/html/039location_array.cc.html +++ b/html/039location_array.cc.html @@ -57,18 +57,18 @@ if ('onhashchange' in window) { 1 :(before "End Primitive Recipe Declarations") 2 TO_LOCATION_ARRAY, 3 :(before "End Primitive Recipe Numbers") - 4 put(Recipe_ordinal, "to-location-array", TO_LOCATION_ARRAY); + 4 put(Recipe_ordinal, "to-location-array", TO_LOCATION_ARRAY); 5 :(before "End Primitive Recipe Checks") 6 case TO_LOCATION_ARRAY: { 7 const recipe& caller = get(Recipe, r); 8 if (!is_address_of_array_of_numbers(inst.products.at(0))) { - 9 raise << maybe(caller.name) << "product of 'to-location-array' has incorrect type: '" << inst.original_string << "'\n" << end(); + 9 raise << maybe(caller.name) << "product of 'to-location-array' has incorrect type: '" << inst.original_string << "'\n" << end(); 10 break; 11 } 12 break; 13 } 14 :(code) -15 bool is_address_of_array_of_numbers(reagent/*copy*/ x) { +15 bool is_address_of_array_of_numbers(reagent/*copy*/ x) { 16 canonize_type(x); 17 if (!is_compound_type_starting_with(x.type, "address")) return false; 18 drop_from_type(x, "address"); @@ -76,7 +76,7 @@ if ('onhashchange' in window) { 20 drop_from_type(x, "array"); 21 return x.type && x.type->atom && x.type->value == get(Type_ordinal, "number"); 22 } -23 bool is_compound_type_starting_with(const type_tree* type, const string& expected_name) { +23 bool is_compound_type_starting_with(const type_tree* type, const string& expected_name) { 24 if (!type) return false; 25 if (type->atom) return false; 26 if (!type->left->atom) return false; @@ -85,19 +85,19 @@ if ('onhashchange' in window) { 29 30 :(before "End Primitive Recipe Implementations") 31 case TO_LOCATION_ARRAY: { -32 int array_size = SIZE(ingredients.at(0)); +32 int array_size = SIZE(ingredients.at(0)); 33 int allocation_size = array_size + /*refcount and length*/2; 34 ensure_space(allocation_size); 35 const int result = Current_routine->alloc; 36 products.resize(1); 37 products.at(0).push_back(result); 38 // initialize array refcount -39 put(Memory, result, 0); +39 put(Memory, result, 0); 40 // initialize array length -41 put(Memory, result+1, array_size); +41 put(Memory, result+1, array_size); 42 // now copy over data 43 for (int i = 0; i < array_size; ++i) -44 put(Memory, result+2+i, ingredients.at(0).at(i)); +44 put(Memory, result+2+i, ingredients.at(0).at(i)); 45 break; 46 } -- cgit 1.4.1-2-gfad0