about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--012transform.cc6
-rw-r--r--013update_operation.cc5
-rw-r--r--021check_instruction.cc2
-rw-r--r--030container.cc6
-rw-r--r--040brace.cc5
-rw-r--r--041jump_target.cc4
-rw-r--r--042name.cc4
-rw-r--r--043new.cc2
-rw-r--r--046closure_name.cc4
-rw-r--r--048check_type_by_name.cc4
-rw-r--r--052tangle.cc6
-rw-r--r--056recipe_header.cc10
-rw-r--r--057static_dispatch.cc4
13 files changed, 32 insertions, 30 deletions
diff --git a/012transform.cc b/012transform.cc
index 4152339c..facbea38 100644
--- a/012transform.cc
+++ b/012transform.cc
@@ -14,6 +14,10 @@ typedef void (*transform_fn)(recipe_ordinal);
 :(before "End Globals")
 vector<transform_fn> Transform;
 
+:(after "int main")
+  // Begin Transforms
+  // End Transforms
+
 :(code)
 void transform_all() {
   trace(9990, "transform") << "=== transform_all()" << end();
@@ -29,7 +33,7 @@ void transform_all() {
     }
   }
   parse_int_reagents();  // do this after all other transforms have run
-  // End Transform
+  // End Transform All
 }
 
 void parse_int_reagents() {
diff --git a/013update_operation.cc b/013update_operation.cc
index edfda882..22a8f538 100644
--- a/013update_operation.cc
+++ b/013update_operation.cc
@@ -1,9 +1,8 @@
 //: Once all code is loaded, save operation ids of instructions and check that
 //: nothing's undefined.
 
-:(after "int main")
-  // do this before any other transforms
-  Transform.push_back(update_instruction_operations);
+:(after "Begin Transforms")
+Transform.push_back(update_instruction_operations);
 
 :(code)
 void update_instruction_operations(recipe_ordinal r) {
diff --git a/021check_instruction.cc b/021check_instruction.cc
index 0ceba623..d0efd2a2 100644
--- a/021check_instruction.cc
+++ b/021check_instruction.cc
@@ -9,7 +9,7 @@
 //: transform it in a separate layer or set of layers.
 
 :(after "Transform.push_back(update_instruction_operations)")
-  Transform.push_back(check_instruction);
+Transform.push_back(check_instruction);
 
 :(code)
 void check_instruction(const recipe_ordinal r) {
diff --git a/030container.cc b/030container.cc
index 9618dd2a..05b3a6e9 100644
--- a/030container.cc
+++ b/030container.cc
@@ -510,8 +510,8 @@ container bar [
 -error: unknown type: bar
 $error: 0
 
-:(after "int main")
-  Transform.push_back(check_invalid_types);
+:(after "Begin Transforms")
+Transform.push_back(check_invalid_types);
 
 :(code)
 void check_invalid_types(const recipe_ordinal r) {
@@ -556,7 +556,7 @@ container foo [
 +parse: element name: y
 +parse: type: 1
 
-:(before "End Transform")
+:(before "End Transform All")
 check_container_field_types();
 
 :(code)
diff --git a/040brace.cc b/040brace.cc
index c3c74ad9..fb6698b5 100644
--- a/040brace.cc
+++ b/040brace.cc
@@ -31,9 +31,8 @@ recipe main [
 +transform: jump 1:offset
 +transform: copy ...
 
-//: one-time setup
-:(after "int main")
-  Transform.push_back(transform_braces);
+:(after "Begin Transforms")
+Transform.push_back(transform_braces);
 
 :(code)
 void transform_braces(const recipe_ordinal r) {
diff --git a/041jump_target.cc b/041jump_target.cc
index 1f0e2212..56a2cbce 100644
--- a/041jump_target.cc
+++ b/041jump_target.cc
@@ -18,8 +18,8 @@ recipe main [
 :(before "End Mu Types Initialization")
 Type_ordinal["label"] = 0;
 
-:(after "int main")
-  Transform.push_back(transform_labels);
+:(after "Begin Transforms")
+Transform.push_back(transform_labels);
 
 :(code)
 void transform_labels(const recipe_ordinal r) {
diff --git a/042name.cc b/042name.cc
index 6e56b2e3..0454e9dd 100644
--- a/042name.cc
+++ b/042name.cc
@@ -18,8 +18,8 @@ recipe main [
 +error: main: use before set: y
 # todo: detect conditional defines
 
-:(after "int main")
-  Transform.push_back(transform_names);
+:(after "Begin Transforms")
+Transform.push_back(transform_names);
 
 :(before "End Globals")
 map<recipe_ordinal, map<string, long long int> > Name;
diff --git a/043new.cc b/043new.cc
index 70cac35b..e1cf3e68 100644
--- a/043new.cc
+++ b/043new.cc
@@ -50,7 +50,7 @@ case NEW: {
 
 //:: translate 'new' to 'alloc' instructions that take a size instead of a type
 :(after "Transform.push_back(check_instruction)" following "Transform.push_back(check_invalid_types)")  // so that all types are defined
-  Transform.push_back(transform_new_to_allocate);
+Transform.push_back(transform_new_to_allocate);
 
 :(code)
 void transform_new_to_allocate(recipe_ordinal r) {
diff --git a/046closure_name.cc b/046closure_name.cc
index 6671d00b..d6197fce 100644
--- a/046closure_name.cc
+++ b/046closure_name.cc
@@ -35,8 +35,8 @@ recipe increment-counter [
 :(before "End Globals")
 map<recipe_ordinal, recipe_ordinal> Surrounding_space;
 
-:(after "int main")
-  Transform.push_back(collect_surrounding_spaces);
+:(after "Begin Transforms")
+Transform.push_back(collect_surrounding_spaces);
 
 :(code)
 void collect_surrounding_spaces(const recipe_ordinal r) {
diff --git a/048check_type_by_name.cc b/048check_type_by_name.cc
index 438e45c3..fb193d78 100644
--- a/048check_type_by_name.cc
+++ b/048check_type_by_name.cc
@@ -14,8 +14,8 @@ recipe main [
 ]
 +error: main: x used with multiple types
 
-:(after "int main")
-  Transform.push_back(check_types_by_name);
+:(after "Begin Transforms")
+Transform.push_back(check_types_by_name);
 
 :(code)
 void check_types_by_name(const recipe_ordinal r) {
diff --git a/052tangle.cc b/052tangle.cc
index 0eab6c5c..618dd981 100644
--- a/052tangle.cc
+++ b/052tangle.cc
@@ -54,8 +54,8 @@ else if (command == "after") {
 
 //: after all recipes are loaded, insert fragments at appropriate labels.
 
-:(after "int main")
-  Transform.push_back(insert_fragments);
+:(after "Begin Transforms")
+Transform.push_back(insert_fragments);
 
 //: We might need to perform multiple passes, in case inserted fragments
 //: include more labels that need further insertions. Track which labels we've
@@ -135,7 +135,7 @@ bool is_waypoint(string label) {
 //: complain about unapplied fragments
 :(before "End Globals")
 bool Transform_check_insert_fragments_Ran = false;
-:(before "End One-time Setup")
+:(before "End Transforms")
 Transform.push_back(check_insert_fragments);  // final transform
 :(code)
 void check_insert_fragments(unused recipe_ordinal) {
diff --git a/056recipe_header.cc b/056recipe_header.cc
index cad74e5d..a0a88640 100644
--- a/056recipe_header.cc
+++ b/056recipe_header.cc
@@ -101,8 +101,8 @@ recipe add2 x:number, y:number -> z:number [
 ]
 +error: add2: replied with the wrong type at 'reply z'
 
-:(before "End One-time Setup")
-  Transform.push_back(check_header_products);
+:(before "End Transforms")
+Transform.push_back(check_header_products);
 
 :(code)
 void check_header_products(const recipe_ordinal r) {
@@ -139,7 +139,7 @@ recipe add2 x:number, y:number -> z:number [
 +mem: storing 8 in location 1
 
 :(before "Transform.push_back(transform_names)")
-  Transform.push_back(deduce_types_from_header);
+Transform.push_back(deduce_types_from_header);
 
 :(code)
 void deduce_types_from_header(const recipe_ordinal r) {
@@ -225,8 +225,8 @@ recipe add2 x:number, y:number -> z:number [
 +transform: reply z:number
 +mem: storing 8 in location 1
 
-:(after "int main")
-  Transform.push_back(deduce_fallthrough_reply);
+:(after "Begin Transforms")
+Transform.push_back(deduce_fallthrough_reply);
 
 :(code)
 void deduce_fallthrough_reply(const recipe_ordinal r) {
diff --git a/057static_dispatch.cc b/057static_dispatch.cc
index 3a19714a..20bc82f8 100644
--- a/057static_dispatch.cc
+++ b/057static_dispatch.cc
@@ -102,8 +102,8 @@ recipe test a:number, b:number -> z:number [
 ]
 +mem: storing 2 in location 7
 
-:(after "int main")
-  Transform.push_back(resolve_ambiguous_calls);
+:(after "Begin Transforms")
+Transform.push_back(resolve_ambiguous_calls);
 
 :(code)
 void resolve_ambiguous_calls(recipe_ordinal r) {
' href='#n665'>665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983