Project

General

Profile

« Previous | Next » 

Revision f6acf47b

Added by Pierre-Loïc Garoche about 9 years ago

Plugin based framework

View differences:

src/plugins/scopes/scopes.ml
227 227
  }
228 228
    
229 229

  
230
module Plugin =
230
module Plugin : PluginType.PluginType =
231 231
struct
232 232
  let name = "scopes"
233 233
  let is_active () = 
......
250 250
  let activate () = 
251 251
    option_scopes := true;
252 252
    Options.optimization := 0; (* no optimization *)
253
    Options.salsa_enabled := false; (* No salsa *)
253
    
254
    (* Options.salsa_enabled := false; (\* No salsa *\) TODO *)
254 255
    ()
255 256

  
256 257
  let rec is_valid_path path nodename prog machines =
......
312 313

  
313 314
  let pp fmt = pp_scopes fmt !scopes_map
314 315

  
316
  let check_force_stateful () = true
317

  
318
  let refine_machine_code prog machine_code =
319
    if show_scopes () then
320
      begin
321
	let all_scopes = compute_scopes prog !Options.main_node in
322
      (* Printing scopes *)
323
      if !Options.verbose_level >= 1 then
324
	Format.printf "Possible scopes are:@   ";
325
	Format.printf "@[<v>%a@ @]@.@?" print_scopes all_scopes;
326
	exit 0
327
      end;
328
    if is_active () then
329
      process_scopes !Options.main_node prog machine_code
330
    else
331
      machine_code
332
	
333

  
334

  
335
  let c_backend_main_loop_body_suffix fmt () =
336
    if is_active () then
337
      begin
338
	Format.fprintf fmt "@ %t" pp 
339
      end;    
340
 
315 341
end
316 342
    
317 343
(* Local Variables: *)

Also available in: Unified diff