[svn:parrot] r39007 - in trunk: . src/ops t/oo

pmichaud at svn.parrot.org pmichaud at svn.parrot.org
Thu May 21 04:04:44 UTC 2009


Author: pmichaud
Date: Thu May 21 04:04:31 2009
New Revision: 39007
URL: https://trac.parrot.org/parrot/changeset/39007

Log:
[pmc]: Add C<root_new> opcode to allow creating PMCs from foreign HLL classes

Added:
   trunk/t/oo/root_new.t   (contents, props changed)
      - copied, changed from r39006, trunk/t/oo/new.t
Modified:
   trunk/MANIFEST
   trunk/src/ops/ops.num
   trunk/src/ops/pmc.ops

Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST	Thu May 21 02:08:36 2009	(r39006)
+++ trunk/MANIFEST	Thu May 21 04:04:31 2009	(r39007)
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Sat May 16 04:18:37 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Thu May 21 03:56:48 2009 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -1256,11 +1256,11 @@
 src/extend.c                                                []
 src/gc/api.c                                                []
 src/gc/gc_malloc.c                                          []
+src/gc/gc_ms.c                                              []
 src/gc/gc_private.h                                         []
 src/gc/generational_ms.c                                    []
 src/gc/incremental_ms.c                                     []
 src/gc/mark_sweep.c                                         []
-src/gc/gc_ms.c                                              []
 src/gc/memory.c                                             []
 src/gc/pools.c                                              []
 src/gc/register.c                                           []
@@ -1752,6 +1752,7 @@
 t/oo/new.t                                                  [test]
 t/oo/ops.t                                                  [test]
 t/oo/proxy.t                                                [test]
+t/oo/root_new.t                                             [test]
 t/oo/subclass.t                                             [test]
 t/oo/vtableoverride.t                                       [test]
 t/op/00ff-dos.t                                             [test]

Modified: trunk/src/ops/ops.num
==============================================================================
--- trunk/src/ops/ops.num	Thu May 21 02:08:36 2009	(r39006)
+++ trunk/src/ops/ops.num	Thu May 21 04:04:31 2009	(r39007)
@@ -821,452 +821,458 @@
 new_p_pc_p                      797
 new_p_p_pc                      798
 new_p_pc_pc                     799
