# See the License for the specific language governing permissions and
# limitations under the License.
-# This package introduces an optimization that removes 'get' tests when
+# This module introduces an optimization that removes 'get' tests when
# not reachable from an initializer
package remove_out_of_init_get_test
# This method will create a file and output informations about this optimization
fun dump_out_of_init_information(directory_name: String) do
- var f = new OFStream.open("{directory_name}/{module.name}.out_of_init_opt.log")
+ var f = new OFStream.open("{directory_name}/{main_module.name}.out_of_init_opt.log")
var nb_not_optimized = 0
with_each_iroutines !action(i,m) do
end
class IssetCounter
-special ICodeVisitor
+ super ICodeVisitor
readable var _nb_isset: Int = 0
redef fun visit_icode(ic)
end
class GetterTestRemover
-special ICodeVisitor
+ super ICodeVisitor
readable var _nb_optimized_isset: Int = 0
redef fun visit_icode(ic)
if ic isa IAttrIsset then
var result = ic.result
assert result != null
- var e = new INative("TAG_Bool(true)", null)
- e.is_pure = true
+ var e = new IBoolValue(true)
e.result = result
current_icode.insert_before(e)
current_icode.delete