diff --git a/lib/modules/Stdio.pmod/module.pmod b/lib/modules/Stdio.pmod/module.pmod index 77a88bd5f3adee7627e783364a566a40f4bb69d4..a08522ef3d7d8dabd9424b63bf8ed2da0a166500 100644 --- a/lib/modules/Stdio.pmod/module.pmod +++ b/lib/modules/Stdio.pmod/module.pmod @@ -1,4 +1,4 @@ -// $Id: module.pmod,v 1.230 2007/12/20 16:07:45 grubba Exp $ +// $Id: module.pmod,v 1.231 2007/12/28 13:35:24 nilsson Exp $ #pike __REAL_VERSION__ inherit files; @@ -773,7 +773,7 @@ class File } #endif - this_program set_peek_file_before_read_callback(int(0..1) ignored) + /*FIXME: deprecated*/ this_program set_peek_file_before_read_callback(int(0..1) ignored) { // This hack is not necessary anymore - the backend now properly // ignores events if other callbacks/threads has managed to read @@ -1457,7 +1457,7 @@ class FILE return ::_sprintf( type, flags ); } - inline private static nomask int low_get_data() + inline private static final int low_get_data() { string s = file::read(BUFSIZE,1); if(s && strlen(s)) { @@ -1471,7 +1471,7 @@ class FILE } } - inline private static nomask int get_data() + inline private static final int get_data() { if( bpos ) { @@ -1485,7 +1485,7 @@ class FILE // Return 0 at end of file, 1 otherwise. // At exit cached_lines contains at least one string, // and lp is set to zero. - inline private static nomask int get_lines() + inline private static final int get_lines() { if( bpos ) { @@ -1503,7 +1503,7 @@ class FILE } // NB: Caller is responsible for clearing cached_lines and lp. - inline private static nomask string extract(int bytes, int|void skip) + inline private static final string extract(int bytes, int|void skip) { string s; s=b[bpos..bpos+bytes-1]; diff --git a/lib/modules/Thread.pmod b/lib/modules/Thread.pmod index e47f0650e0da68496ab1b5a23ff9b604d62a8feb..8de9c0a2e79d6c19699171af95cc2918baf2c201 100644 --- a/lib/modules/Thread.pmod +++ b/lib/modules/Thread.pmod @@ -83,7 +83,7 @@ optional class Fifo { //! int size() { return num; } - static nomask mixed read_unlocked() + static final mixed read_unlocked() { mixed tmp=buffer[ptr]; buffer[ptr++] = 0; // Throw away any references. @@ -134,7 +134,7 @@ optional class Fifo { return res; } - static nomask array read_all_unlocked() + static final array read_all_unlocked() { array ret; @@ -199,7 +199,7 @@ optional class Fifo { return ret; } - static nomask void write_unlocked (mixed value) + static final void write_unlocked (mixed value) { buffer[(ptr + num) % sizeof(buffer)] = value; if(write_tres) @@ -327,7 +327,7 @@ optional class Queue { return tmp; } - static nomask array read_all_unlocked() + static final array read_all_unlocked() { array ret; diff --git a/src/gc.c b/src/gc.c index 7799d029215ffe36935ec2dce678ffbcd8d76c6e..30983d1b4de9dd3bbd8d589c30f8fd395de9bde3 100644 --- a/src/gc.c +++ b/src/gc.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: gc.c,v 1.300 2007/10/12 18:42:38 mast Exp $ +|| $Id: gc.c,v 1.301 2007/12/28 13:38:15 nilsson Exp $ */ #include "global.h" @@ -1313,7 +1313,7 @@ again: } else if (id_ref->id_flags & ID_STATIC) strcat (prot, ",sta"); - if (id_ref->id_flags & ID_NOMASK) strcat (prot, ",nom"); + if (id_ref->id_flags & ID_FINAL) strcat (prot, ",fin"); if (id_ref->id_flags & ID_PUBLIC) strcat (prot, ",pub"); if (id_ref->id_flags & ID_PROTECTED) strcat (prot, ",pro"); if (id_ref->id_flags & ID_INLINE) strcat (prot, ",inl"); diff --git a/src/language.yacc b/src/language.yacc index 18dc1c50705db46338eed16b388e8bdbf446ea55..52da1299246efb57130c1b762716aa368326e07d 100644 --- a/src/language.yacc +++ b/src/language.yacc @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: language.yacc,v 1.390 2007/11/10 21:36:27 nilsson Exp $ +|| $Id: language.yacc,v 1.391 2007/12/28 13:38:15 nilsson Exp $ */ %pure_parser @@ -1178,8 +1178,8 @@ arguments2: new_arg_name { $$ = 1; } ; modifier: - TOK_NO_MASK { $$ = ID_NOMASK; } - | TOK_FINAL_ID { $$ = ID_NOMASK; } + TOK_NO_MASK { $$ = ID_FINAL; } + | TOK_FINAL_ID { $$ = ID_FINAL; } | TOK_STATIC { $$ = ID_STATIC; } | TOK_EXTERN { $$ = ID_EXTERN; } | TOK_OPTIONAL { $$ = ID_OPTIONAL; } diff --git a/src/modules/_Charset/charsetmod.c b/src/modules/_Charset/charsetmod.c index be3ae1e594a1cbea0d03d712a2a1a759993ef5d5..905daaab462485372baad456e815a8f49005291e 100644 --- a/src/modules/_Charset/charsetmod.c +++ b/src/modules/_Charset/charsetmod.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: charsetmod.c,v 1.62 2007/06/21 16:43:20 grubba Exp $ +|| $Id: charsetmod.c,v 1.63 2007/12/28 13:36:16 nilsson Exp $ */ #ifdef HAVE_CONFIG_H @@ -2250,13 +2250,13 @@ PIKE_MODULE_INIT /* function(:object) */ ADD_FUNCTION("clear", f_clear_utf7,tFunc(tNone,tObj), 0); set_init_callback(utf7_init_stor); - add_program_constant("UTF7dec", utf7_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("UTF7dec", utf7_program = end_program(), ID_STATIC|ID_FINAL); start_new_program(); do_inherit(&prog, 0, NULL); /* function(string:object) */ ADD_FUNCTION("feed", f_feed_utf8,tFunc(tStr,tObj), 0); - add_program_constant("UTF8dec", utf8_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("UTF8dec", utf8_program = end_program(), ID_STATIC|ID_FINAL); prog.u.program = utf7_program; start_new_program(); @@ -2265,38 +2265,38 @@ PIKE_MODULE_INIT ADD_FUNCTION("feed", f_feed_utf7e,tFunc(tStr,tObj), 0); /* function(:string) */ ADD_FUNCTION("drain", f_drain_utf7e,tFunc(tNone,tStr), 0); - add_program_constant("UTF7enc", utf7e_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("UTF7enc", utf7e_program = end_program(), ID_STATIC|ID_FINAL); prog.u.program = std_cs_program; start_new_program(); do_inherit(&prog, 0, NULL); /* function(string:object) */ ADD_FUNCTION("feed", f_feed_utf8e,tFunc(tStr,tObj), 0); - add_program_constant("UTF8enc", utf8e_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("UTF8enc", utf8e_program = end_program(), ID_STATIC|ID_FINAL); start_new_program(); do_inherit(&prog, 0, NULL); /* function(string:object) */ ADD_FUNCTION("feed", f_feed_utf_ebcdic,tFunc(tStr,tObj), 0); - add_program_constant("UTF_EBCDICdec", utf_ebcdic_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("UTF_EBCDICdec", utf_ebcdic_program = end_program(), ID_STATIC|ID_FINAL); start_new_program(); do_inherit(&prog, 0, NULL); /* function(string:object) */ ADD_FUNCTION("feed", f_feed_utf_ebcdice,tFunc(tStr,tObj), 0); - add_program_constant("UTF_EBCDICenc", utf_ebcdice_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("UTF_EBCDICenc", utf_ebcdice_program = end_program(), ID_STATIC|ID_FINAL); start_new_program(); do_inherit(&prog, 0, NULL); /* function(string:object) */ ADD_FUNCTION("feed", f_feed_utf7_5,tFunc(tStr,tObj), 0); - add_program_constant("UTF7_5dec", utf7_5_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("UTF7_5dec", utf7_5_program = end_program(), ID_STATIC|ID_FINAL); start_new_program(); do_inherit(&prog, 0, NULL); /* function(string:object) */ ADD_FUNCTION("feed", f_feed_utf7_5e,tFunc(tStr,tObj), 0); - add_program_constant("UTF7_5enc", utf7_5e_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("UTF7_5enc", utf7_5e_program = end_program(), ID_STATIC|ID_FINAL); start_new_program(); do_inherit(&prog, 0, NULL); @@ -2305,32 +2305,32 @@ PIKE_MODULE_INIT ADD_FUNCTION("feed", f_feed_euc,tFunc(tStr,tObj), 0); /* function(string:) */ ADD_FUNCTION("create", f_create_euc,tFunc(tStr,tVoid), ID_STATIC); - add_program_constant("EUCDec", euc_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("EUCDec", euc_program = end_program(), ID_STATIC|ID_FINAL); start_new_program(); do_inherit(&prog, 0, NULL); multichar_stor_offs = ADD_STORAGE(struct multichar_stor); ADD_FUNCTION("create", f_create_multichar,tFunc(tStr,tVoid), ID_STATIC); ADD_FUNCTION("feed", f_feed_multichar,tFunc(tStr,tObj), 0); - add_program_constant("MulticharDec", multichar_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("MulticharDec", multichar_program = end_program(), ID_STATIC|ID_FINAL); start_new_program(); do_inherit(&prog, 0, NULL); /* function(string:object) */ ADD_FUNCTION("feed", f_feed_gb18030e,tFunc(tStr,tObj), 0); - add_program_constant("GB18030Enc", gb18030e_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("GB18030Enc", gb18030e_program = end_program(), ID_STATIC|ID_FINAL); start_new_program(); do_inherit(&prog, 0, NULL); /* function(string:object) */ ADD_FUNCTION("feed", f_feed_gbke,tFunc(tStr,tObj), 0); - add_program_constant("GBKenc", gbke_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("GBKenc", gbke_program = end_program(), ID_STATIC|ID_FINAL); start_new_program(); do_inherit(&prog, 0, NULL); /* function(string:object) */ ADD_FUNCTION("feed", f_feed_sjis,tFunc(tStr,tObj), 0); - add_program_constant("ShiftJisDec", sjis_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("ShiftJisDec", sjis_program = end_program(), ID_STATIC|ID_FINAL); start_new_program(); do_inherit(&prog, 0, NULL); @@ -2362,13 +2362,13 @@ PIKE_MODULE_INIT do_inherit(&prog, 0, NULL); /* function(string,string|void,function(string:string)|void:void) */ ADD_FUNCTION("create", f_create_euce,tFunc(tStr tOr(tStr,tVoid) tOr(tFunc(tStr,tStr),tVoid),tVoid), 0); - add_program_constant("EUCEnc", euce_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("EUCEnc", euce_program = end_program(), ID_STATIC|ID_FINAL); start_new_program(); do_inherit(&prog, 0, NULL); /* function(string|void,function(string:string)|void:void) */ ADD_FUNCTION("create", f_create_sjise,tFunc(tOr(tStr,tVoid) tOr(tFunc(tStr,tStr),tVoid),tVoid), 0); - add_program_constant("ShiftJisEnc", sjise_program = end_program(), ID_STATIC|ID_NOMASK); + add_program_constant("ShiftJisEnc", sjise_program = end_program(), ID_STATIC|ID_FINAL); prog.u.program = std_rfc_program; diff --git a/src/modules/_Charset/iso2022.c b/src/modules/_Charset/iso2022.c index ea6817b6326d3d2b155ab79fb48de75e49b2649d..401fafae145fbbef187c975b042b3b884edf4f3c 100644 --- a/src/modules/_Charset/iso2022.c +++ b/src/modules/_Charset/iso2022.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: iso2022.c,v 1.44 2007/06/25 16:45:41 grubba Exp $ +|| $Id: iso2022.c,v 1.45 2007/12/28 13:36:16 nilsson Exp $ */ #ifdef HAVE_CONFIG_H @@ -1494,7 +1494,7 @@ void iso2022_init(void) set_init_callback(init_stor); set_exit_callback(exit_stor); add_program_constant("ISO2022Dec", iso2022dec_program = end_program(), - ID_STATIC|ID_NOMASK); + ID_STATIC|ID_FINAL); start_new_program(); ADD_STORAGE(struct iso2022enc_stor); @@ -1513,7 +1513,7 @@ void iso2022_init(void) set_init_callback(init_enc_stor); set_exit_callback(exit_enc_stor); add_program_constant("ISO2022Enc", iso2022enc_program = end_program(), - ID_STATIC|ID_NOMASK); + ID_STATIC|ID_FINAL); } void iso2022_exit(void) diff --git a/src/program.c b/src/program.c index 729bea46fb9bbe9a491a81610c23c84874c67e6f..955e72294a2da6fb1f6c8b554660be49818a0477 100644 --- a/src/program.c +++ b/src/program.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: program.c,v 1.631 2007/11/15 17:41:52 grubba Exp $ +|| $Id: program.c,v 1.632 2007/12/28 13:38:15 nilsson Exp $ */ #include "global.h" @@ -2226,8 +2226,8 @@ void fixate_program(void) { for(i=0;i<(int)p->num_identifier_references;i++) { - if((p->identifier_references[i].id_flags & (ID_NOMASK|ID_HIDDEN)) == - ID_NOMASK) + if((p->identifier_references[i].id_flags & (ID_FINAL|ID_HIDDEN)) == + ID_FINAL) { struct pike_string *name=ID_FROM_INT(p, i)->name; @@ -4311,7 +4311,7 @@ PMOD_EXPORT void low_inherit(struct program *p, name=ID_FROM_PTR(p,&fun)->name; fun.inherit_offset += inherit_offset; - if (fun.id_flags & ID_NOMASK) + if (fun.id_flags & ID_FINAL) { Pike_compiler->flags |= COMPILATION_CHECK_FINAL; } @@ -4609,8 +4609,8 @@ PMOD_EXPORT int define_alias(struct pike_string *name, struct pike_type *type, } if (!(IDENTIFIERP(n)->id_flags & ID_EXTERN)) { - if (IDENTIFIERP(n)->id_flags & ID_NOMASK) - my_yyerror("Illegal to redefine 'nomask/final' " + if (IDENTIFIERP(n)->id_flags & ID_FINAL) + my_yyerror("Illegal to redefine 'final' " "variable/functions %S", name); /* FIXME: More. */ @@ -4784,8 +4784,8 @@ int define_variable(struct pike_string *name, } if (!(IDENTIFIERP(n)->id_flags & ID_EXTERN)) { - if (IDENTIFIERP(n)->id_flags & ID_NOMASK) - my_yyerror("Illegal to redefine 'nomask/final' " + if (IDENTIFIERP(n)->id_flags & ID_FINAL) + my_yyerror("Illegal to redefine 'final' " "variable/functions %S", name); if(!(IDENTIFIERP(n)->id_flags & ID_INLINE) || @@ -5075,8 +5075,8 @@ PMOD_EXPORT int add_constant(struct pike_string *name, { int overridden; - if(IDENTIFIERP(n)->id_flags & ID_NOMASK) - my_yyerror("Illegal to redefine 'nomask' identifier %S", name); + if(IDENTIFIERP(n)->id_flags & ID_FINAL) + my_yyerror("Illegal to redefine 'final' identifier %S", name); if(!TEST_COMPAT(7,2) && IDENTIFIER_IS_VARIABLE(ID_FROM_INT(Pike_compiler->new_program, @@ -5495,13 +5495,13 @@ INT32 define_function(struct pike_string *name, compilation_depth, " "); #endif - if((ref.id_flags & ID_NOMASK) + if((ref.id_flags & ID_FINAL) #if 0 && !(funp->func.offset == -1) #endif ) { - my_yyerror("Illegal to redefine 'nomask' function %S.", name); + my_yyerror("Illegal to redefine 'final' function %S.", name); } diff --git a/src/program.h b/src/program.h index 3bfa46085cc5c6ac35241057859714b6a00bb484..03ea246d943f4b11b59bce6e2ead4eb4fe3a5e8d 100644 --- a/src/program.h +++ b/src/program.h @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: program.h,v 1.235 2007/10/11 15:45:16 grubba Exp $ +|| $Id: program.h,v 1.236 2007/12/28 13:38:16 nilsson Exp $ */ #ifndef PROGRAM_H @@ -293,7 +293,7 @@ struct program_constant #define ID_STATIC 0x01 /* Symbol is not visible by indexing */ #define ID_PRIVATE 0x02 /* Symbol is not visible by inherit */ #define ID_FINAL 0x04 /* Symbol may not be overloaded */ -#define ID_NOMASK 0x04 /* Symbol may not be overloaded */ +#define ID_NOMASK 0x04 /* Symbol may not be overloaded (deprecated) */ #define ID_PUBLIC 0x08 /* Anti private */ #define ID_USED 0x10 /* This reference has been used. Check * that the type is compatible when