-typeof_s_p                      800
-typeof_p_p                      801
-get_repr_s_p                    802
-find_method_p_p_s               803
-find_method_p_p_sc              804
-defined_i_p                     805
-defined_i_p_ki                  806
-defined_i_p_kic                 807
-defined_i_p_k                   808
-defined_i_p_kc                  809
-exists_i_p_ki                   810
-exists_i_p_kic                  811
-exists_i_p_k                    812
-exists_i_p_kc                   813
-delete_p_k                      814
-delete_p_kc                     815
-delete_p_ki                     816
-delete_p_kic                    817
-elements_i_p                    818
-push_p_i                        819
-push_p_ic                       820
-push_p_n                        821
-push_p_nc                       822
-push_p_s                        823
-push_p_sc                       824
-push_p_p                        825
-pop_i_p                         826
-pop_n_p                         827
-pop_s_p                         828
-pop_p_p                         829
-unshift_p_i                     830
-unshift_p_ic                    831
-unshift_p_n                     832
-unshift_p_nc                    833
-unshift_p_s                     834
-unshift_p_sc                    835
-unshift_p_p                     836
-shift_i_p                       837
-shift_n_p                       838
-shift_s_p                       839
-shift_p_p                       840
-splice_p_p_i_i                  841
-splice_p_p_ic_i                 842
-splice_p_p_i_ic                 843
-splice_p_p_ic_ic                844
-setprop_p_s_p                   845
-setprop_p_sc_p                  846
-getprop_p_s_p                   847
-getprop_p_sc_p                  848
-delprop_p_s                     849
-delprop_p_sc                    850
-prophash_p_p                    851
-freeze_s_p                      852
-thaw_p_s                        853
-thaw_p_sc                       854
-add_multi_s_s_p                 855
-add_multi_sc_s_p                856
-add_multi_s_sc_p                857
-add_multi_sc_sc_p               858
-find_multi_p_s_s                859
-find_multi_p_sc_s               860
-find_multi_p_s_sc               861
-find_multi_p_sc_sc              862
-register_p                      863
-unregister_p                    864
-box_p_i                         865
-box_p_ic                        866
-box_p_n                         867
-box_p_nc                        868
-box_p_s                         869
-box_p_sc                        870
-iter_p_p                        871
-morph_p_p                       872
-morph_p_pc                      873
-clone_s_s                       874
-clone_s_sc                      875
-exchange_i_i                    876
-exchange_p_p                    877
-exchange_n_n                    878
-exchange_s_s                    879
-set_i_i                         880
-set_i_ic                        881
-set_i_n                         882
-set_i_nc                        883
-set_i_s                         884
-set_i_sc                        885
-set_n_n                         886
-set_n_nc                        887
-set_n_i                         888
-set_n_ic                        889
-set_n_s                         890
-set_n_sc                        891
-set_n_p                         892
-set_s_p                         893
-set_s_s                         894
-set_s_sc                        895
-set_s_i                         896
-set_s_ic                        897
-set_s_n                         898
-set_s_nc                        899
-set_p_pc                        900
-set_p_p                         901
-set_p_i                         902
-set_p_ic                        903
-set_p_n                         904
-set_p_nc                        905
-set_p_s                         906
-set_p_sc                        907
-set_i_p                         908
-assign_p_p                      909
-assign_p_i                      910
-assign_p_ic                     911
-assign_p_n                      912
-assign_p_nc                     913
-assign_p_s                      914
-assign_p_sc                     915
-assign_s_s                      916
-assign_s_sc                     917
-setref_p_p                      918
-deref_p_p                       919
-setp_ind_i_p                    920
-setp_ind_ic_p                   921
-setn_ind_i_n                    922
-setn_ind_ic_n                   923
-setn_ind_i_nc                   924
-setn_ind_ic_nc                  925
-sets_ind_i_s                    926
-sets_ind_ic_s                   927
-sets_ind_i_sc                   928
-sets_ind_ic_sc                  929
-seti_ind_i_i                    930
-seti_ind_ic_i                   931
-seti_ind_i_ic                   932
-seti_ind_ic_ic                  933
-set_p_ki_i                      934
-set_p_kic_i                     935
-set_p_ki_ic                     936
-set_p_kic_ic                    937
-set_p_ki_n                      938
-set_p_kic_n                     939
-set_p_ki_nc                     940
-set_p_kic_nc                    941
-set_p_ki_s                      942
-set_p_kic_s                     943
-set_p_ki_sc                     944
-set_p_kic_sc                    945
-set_p_ki_p                      946
-set_p_kic_p                     947
-set_i_p_ki                      948
-set_i_p_kic                     949
-set_n_p_ki                      950
-set_n_p_kic                     951
-set_s_p_ki                      952
-set_s_p_kic                     953
-set_p_p_ki                      954
-set_p_p_kic                     955
-set_p_k_i                       956
-set_p_kc_i                      957
-set_p_k_ic                      958
-set_p_kc_ic                     959
-set_p_k_n                       960
-set_p_kc_n                      961
-set_p_k_nc                      962
-set_p_kc_nc                     963
-set_p_k_s                       964
-set_p_kc_s                      965
-set_p_k_sc                      966
-set_p_kc_sc                     967
-set_p_k_p                       968
-set_p_kc_p                      969
-set_i_p_k                       970
-set_i_p_kc                      971
-set_n_p_k                       972
-set_n_p_kc                      973
-set_s_p_k                       974
-set_s_p_kc                      975
-set_p_p_k                       976
-set_p_p_kc                      977
-clone_p_p                       978
-clone_p_p_p                     979
-clone_p_p_pc                    980
-copy_p_p                        981
-null_s                          982
-null_i                          983
-null_p                          984
-null_n                          985
-cleari                          986
-clearn                          987
-clears                          988
-clearp                          989
-ord_i_s                         990
-ord_i_sc                        991
-ord_i_s_i                       992
-ord_i_sc_i                      993
-ord_i_s_ic                      994
-ord_i_sc_ic                     995
-chr_s_i                         996
-chr_s_ic                        997
-chopn_s_i                       998
-chopn_s_ic                      999
-chopn_s_s_i                    1000
-chopn_s_sc_i                   1001
-chopn_s_s_ic                   1002
-chopn_s_sc_ic                  1003
-concat_s_s                     1004
-concat_s_sc                    1005
-concat_p_p                     1006
-concat_p_s                     1007
-concat_p_sc                    1008
-concat_s_s_s                   1009
-concat_s_sc_s                  1010
-concat_s_s_sc                  1011
-concat_p_p_s                   1012
-concat_p_p_sc                  1013
-concat_p_p_p                   1014
-repeat_s_s_i                   1015
-repeat_s_sc_i                  1016
-repeat_s_s_ic                  1017
-repeat_s_sc_ic                 1018
-repeat_p_p_i                   1019
-repeat_p_p_ic                  1020
-repeat_p_p_p                   1021
-repeat_p_i                     1022
-repeat_p_ic                    1023
-repeat_p_p                     1024
-length_i_s                     1025
-length_i_sc                    1026
-bytelength_i_s                 1027
-bytelength_i_sc                1028
-pin_s                          1029
-unpin_s                        1030
-substr_s_s_i                   1031
-substr_s_sc_i                  1032
-substr_s_s_ic                  1033
-substr_s_sc_ic                 1034
-substr_s_s_i_i                 1035
-substr_s_sc_i_i                1036
-substr_s_s_ic_i                1037
-substr_s_sc_ic_i               1038
-substr_s_s_i_ic                1039
-substr_s_sc_i_ic               1040
-substr_s_s_ic_ic               1041
-substr_s_sc_ic_ic              1042
-substr_s_s_i_i_s               1043
-substr_s_s_ic_i_s              1044
-substr_s_s_i_ic_s              1045
-substr_s_s_ic_ic_s             1046
-substr_s_s_i_i_sc              1047
-substr_s_s_ic_i_sc             1048
-substr_s_s_i_ic_sc             1049
-substr_s_s_ic_ic_sc            1050
-substr_s_i_i_s                 1051
-substr_s_ic_i_s                1052
-substr_s_i_ic_s                1053
-substr_s_ic_ic_s               1054
-substr_s_i_i_sc                1055
-substr_s_ic_i_sc               1056
-substr_s_i_ic_sc               1057
-substr_s_ic_ic_sc              1058
-substr_s_p_i_i                 1059
-substr_s_p_ic_i                1060
-substr_s_p_i_ic                1061
-substr_s_p_ic_ic               1062
-index_i_s_s                    1063
-index_i_sc_s                   1064
-index_i_s_sc                   1065
-index_i_sc_sc                  1066
-index_i_s_s_i                  1067
-index_i_sc_s_i                 1068
-index_i_s_sc_i                 1069
-index_i_sc_sc_i                1070
-index_i_s_s_ic                 1071
-index_i_sc_s_ic                1072
-index_i_s_sc_ic                1073
-index_i_sc_sc_ic               1074
-sprintf_s_s_p                  1075
-sprintf_s_sc_p                 1076
-sprintf_p_p_p                  1077
-new_s                          1078
-new_s_i                        1079
-new_s_ic                       1080
-stringinfo_i_s_i               1081
-stringinfo_i_sc_i              1082
-stringinfo_i_s_ic              1083
-stringinfo_i_sc_ic             1084
-upcase_s_s                     1085
-upcase_s_sc                    1086
-upcase_s                       1087
-downcase_s_s                   1088
-downcase_s_sc                  1089
-downcase_s                     1090
-titlecase_s_s                  1091
-titlecase_s_sc                 1092
-titlecase_s                    1093
-join_s_s_p                     1094
-join_s_sc_p                    1095
-split_p_s_s                    1096
-split_p_sc_s                   1097
-split_p_s_sc                   1098
-split_p_sc_sc                  1099
-charset_i_s                    1100
-charset_i_sc                   1101
-charsetname_s_i                1102
-charsetname_s_ic               1103
-find_charset_i_s               1104
-find_charset_i_sc              1105
-trans_charset_s_i              1106
-trans_charset_s_ic             1107
-trans_charset_s_s_i            1108
-trans_charset_s_sc_i           1109
-trans_charset_s_s_ic           1110
-trans_charset_s_sc_ic          1111
-encoding_i_s                   1112
-encoding_i_sc                  1113
-encodingname_s_i               1114
-encodingname_s_ic              1115
-find_encoding_i_s              1116
-find_encoding_i_sc             1117
-trans_encoding_s_i             1118
-trans_encoding_s_ic            1119
-trans_encoding_s_s_i           1120
-trans_encoding_s_sc_i          1121
-trans_encoding_s_s_ic          1122
-trans_encoding_s_sc_ic         1123
-is_cclass_i_i_s_i              1124
-is_cclass_i_ic_s_i             1125
-is_cclass_i_i_sc_i             1126
-is_cclass_i_ic_sc_i            1127
-is_cclass_i_i_s_ic             1128
-is_cclass_i_ic_s_ic            1129
-is_cclass_i_i_sc_ic            1130
-is_cclass_i_ic_sc_ic           1131
-find_cclass_i_i_s_i_i          1132
-find_cclass_i_ic_s_i_i         1133
-find_cclass_i_i_sc_i_i         1134
-find_cclass_i_ic_sc_i_i        1135
-find_cclass_i_i_s_ic_i         1136
-find_cclass_i_ic_s_ic_i        1137
-find_cclass_i_i_sc_ic_i        1138
-find_cclass_i_ic_sc_ic_i       1139
-find_cclass_i_i_s_i_ic         1140
-find_cclass_i_ic_s_i_ic        1141
-find_cclass_i_i_sc_i_ic        1142
-find_cclass_i_ic_sc_i_ic       1143
-find_cclass_i_i_s_ic_ic        1144
-find_cclass_i_ic_s_ic_ic       1145
-find_cclass_i_i_sc_ic_ic       1146
-find_cclass_i_ic_sc_ic_ic      1147
-find_not_cclass_i_i_s_i_i      1148
-find_not_cclass_i_ic_s_i_i     1149
-find_not_cclass_i_i_sc_i_i     1150
-find_not_cclass_i_ic_sc_i_i    1151
-find_not_cclass_i_i_s_ic_i     1152
-find_not_cclass_i_ic_s_ic_i    1153
-find_not_cclass_i_i_sc_ic_i    1154
-find_not_cclass_i_ic_sc_ic_i   1155
-find_not_cclass_i_i_s_i_ic     1156
-find_not_cclass_i_ic_s_i_ic    1157
-find_not_cclass_i_i_sc_i_ic    1158
-find_not_cclass_i_ic_sc_i_ic   1159
-find_not_cclass_i_i_s_ic_ic    1160
-find_not_cclass_i_ic_s_ic_ic   1161
-find_not_cclass_i_i_sc_ic_ic   1162
-find_not_cclass_i_ic_sc_ic_ic  1163
-escape_s_s                     1164
-compose_s_s                    1165
-compose_s_sc                   1166
-spawnw_i_s                     1167
-spawnw_i_sc                    1168
-spawnw_i_p                     1169
-err_i                          1170
-err_s                          1171
-err_s_i                        1172
-err_s_ic                       1173
-time_i                         1174
-time_n                         1175
-gmtime_s_i                     1176
-gmtime_s_ic                    1177
-localtime_s_i                  1178
-localtime_s_ic                 1179
-decodetime_p_i                 1180
-decodetime_p_ic                1181
-decodelocaltime_p_i            1182
-decodelocaltime_p_ic           1183
-sysinfo_s_i                    1184
-sysinfo_s_ic                   1185
-sysinfo_i_i                    1186
-sysinfo_i_ic                   1187
-sleep_i                        1188
-sleep_ic                       1189
-sleep_n                        1190
-sleep_nc                       1191
-sizeof_i_i                     1192
-sizeof_i_ic                    1193
-store_lex_s_p                  1194
-store_lex_sc_p                 1195
-find_lex_p_s                   1196
-find_lex_p_sc                  1197
-find_caller_lex_p_s            1198
-find_caller_lex_p_sc           1199
-get_namespace_p                1200
-get_namespace_p_p              1201
-get_namespace_p_pc             1202
-get_hll_namespace_p            1203
-get_hll_namespace_p_p          1204
-get_hll_namespace_p_pc         1205
-get_root_namespace_p           1206
-get_root_namespace_p_p         1207
-get_root_namespace_p_pc        1208
-get_global_p_s                 1209
-get_global_p_sc                1210
-get_global_p_p_s               1211
-get_global_p_pc_s              1212
-get_global_p_p_sc              1213
-get_global_p_pc_sc             1214
-get_hll_global_p_s             1215
-get_hll_global_p_sc            1216
-get_hll_global_p_p_s           1217
-get_hll_global_p_pc_s          1218
-get_hll_global_p_p_sc          1219
-get_hll_global_p_pc_sc         1220
-get_root_global_p_s            1221
-get_root_global_p_sc           1222
-get_root_global_p_p_s          1223
-get_root_global_p_pc_s         1224
-get_root_global_p_p_sc         1225
-get_root_global_p_pc_sc        1226
-set_global_s_p                 1227
-set_global_sc_p                1228
-set_global_p_s_p               1229
-set_global_pc_s_p              1230
-set_global_p_sc_p              1231
-set_global_pc_sc_p             1232
-set_hll_global_s_p             1233
-set_hll_global_sc_p            1234
-set_hll_global_p_s_p           1235
-set_hll_global_pc_s_p          1236
-set_hll_global_p_sc_p          1237
-set_hll_global_pc_sc_p         1238
-set_root_global_s_p            1239
-set_root_global_sc_p           1240
-set_root_global_p_s_p          1241
-set_root_global_pc_s_p         1242
-set_root_global_p_sc_p         1243
-set_root_global_pc_sc_p        1244
-find_name_p_s                  1245
-find_name_p_sc                 1246
-find_sub_not_null_p_s          1247
-find_sub_not_null_p_sc         1248
+root_new_p_p                    800
+root_new_p_pc                   801
+root_new_p_p_p                  802
+root_new_p_pc_p                 803
+root_new_p_p_pc                 804
+root_new_p_pc_pc                805
+typeof_s_p                      806
+typeof_p_p                      807
+get_repr_s_p                    808
+find_method_p_p_s               809
+find_method_p_p_sc              810
+defined_i_p                     811
+defined_i_p_ki                  812
+defined_i_p_kic                 813
+defined_i_p_k                   814
+defined_i_p_kc                  815
+exists_i_p_ki                   816
+exists_i_p_kic                  817
+exists_i_p_k                    818
+exists_i_p_kc                   819
+delete_p_k                      820
+delete_p_kc                     821
+delete_p_ki                     822
+delete_p_kic                    823
+elements_i_p                    824
+push_p_i                        825
+push_p_ic                       826
+push_p_n                        827
+push_p_nc                       828
+push_p_s                        829
+push_p_sc                       830
+push_p_p                        831
+pop_i_p                         832
+pop_n_p                         833
+pop_s_p                         834
+pop_p_p                         835
+unshift_p_i                     836
+unshift_p_ic                    837
+unshift_p_n                     838
+unshift_p_nc                    839
+unshift_p_s                     840
+unshift_p_sc                    841
+unshift_p_p                     842
+shift_i_p                       843
+shift_n_p                       844
+shift_s_p                       845
+shift_p_p                       846
+splice_p_p_i_i                  847
+splice_p_p_ic_i                 848
+splice_p_p_i_ic                 849
+splice_p_p_ic_ic                850
+setprop_p_s_p                   851
+setprop_p_sc_p                  852
+getprop_p_s_p                   853
+getprop_p_sc_p                  854
+delprop_p_s                     855
+delprop_p_sc                    856
+prophash_p_p                    857
+freeze_s_p                      858
+thaw_p_s                        859
+thaw_p_sc                       860
+add_multi_s_s_p                 861
+add_multi_sc_s_p                862
+add_multi_s_sc_p                863
+add_multi_sc_sc_p               864
+find_multi_p_s_s                865
+find_multi_p_sc_s               866
+find_multi_p_s_sc               867
+find_multi_p_sc_sc              868
+register_p                      869
+unregister_p                    870
+box_p_i                         871
+box_p_ic                        872
+box_p_n                         873
+box_p_nc                        874
+box_p_s                         875
+box_p_sc                        876
+iter_p_p                        877
+morph_p_p                       878
+morph_p_pc                      879
+clone_s_s                       880
+clone_s_sc                      881
+exchange_i_i                    882
+exchange_p_p                    883
+exchange_n_n                    884
+exchange_s_s                    885
+set_i_i                         886
+set_i_ic                        887
+set_i_n                         888
+set_i_nc                        889
+set_i_s                         890
+set_i_sc                        891
+set_n_n                         892
+set_n_nc                        893
+set_n_i                         894
+set_n_ic                        895
+set_n_s                         896
+set_n_sc                        897
+set_n_p                         898
+set_s_p                         899
+set_s_s                         900
+set_s_sc                        901
+set_s_i                         902
+set_s_ic                        903
+set_s_n                         904
+set_s_nc                        905
+set_p_pc                        906
+set_p_p                         907
+set_p_i                         908
+set_p_ic                        909
+set_p_n                         910
+set_p_nc                        911
+set_p_s                         912
+set_p_sc                        913
+set_i_p                         914
+assign_p_p                      915
+assign_p_i                      916
+assign_p_ic                     917
+assign_p_n                      918
+assign_p_nc                     919
+assign_p_s                      920
+assign_p_sc                     921
+assign_s_s                      922
+assign_s_sc                     923
+setref_p_p                      924
+deref_p_p                       925
+setp_ind_i_p                    926
+setp_ind_ic_p                   927
+setn_ind_i_n                    928
+setn_ind_ic_n                   929
+setn_ind_i_nc                   930
+setn_ind_ic_nc                  931
+sets_ind_i_s                    932
+sets_ind_ic_s                   933
+sets_ind_i_sc                   934
+sets_ind_ic_sc                  935
+seti_ind_i_i                    936
+seti_ind_ic_i                   937
+seti_ind_i_ic                   938
+seti_ind_ic_ic                  939
+set_p_ki_i                      940
+set_p_kic_i                     941
+set_p_ki_ic                     942
+set_p_kic_ic                    943
+set_p_ki_n                      944
+set_p_kic_n                     945
+set_p_ki_nc                     946
+set_p_kic_nc                    947
+set_p_ki_s                      948
+set_p_kic_s                     949
+set_p_ki_sc                     950
+set_p_kic_sc                    951
+set_p_ki_p                      952
+set_p_kic_p                     953
+set_i_p_ki                      954
+set_i_p_kic                     955
+set_n_p_ki                      956
+set_n_p_kic                     957
+set_s_p_ki                      958
+set_s_p_kic                     959
+set_p_p_ki                      960
+set_p_p_kic                     961
+set_p_k_i                       962
+set_p_kc_i                      963
+set_p_k_ic                      964
+set_p_kc_ic                     965
+set_p_k_n                       966
+set_p_kc_n                      967
+set_p_k_nc                      968
+set_p_kc_nc                     969
+set_p_k_s                       970
+set_p_kc_s                      971
+set_p_k_sc                      972
+set_p_kc_sc                     973
+set_p_k_p                       974
+set_p_kc_p                      975
+set_i_p_k                       976
+set_i_p_kc                      977
+set_n_p_k                       978
+set_n_p_kc                      979
+set_s_p_k                       980
+set_s_p_kc                      981
+set_p_p_k                       982
+set_p_p_kc                      983
+clone_p_p                       984
+clone_p_p_p                     985
+clone_p_p_pc                    986
+copy_p_p                        987
+null_s                          988
+null_i                          989
+null_p                          990
+null_n                          991
+cleari                          992
+clearn                          993
+clears                          994
+clearp                          995
+ord_i_s                         996
+ord_i_sc                        997
+ord_i_s_i                       998
+ord_i_sc_i                      999
+ord_i_s_ic                     1000
+ord_i_sc_ic                    1001
+chr_s_i                        1002
+chr_s_ic                       1003
+chopn_s_i                      1004
+chopn_s_ic                     1005
+chopn_s_s_i                    1006
+chopn_s_sc_i                   1007
+chopn_s_s_ic                   1008
+chopn_s_sc_ic                  1009
+concat_s_s                     1010
+concat_s_sc                    1011
+concat_p_p                     1012
+concat_p_s                     1013
+concat_p_sc                    1014
+concat_s_s_s                   1015
+concat_s_sc_s                  1016
+concat_s_s_sc                  1017
+concat_p_p_s                   1018
+concat_p_p_sc                  1019
+concat_p_p_p                   1020
+repeat_s_s_i                   1021
+repeat_s_sc_i                  1022
+repeat_s_s_ic                  1023
+repeat_s_sc_ic                 1024
+repeat_p_p_i                   1025
+repeat_p_p_ic                  1026
+repeat_p_p_p                   1027
+repeat_p_i                     1028
+repeat_p_ic                    1029
+repeat_p_p                     1030
+length_i_s                     1031
+length_i_sc                    1032
+bytelength_i_s                 1033
+bytelength_i_sc                1034
+pin_s                          1035
+unpin_s                        1036
+substr_s_s_i                   1037
+substr_s_sc_i                  1038
+substr_s_s_ic                  1039
+substr_s_sc_ic                 1040
+substr_s_s_i_i                 1041
+substr_s_sc_i_i                1042
+substr_s_s_ic_i                1043
+substr_s_sc_ic_i               1044
+substr_s_s_i_ic                1045
+substr_s_sc_i_ic               1046
+substr_s_s_ic_ic               1047
+substr_s_sc_ic_ic              1048
+substr_s_s_i_i_s               1049
+substr_s_s_ic_i_s              1050
+substr_s_s_i_ic_s              1051
+substr_s_s_ic_ic_s             1052
+substr_s_s_i_i_sc              1053
+substr_s_s_ic_i_sc             1054
+substr_s_s_i_ic_sc             1055
+substr_s_s_ic_ic_sc            1056
+substr_s_i_i_s                 1057
+substr_s_ic_i_s                1058
+substr_s_i_ic_s                1059
+substr_s_ic_ic_s               1060
+substr_s_i_i_sc                1061
+substr_s_ic_i_sc               1062
+substr_s_i_ic_sc               1063
+substr_s_ic_ic_sc              1064
+substr_s_p_i_i                 1065
+substr_s_p_ic_i                1066
+substr_s_p_i_ic                1067
+substr_s_p_ic_ic               1068
+index_i_s_s                    1069
+index_i_sc_s                   1070
+index_i_s_sc                   1071
+index_i_sc_sc                  1072
+index_i_s_s_i                  1073
+index_i_sc_s_i                 1074
+index_i_s_sc_i                 1075
+index_i_sc_sc_i                1076
+index_i_s_s_ic                 1077
+index_i_sc_s_ic                1078
+index_i_s_sc_ic                1079
+index_i_sc_sc_ic               1080
+sprintf_s_s_p                  1081
+sprintf_s_sc_p                 1082
+sprintf_p_p_p                  1083
+new_s                          1084
+new_s_i                        1085
+new_s_ic                       1086
+stringinfo_i_s_i               1087
+stringinfo_i_sc_i              1088
+stringinfo_i_s_ic              1089
+stringinfo_i_sc_ic             1090
+upcase_s_s                     1091
+upcase_s_sc                    1092
+upcase_s                       1093
+downcase_s_s                   1094
+downcase_s_sc                  1095
+downcase_s                     1096
+titlecase_s_s                  1097
+titlecase_s_sc                 1098
+titlecase_s                    1099
+join_s_s_p                     1100
+join_s_sc_p                    1101
+split_p_s_s                    1102
+split_p_sc_s                   1103
+split_p_s_sc                   1104
+split_p_sc_sc                  1105
+charset_i_s                    1106
+charset_i_sc                   1107
+charsetname_s_i                1108
+charsetname_s_ic               1109
+find_charset_i_s               1110
+find_charset_i_sc              1111
+trans_charset_s_i              1112
+trans_charset_s_ic             1113
+trans_charset_s_s_i            1114
+trans_charset_s_sc_i           1115
+trans_charset_s_s_ic           1116
+trans_charset_s_sc_ic          1117
+encoding_i_s                   1118
+encoding_i_sc                  1119
+encodingname_s_i               1120
+encodingname_s_ic              1121
+find_encoding_i_s              1122
+find_encoding_i_sc             1123
+trans_encoding_s_i             1124
+trans_encoding_s_ic            1125
+trans_encoding_s_s_i           1126
+trans_encoding_s_sc_i          1127
+trans_encoding_s_s_ic          1128
+trans_encoding_s_sc_ic         1129
+is_cclass_i_i_s_i              1130
+is_cclass_i_ic_s_i             1131
+is_cclass_i_i_sc_i             1132
+is_cclass_i_ic_sc_i            1133
+is_cclass_i_i_s_ic             1134
+is_cclass_i_ic_s_ic            1135
+is_cclass_i_i_sc_ic            1136
+is_cclass_i_ic_sc_ic           1137
+find_cclass_i_i_s_i_i          1138
+find_cclass_i_ic_s_i_i         1139
+find_cclass_i_i_sc_i_i         1140
+find_cclass_i_ic_sc_i_i        1141
+find_cclass_i_i_s_ic_i         1142
+find_cclass_i_ic_s_ic_i        1143
+find_cclass_i_i_sc_ic_i        1144
+find_cclass_i_ic_sc_ic_i       1145
+find_cclass_i_i_s_i_ic         1146
+find_cclass_i_ic_s_i_ic        1147
+find_cclass_i_i_sc_i_ic        1148
+find_cclass_i_ic_sc_i_ic       1149
+find_cclass_i_i_s_ic_ic        1150
+find_cclass_i_ic_s_ic_ic       1151
+find_cclass_i_i_sc_ic_ic       1152
+find_cclass_i_ic_sc_ic_ic      1153
+find_not_cclass_i_i_s_i_i      1154
+find_not_cclass_i_ic_s_i_i     1155
+find_not_cclass_i_i_sc_i_i     1156
+find_not_cclass_i_ic_sc_i_i    1157
+find_not_cclass_i_i_s_ic_i     1158
+find_not_cclass_i_ic_s_ic_i    1159
+find_not_cclass_i_i_sc_ic_i    1160
+find_not_cclass_i_ic_sc_ic_i   1161
+find_not_cclass_i_i_s_i_ic     1162
+find_not_cclass_i_ic_s_i_ic    1163
+find_not_cclass_i_i_sc_i_ic    1164
+find_not_cclass_i_ic_sc_i_ic   1165
+find_not_cclass_i_i_s_ic_ic    1166
+find_not_cclass_i_ic_s_ic_ic   1167
+find_not_cclass_i_i_sc_ic_ic   1168
+find_not_cclass_i_ic_sc_ic_ic  1169
+escape_s_s                     1170
+compose_s_s                    1171
+compose_s_sc                   1172
+spawnw_i_s                     1173
+spawnw_i_sc                    1174
+spawnw_i_p                     1175
+err_i                          1176
+err_s                          1177
+err_s_i                        1178
+err_s_ic                       1179
+time_i                         1180
+time_n                         1181
+gmtime_s_i                     1182
+gmtime_s_ic                    1183
+localtime_s_i                  1184
+localtime_s_ic                 1185
+decodetime_p_i                 1186
+decodetime_p_ic                1187
+decodelocaltime_p_i            1188
+decodelocaltime_p_ic           1189
+sysinfo_s_i                    1190
+sysinfo_s_ic                   1191
+sysinfo_i_i                    1192
+sysinfo_i_ic                   1193
+sleep_i                        1194
+sleep_ic                       1195
+sleep_n                        1196
+sleep_nc                       1197
+sizeof_i_i                     1198
+sizeof_i_ic                    1199
+store_lex_s_p                  1200
+store_lex_sc_p                 1201
+find_lex_p_s                   1202
+find_lex_p_sc                  1203
+find_caller_lex_p_s            1204
+find_caller_lex_p_sc           1205
+get_namespace_p                1206
+get_namespace_p_p              1207
+get_namespace_p_pc             1208
+get_hll_namespace_p            1209
+get_hll_namespace_p_p          1210
+get_hll_namespace_p_pc         1211
+get_root_namespace_p           1212
+get_root_namespace_p_p         1213
+get_root_namespace_p_pc        1214
+get_global_p_s                 1215
+get_global_p_sc                1216
+get_global_p_p_s               1217
+get_global_p_pc_s              1218
+get_global_p_p_sc              1219
+get_global_p_pc_sc             1220
+get_hll_global_p_s             1221
+get_hll_global_p_sc            1222
+get_hll_global_p_p_s           1223
+get_hll_global_p_pc_s          1224
+get_hll_global_p_p_sc          1225
+get_hll_global_p_pc_sc         1226
+get_root_global_p_s            1227
+get_root_global_p_sc           1228
+get_root_global_p_p_s          1229
+get_root_global_p_pc_s         1230
+get_root_global_p_p_sc         1231
+get_root_global_p_pc_sc        1232
+set_global_s_p                 1233
+set_global_sc_p                1234
+set_global_p_s_p               1235
+set_global_pc_s_p              1236
+set_global_p_sc_p              1237
+set_global_pc_sc_p             1238
+set_hll_global_s_p             1239
+set_hll_global_sc_p            1240
+set_hll_global_p_s_p           1241
+set_hll_global_pc_s_p          1242
+set_hll_global_p_sc_p          1243
+set_hll_global_pc_sc_p         1244
+set_root_global_s_p            1245
+set_root_global_sc_p           1246
+set_root_global_p_s_p          1247
+set_root_global_pc_s_p         1248
+set_root_global_p_sc_p         1249
+set_root_global_pc_sc_p        1250
+find_name_p_s                  1251
+find_name_p_sc                 1252
+find_sub_not_null_p_s          1253
+find_sub_not_null_p_sc         1254

