[Bps-public-commit] r13881 - in Lorzy/trunk: . lib/Lorzy/Expression lib/Lorzy/Lambda

sartak at bestpractical.com sartak at bestpractical.com
Tue Jul 8 15:57:39 EDT 2008


Author: sartak
Date: Tue Jul  8 15:57:38 2008
New Revision: 13881

Modified:
   Lorzy/trunk/   (props changed)
   Lorzy/trunk/lib/Lorzy/Block.pm
   Lorzy/trunk/lib/Lorzy/Builder.pm
   Lorzy/trunk/lib/Lorzy/Evaluatable.pm
   Lorzy/trunk/lib/Lorzy/Evaluator.pm
   Lorzy/trunk/lib/Lorzy/EvaluatorResult.pm
   Lorzy/trunk/lib/Lorzy/Expression.pm
   Lorzy/trunk/lib/Lorzy/Expression/False.pm
   Lorzy/trunk/lib/Lorzy/Expression/ForEach.pm
   Lorzy/trunk/lib/Lorzy/Expression/IfThen.pm
   Lorzy/trunk/lib/Lorzy/Expression/Let.pm
   Lorzy/trunk/lib/Lorzy/Expression/List.pm
   Lorzy/trunk/lib/Lorzy/Expression/ProgN.pm
   Lorzy/trunk/lib/Lorzy/Expression/String.pm
   Lorzy/trunk/lib/Lorzy/Expression/Symbol.pm
   Lorzy/trunk/lib/Lorzy/Expression/True.pm
   Lorzy/trunk/lib/Lorzy/FunctionArgument.pm
   Lorzy/trunk/lib/Lorzy/Lambda.pm
   Lorzy/trunk/lib/Lorzy/Lambda/Native.pm

Log:
 r63868 at onn:  sartak | 2008-07-08 15:57:25 -0400
 Unimport Moose sugar (so $obj->extends throws an error instead of replacing @ISA) and make immutable to speed up runtime by memoizing and inlining certain meta-level calls


Modified: Lorzy/trunk/lib/Lorzy/Block.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Block.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Block.pm	Tue Jul  8 15:57:38 2008
@@ -49,5 +49,7 @@
     }
 }
 
+no Moose::Role;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/Builder.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Builder.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Builder.pm	Tue Jul  8 15:57:38 2008
@@ -61,5 +61,8 @@
     );
 }
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/Evaluatable.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Evaluatable.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Evaluatable.pm	Tue Jul  8 15:57:38 2008
@@ -3,5 +3,7 @@
 
 requires 'evaluate';
 
+no Moose::Role;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/Evaluator.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Evaluator.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Evaluator.pm	Tue Jul  8 15:57:38 2008
@@ -170,5 +170,8 @@
     };
 }
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/EvaluatorResult.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/EvaluatorResult.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/EvaluatorResult.pm	Tue Jul  8 15:57:38 2008
@@ -15,5 +15,8 @@
 #   isa => 'Str | Undef | Lorzy::EvaluatorResult::RunTime',
 );
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/Expression.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Expression.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Expression.pm	Tue Jul  8 15:57:38 2008
@@ -35,5 +35,8 @@
 # force loading of each expression subclass
 __PACKAGE__->expression_types;
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/Expression/False.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Expression/False.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Expression/False.pm	Tue Jul  8 15:57:38 2008
@@ -4,5 +4,8 @@
 
 sub evaluate { 0 }
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/Expression/ForEach.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Expression/ForEach.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Expression/ForEach.pm	Tue Jul  8 15:57:38 2008
@@ -38,5 +38,8 @@
     }
 }
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/Expression/IfThen.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Expression/IfThen.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Expression/IfThen.pm	Tue Jul  8 15:57:38 2008
@@ -39,5 +39,8 @@
     }
 }
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/Expression/Let.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Expression/Let.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Expression/Let.pm	Tue Jul  8 15:57:38 2008
@@ -47,5 +47,8 @@
     $self->lambda->apply($evaluator, $self->bindings);
 }
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/Expression/List.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Expression/List.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Expression/List.pm	Tue Jul  8 15:57:38 2008
@@ -7,5 +7,8 @@
     return bless \$self->nodes, 'Lorzy::EvaluatorResult::RunTime';
 }
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/Expression/ProgN.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Expression/ProgN.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Expression/ProgN.pm	Tue Jul  8 15:57:38 2008
@@ -33,5 +33,8 @@
     return $res;
 }
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/Expression/String.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Expression/String.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Expression/String.pm	Tue Jul  8 15:57:38 2008
@@ -31,5 +31,8 @@
     return $self->args->{'value'};
 }
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/Expression/Symbol.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Expression/Symbol.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Expression/Symbol.pm	Tue Jul  8 15:57:38 2008
@@ -31,5 +31,8 @@
          : $result; # XXX: figure out evaluation order here
 }
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/Expression/True.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Expression/True.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Expression/True.pm	Tue Jul  8 15:57:38 2008
@@ -11,5 +11,8 @@
 
 sub evaluate { 1 }
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/FunctionArgument.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/FunctionArgument.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/FunctionArgument.pm	Tue Jul  8 15:57:38 2008
@@ -16,4 +16,7 @@
     isa => 'Str | Undef',
 );
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;

Modified: Lorzy/trunk/lib/Lorzy/Lambda.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Lambda.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Lambda.pm	Tue Jul  8 15:57:38 2008
@@ -65,5 +65,8 @@
     return $res;
 }
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 

Modified: Lorzy/trunk/lib/Lorzy/Lambda/Native.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Lambda/Native.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Lambda/Native.pm	Tue Jul  8 15:57:38 2008
@@ -15,5 +15,8 @@
     return $r;
 }
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
 1;
 



More information about the Bps-public-commit mailing list