Module: CastOff::Util
- Included in:
- CastOff, Compiler, Compiler::CodeManager, Compiler::CodeManager, Compiler::CodeManager::CompilationTarget, Compiler::Configuration, Compiler::Configuration, Compiler::Configuration::BindingWrapper, Compiler::Dependency, Compiler::Dependency, Compiler::Instruction, Compiler::Instruction::InsnInfo, Compiler::Iseq, Compiler::Iseq::Args, Compiler::MethodInformation, Compiler::SimpleIR::IR, Compiler::SimpleIR::Literal, Compiler::SimpleIR::LoopKey, Compiler::SimpleIR::Self, Compiler::SimpleIR::Stack, Compiler::SimpleIR::TmpVariable, Compiler::SimpleIR::TypeContainer, Compiler::Translator, Compiler::Translator::CFG, Compiler::Translator::CFG::Alias, Compiler::Translator::CFG::BasicBlock, Compiler::Translator::CFG::Condition, Compiler::Translator::CFG::Guards, Compiler::Translator::CFG::Information, Suggestion
- Defined in:
- lib/cast_off/util.rb
Instance Method Summary collapse
- #bug(message = nil) ⇒ Object
- #dlog(message, level = 1) ⇒ Object
- #todo(message = nil) ⇒ Object
- #vlog(message) ⇒ Object
Instance Method Details
#bug(message = nil) ⇒ Object
48 49 50 51 |
# File 'lib/cast_off/util.rb', line 48 def bug( = nil) STDERR.puts("<<< BUG #{} :#{caller[0]} >>>") bt_and_bye() end |
#dlog(message, level = 1) ⇒ Object
18 19 20 21 22 |
# File 'lib/cast_off/util.rb', line 18 def dlog(, level = 1) if level <= @@debug_level STDERR.puts() end end |
#todo(message = nil) ⇒ Object
42 43 44 45 |
# File 'lib/cast_off/util.rb', line 42 def todo( = nil) STDERR.puts("<<< TODO #{} :#{caller[0]} >>>") bt_and_bye() end |
#vlog(message) ⇒ Object
25 26 27 28 29 |
# File 'lib/cast_off/util.rb', line 25 def vlog() if @@verbose_mode || @@debug_level > 0 STDERR.puts() end end |