Modified: trunk/src/ops/pmc.ops
==============================================================================
--- trunk/src/ops/pmc.ops	Thu May 21 02:08:36 2009	(r39006)
+++ trunk/src/ops/pmc.ops	Thu May 21 04:04:31 2009	(r39007)
@@ -125,6 +125,58 @@
 
 ########################################
 
+=item B<root_new>(out PMC, in PMC)
+
+=item B<root_new>(out PMC, in PMC, in PMC)
+
+Instantiate a new object from a key name relative to the root namespace.
+
+  root_new P0, ['parrot';'ResizableBooleanArray']
+
+Optionally a PMC may be passed to the constructor. It's up to the class what
+to do with the initializer.
+
+=cut
+
+op root_new(out PMC, in PMC) {
+    PMC * const key      = $2;
+    PMC * const root_ns  = interp->root_namespace;
+    PMC * const ns       = Parrot_get_namespace_keyed(interp, root_ns, key);
+    PMC * classobj       = PMCNULL;
+
+    if (!PMC_IS_NULL(ns))
+        classobj = Parrot_oo_get_class(interp, ns);
+    if (!PMC_IS_NULL(classobj))
+        $1 = VTABLE_instantiate(interp, classobj, PMCNULL);
+    else {
+        opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
+            EXCEPTION_NO_CLASS,
+            "Class '%Ss' not found", VTABLE_get_repr(interp, key));
+        goto ADDRESS(dest);
+    }
+}
+
+op root_new(out PMC, in PMC, in PMC) {
+    PMC * const key      = $2;
+    PMC * const root_ns  = interp->root_namespace;
+    PMC * const ns       = Parrot_get_namespace_keyed(interp, root_ns, key);
+    PMC * classobj       = PMCNULL;
+
+    if (!PMC_IS_NULL(ns))
+        classobj = Parrot_oo_get_class(interp, ns);
+    if (!PMC_IS_NULL(classobj))
+        $1 = VTABLE_instantiate(interp, classobj, $3);
+    else {
+        opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
+            EXCEPTION_NO_CLASS,
+            "Class '%Ss' not found", VTABLE_get_repr(interp, key));
+        goto ADDRESS(dest);
+    }
+}
+
+
+########################################
+
 =item B<typeof>(out STR, invar PMC)
 
 =item B<typeof>(out PMC, invar PMC)

