search for: insantiate

Displaying 4 results from an estimated 4 matches for "insantiate".

Did you mean: instantiate
2008 Jul 23
0
[LLVMdev] CollectorRegistry
...-) Hi Simon, The compiler framework will instantiate and call into your Collector subclass automatically as required. The CollectorRegistry::Add<> instance advertises your class to the framework so it can do this. Your Collector class needs to have a default constructor in order to insantiate the Add<> template. The framework decides which Collector to use based upon the 'gc' attribute of a function: define void @f() gc "mygc" { ... } This string must correspond to the first argument to the CollectorRegistry::Add<> constructor. The second argumen...
2008 Jul 23
2
[LLVMdev] CollectorRegistry
Hey, I am a bit confused about the CollectorRegistry. I am attempting to write a garbage collector for LLVM, and the tiny example in the docs at http://llvm.org/releases/2.3/docs/GarbageCollection.html gives this line: CollectorRegistry::Add<MyCollector> X("mygc", "My bespoke garbage collector."); My question is now: Am I supposed to instantiate my collector
2006 Jun 15
3
How to mock a model method for unit tests?
I have a model class, say, model.rb, and in the normal course of things it creates an instance of another class, say utility.rb (also in the models directory). class Utility def initialize(obj) # do stuff... end def do_something_expensive # lots of stuff here end end During testing, I want to mock out do_something_expensive because it''s not important for the tests,
2009 Feb 17
4
[LLVMdev] Parametric polymorphism
I'm a newcomer to llvm, but what you've done so far is very impressive. Llvm is a godsend to anybody who is attempting to implement their own their own language. :-) My company is considering using llvm as the backend for a small matlab-like language for scientific computation; our other option is MSIL. After reading through the documentation, I noticed that llvm seems to have one major