Changeset 4532 for trunk/compiler
- Timestamp:
- 10/22/08 17:38:04 (3 months ago)
- Files:
-
- 1 modified
-
trunk/compiler/logtalk.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/compiler/logtalk.pl
r4531 r4532 4233 4233 4234 4234 4235 % '$lgt_check_redefined_entities' 4235 % '$lgt_check_redefined_entities'(+atom) 4236 4236 % 4237 4237 % check and print a warning for all entities that are about to be redefined; … … 4243 4243 ; '$lgt_pp_file_rclause_'('$lgt_current_object_'(Entity, _, _, _, _, _, _, _, _, _, _)) 4244 4244 ), 4245 '$lgt_redefined_entity'(Entity, Type ),4246 '$lgt_report_redefined_entity'(Type, Entity ),4245 '$lgt_redefined_entity'(Entity, Type, File), 4246 '$lgt_report_redefined_entity'(Type, Entity, File), 4247 4247 '$lgt_retract_old_runtime_clauses'(Entity), 4248 4248 fail. … … 4252 4252 4253 4253 4254 % '$lgt_redefined_entity'( @entity_identifier, -atom)4254 % '$lgt_redefined_entity'(+atom, @entity_identifier, -atom, -atom) 4255 4255 % 4256 4256 % true if an entity of the same name is already loaded; returns entity type 4257 4257 4258 '$lgt_redefined_entity'(Entity, Type ) :-4258 '$lgt_redefined_entity'(Entity, Type, File) :- 4259 4259 ( '$lgt_current_object_'(Entity, _, _, _, _, _, _, _, _, _, _) -> 4260 4260 Type = object … … 4263 4263 ; '$lgt_current_category_'(Entity, _, _, _, _, _) -> 4264 4264 Type = category 4265 ), 4266 ( '$lgt_entity_property_'(Entity, file(OldBase, OldPath)), 4267 '$lgt_pp_file_rclause_'('$lgt_entity_property_'(Entity, file(NewBase, NewPath))), 4268 (OldPath \== NewPath; OldBase \== NewBase) -> 4269 atom_concat(OldPath, OldBase, File) 4270 ; File = nil 4265 4271 ). 4266 4272 … … 4271 4277 % prints a warning for redefined entities 4272 4278 4273 '$lgt_report_redefined_entity'(Type, Entity ) :-4279 '$lgt_report_redefined_entity'(Type, Entity, File) :- 4274 4280 ( '$lgt_compiler_flag'(report, on) -> 4275 4281 '$lgt_inc_load_warnings_counter', 4276 4282 write(' WARNING! Redefining '), write(Type), write(' '), 4277 current_output(Output), '$lgt_pretty_print_vars_quoted'(Output, Entity), nl 4283 current_output(Output), '$lgt_pretty_print_vars_quoted'(Output, Entity), nl, 4284 ( File == nil -> 4285 true 4286 ; write(' loaded from file '), write(File), nl 4287 ) 4278 4288 ; true 4279 4289 ).