Copied and modified: trunk/t/oo/root_new.t (from r39006, trunk/t/oo/new.t)
==============================================================================
--- trunk/t/oo/new.t	Thu May 21 02:08:36 2009	(r39006, copy source)
+++ trunk/t/oo/root_new.t	Thu May 21 04:04:31 2009	(r39007)
@@ -4,46 +4,27 @@
 
 =head1 NAME
 
-t/oo/new.t - Test OO instantiation
+t/oo/root_new.t - Test OO instantiation via root_new
 
 =head1 SYNOPSIS
 
-    % prove t/oo/new.t
+    % prove t/oo/root_new.t
 
 =head1 DESCRIPTION
 
-Tests OO features related to instantiating new objects.
+Tests OO features related to instantiating new objects
+via the C<root_new> opcode.
 
 =cut
 
 .sub main :main
     .include 'except_types.pasm'
     .include 'test_more.pir'
-    plan(111)
+    plan(6)
 
-    instantiate_from_class_object()
-    manually_create_anonymous_class_object()
-    manually_create_named_class_object()
-    instantiate_from_class_object_method()
-    instantiate_from_string_name()
-    instantiate_from_string_register_name()
-    instantiate_from_string_PMC_name()
-    instantiate_from_key_name()
-    instantiate_from_key_PMC_name()
-    create_and_instantiate_from_array_of_names()
-    only_string_arrays_work_for_creating_classes()
-    instantiate_from_class_object_with_init()
-    instantiate_from_string_name_with_init()
-    instantiate_from_string_register_name_with_init()
-    instantiate_from_string_PMC_name_with_init()
-    instantiate_from_array_of_names_with_init()
-    instantiate_from_key_name_with_init()
-    create_class_namespace_initializer()
-    regression_test_instantiate_class_within_different_namespace()
-    get_class_retrieves_a_high_level_class_object()
-    get_class_retrieves_a_proxy_class_object()
-    get_class_retrieves_a_class_object_that_doesnt_exist()
-    instantiate_class_from_invalid_key()
+    instantiate_from_key_pmc()
+    .const 'Sub' test2 = 'instantiate_from_key_pmc_in_foreign_hll'
+    test2()
 .end
 
 
@@ -84,8 +65,6 @@
     $S1 = typeof obj
     is($S1, class_name, typeof_message)
 
-    isa_ok(obj, 'Object')
-
     .local string keypmc_message
     $S2 = get_repr key_pmc
     keypmc_message = concat 'The object isa ', $S2
@@ -102,386 +81,15 @@
 
 #############################################################################
 
-
-.sub instantiate_from_class_object
-    ok(1, "Instantiate from class object")
-    $P1 = newclass 'Foo1'
-    $S1 = typeof $P1
-    is($S1, 'Class', '`newclass "Foo"` creates a Class PMC')
-    isa_ok($P1, 'Class')
-
-    $P2 = new $P1
-    _test_instance($P2, 'Foo1')
+.sub instantiate_from_key_pmc
+    $P0 = root_new ['parrot';'Integer']
+    _test_instance($P0, 'Integer')
 .end
 
 
-.sub manually_create_anonymous_class_object
-    ok(2, "Manually create anonymous class object")
-    $P1 = new 'Class'
-    $S1 = typeof $P1
-    is($S1, 'Class', 'New anonymous class creates a Class PMC')
-    isa_ok($P1, 'Class')
-
-    $P2 = new $P1
-    $S1 = typeof $P2
-    is($S1, '', 'New instance is of type ""')
-    isa_ok($P2, 'Object')
-
-    $I3 = isa $P2, ''
-    is($I3, 0, '"isa" will not match an empty type')
-    $I3 = isa $P2, 'Foo'
-    is($I3, 0, '"isa" will not match a random type')
-.end
-
-
-.sub manually_create_named_class_object
-    ok(3, "Manually create named class object")
-    $P1 = new 'Class'
-    $P1.'name'('Foo2')
-    $S1 = typeof $P1
-    is($S1, 'Class', 'new named class creates a "Class" PMC')
-    isa_ok($P1, 'Class')
-
-    $P2 = new $P1
-    _test_instance($P2, 'Foo2')
-.end
-
-
-.sub instantiate_from_class_object_method
-    ok(4, "Instantiate from class object 'new' method")
-    $P1 = newclass 'Foo3'
-
-    $P2 = $P1.'new'()
-    _test_instance($P2, 'Foo3')
-.end
-
-
-.sub instantiate_from_string_name
-    ok(5, "Instantiate from string name")
-    $P1 = newclass 'Foo4'
-
-    $P2 = new 'Foo4'
-    _test_instance($P2, 'Foo4')
-.end
-
-
-.sub instantiate_from_string_register_name
-    ok(6, "Instantiate from string register name")
-    $P1 = newclass 'Foo5'
-
-    $S1 = 'Foo5'
-    $P2 = new $S1
-    _test_instance($P2, 'Foo5')
-.end
-
-
-.sub instantiate_from_string_PMC_name
-    ok(7, "Instantiate from string PMC name")
-    $P1 = newclass 'Foo6'
-
-    $P3 = new 'String'
-    $P3 = 'Foo6'
-    $P2 = new $P3
-    _test_instance($P2, 'Foo6')
-.end
-
-
-.sub instantiate_from_key_name
-    ok(8, "Instantiate from Key name")
-    $P1 = newclass ['Foo';'Bar1']
-    $S1 = typeof $P1
-    is($S1, 'Class', "`newclass ['Foo';'Bar1']` creates a Class PMC")
-    isa_ok($P1, 'Class')
-
-    $P2 = new $P1
-    _test_instance($P2, 'Foo Bar1')
+.HLL 'foreign'
+.sub instantiate_from_key_pmc_in_foreign_hll
+    $P0 = root_new ['parrot';'Integer']
+    _test_instance($P0, 'Integer')
 .end
-
-
-.sub instantiate_from_key_PMC_name
-    ok(9, "Instantiate from Key PMC name")
-    $P1 = newclass ['Foo';'Bar2']
-
-    $P3 = new 'Key'
-    $P3 = 'Foo'
-    $P4 = new 'Key'
-    $P4 = 'Bar2'
-    push $P3, $P4
-
-    $P2 = new $P3
-    _test_instance($P2, 'Foo Bar2')
-.end
-
-
-.sub create_and_instantiate_from_array_of_names
-    ok(10, "Create and instantiate from ResizableStringArray")
-    $P0 = split ' ', 'Foo Bar3'
-    $P1 = newclass $P0
-    $S1 = typeof $P1
-    is($S1, 'Class', "`newclass some_string_array` creates a Class PMC")
-    isa_ok($P1, 'Class')
-
-    $P2 = new $P0
-    _test_instance($P2, 'Foo Bar3')
-.end
-
-
-.sub only_string_arrays_work_for_creating_classes
-    ok(11, 'Create a class via a ResizablePMCArray')
-    .local pmc eh
-    .local string message
-    $P0  = new 'ResizablePMCArray'
-    $P10 = new 'String'
-    $P10 = 'Foo'
-    $P11 = new 'String'
-    $P11 = 'Bar4'
-    $P0.'push'($P10)
-    $P0.'push'($P11)
-
-  try:
-    eh = new 'ExceptionHandler'
-    eh.'handle_types'(.EXCEPTION_INVALID_OPERATION)
-    set_addr eh, catch
-
-    push_eh eh
-    $P1 = newclass $P0
-    $I0 = 1
-    goto finally
-
-  catch:
-    .local pmc exception
-    .get_results(exception)
-    message = exception['message']
-    $I0 = 0
-
-  finally:
-    pop_eh
-    nok($I0, "Exception caught for ...")
-    is(message, 'Invalid class name key in init_pmc for Class', 'Invalid class name key')
-.end
-
-
-.sub instantiate_from_class_object_with_init
-    ok(12, 'Instantiate from Class object, with init')
-    $P1 = newclass 'Foo7'
-    addattribute $P1, 'data'
-    $P3 = new 'Hash'
-    $P4 = new 'String'
-    $P4 = 'data for Foo7'
-    $P3['data'] = $P4
-
-    $P2 = new $P1, $P3
-    _test_instance($P2, 'Foo7')
-
-    $P5 = getattribute $P2, 'data'
-    is($P5, 'data for Foo7', 'class attribute retrieved via the instance')
-.end
-
-
-.sub instantiate_from_string_name_with_init
-    ok(13, 'Instantiate from string name, with init')
-    $P1 = newclass 'Foo8'
-    addattribute $P1, 'data'
-    $P3 = new 'Hash'
-    $P4 = new 'String'
-    $P4 = 'data for Foo8'
-    $P3['data'] = $P4
-
-    $P2 = new 'Foo8', $P3
-    _test_instance($P2, 'Foo8')
-
-    $P5 = getattribute $P2, 'data'
-    is($P5, 'data for Foo8', 'class attribute retrieved via the instance')
-.end
-
-
-.sub instantiate_from_string_register_name_with_init
-    ok(14, 'Instantiate from string register name, with init')
-    $P1 = newclass 'Foo9'
-    addattribute $P1, 'data'
-    $P3 = new 'Hash'
-    $P4 = new 'String'
-    $P4 = 'data for Foo9'
-    $P3['data'] = $P4
-
-    $S1 = 'Foo9'
-    $P2 = new $S1, $P3
-    _test_instance($P2, 'Foo9')
-
-    $P5 = getattribute $P2, 'data'
-    is($P5, 'data for Foo9', 'class attribute retrieved via the instance')
-.end
-
-
-.sub instantiate_from_string_PMC_name_with_init
-    ok(15, 'Instantiate from string PMC name, with init')
-    $P1 = newclass 'Foo10'
-    addattribute $P1, 'data'
-    $P3 = new 'Hash'
-    $P4 = new 'String'
-    $P4 = 'data for Foo10'
-    $P3['data'] = $P4
-
-    $P6 = new 'String'
-    $P6 = 'Foo10'
-    $P2 = new $P6, $P3
-    _test_instance($P2, 'Foo10')
-
-    $P5 = getattribute $P2, 'data'
-    is($P5, 'data for Foo10', 'class attribute retrieved via the instance')
-.end
-
-
-.sub instantiate_from_array_of_names_with_init
-    ok(16, 'Instantiate from string array, with init')
-    $P0 = split ' ', 'Foo Bar5'
-    $P1 = newclass $P0
-    addattribute $P1, 'data'
-    $P3 = new 'Hash'
-    $P4 = new 'String'
-    $P4 = 'data for Foo;Bar5'
-    $P3['data'] = $P4
-
-    $P2 = new $P0, $P3
-
-    $S1 = typeof $P2
-    _test_instance($P2, 'Foo Bar5')
-
-    $P5 = getattribute $P2, 'data'
-    is($P5, 'data for Foo;Bar5', 'class attribute retrieved via the instance')
-.end
-
-
-.sub instantiate_from_key_name_with_init
-    ok(17, 'Instantiate from Key name, with init')
-    $P1 = newclass ['Foo';'Bar6']
-    addattribute $P1, 'data'
-
-    $P3 = new 'Hash'
-    $P4 = new 'String'
-    $P4 = 'data for Foo;Bar6'
-    $P3['data'] = $P4
-
-    $P2 = new ['Foo';'Bar6'], $P3
-    _test_instance($P2, 'Foo Bar6')
-
-    $P5 = getattribute $P2, 'data'
-    is($P5, 'data for Foo;Bar6', 'class attribute retrieved via the instance')
-.end
-
-
-.sub create_class_namespace_initializer
-    .local pmc ns
-    ns = get_namespace ['Foo';'Bar7']
-    $P0 = new 'Class', ns
-
-    $P1 = new ['Foo';'Bar7']
-    $S0 = $P1.'blue'()
-    is($S0, 'foo_bar7 blue', 'Create class namespace initializer')
-.end
-
-.namespace [ 'Foo';'Bar7' ]
-.sub blue :method
-    .return('foo_bar7 blue')
-.end
-
-.namespace []
-
-
-.sub regression_test_instantiate_class_within_different_namespace
-    $P0 = newclass 'Foo11'
-    $P0 = newclass 'Bar11'
-
-    $P1 = new 'Foo11'
-    $S0 = $P1.'blue'()
-    is($S0, 'foo11 blue bar11 blue', 'Regression test: instantiate class within different namespace')
-.end
-
-.namespace [ 'Foo11' ]
-.sub blue :method
-    $P0 = new 'Bar11'
-    $S0 = $P0.'blue'()
-    $S0 = concat 'foo11 blue ', $S0
-    .return($S0)
-.end
-
-.namespace [ 'Bar11' ]
-.sub blue :method
-    .return('bar11 blue')
-.end
-
-.namespace []
-
-
-.sub get_class_retrieves_a_high_level_class_object
-    ok(20, 'get_class retrieves a high level class object')
-    $P0 = newclass 'Foo12'
-    $S1 = typeof $P0
-    is($S1, 'Class',"`newclass 'Foo12' returns a Class PMC`")
-
-    $P1 = get_class 'Foo12'
-    $S1 = typeof $P1
-    is($S1, 'Class',"`get_class 'Foo12' returns a Class PMC`")
-
-    $P2 = new $P1
-    _test_instance($P2, 'Foo12')
-.end
-
-
-.sub get_class_retrieves_a_proxy_class_object
-    ok(21, 'get_class retrieves a proxy class object')
-    $P1 = get_class 'String'
-    $S1 = typeof $P1
-    is($S1, 'PMCProxy', "`get_class 'String'` returns a PMCProxy PMC")
-
-    $P2 = new $P1
-    $S1 = typeof $P2
-    is($S1, 'String', 'Instantiating the proxy returns a String PMC')
-.end
-
-
-.sub get_class_retrieves_a_class_object_that_doesnt_exist
-    ok(22, 'get_class retrieves a class object that does not exist')
-    .local int murple_not_defined
-    murple_not_defined = 1
-    $P1 = get_class 'Murple'
-    if null $P1 goto not_defined
-    murple_not_defined = 0
-
-  not_defined:
-    ok(murple_not_defined, '"Murple" class is not defined')
-.end
-
-
-.sub instantiate_class_from_invalid_key
-    ok(23, 'Instantiate a class from invalid Key PMC')
-    .local pmc eh
-    .local string message
-
-  try:
-    eh = new 'ExceptionHandler'
-    eh.'handle_types'(.EXCEPTION_NO_CLASS)
-    set_addr eh, catch
-
-    push_eh eh
-    $P0 = new [ 'Foo'; 'Bar'; 'Baz' ]
-    $I0 = 1
-    goto finally
-    
-  catch:
-    .local pmc exception
-    .get_results(exception)
-    message = exception['message']
-    $I0 = 0
-
-  finally:    pop_eh
-    nok($I0, 'Exception caught for ...')
-    is(message, "Class '[ 'Foo' ; 'Bar' ; 'Baz' ]' not found", 'Class not found')
-.end
-
-
-# Local Variables:
-#   mode: pir
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:
+  


More information about the parrot-commits mailing list