Author: fperrad
Date: Wed Dec 10 07:08:44 2008
New Revision: 33763
Modified:
trunk/languages/jako/lib/Jako/Construct/Declaration/Variable.pm
trunk/languages/jako/lib/Jako/Construct/Expression/Call.pm
trunk/languages/jako/lib/Jako/Construct/Expression/Value/Identifier.pm
trunk/languages/jako/lib/Jako/Construct/Statement/Arithmetic.pm
trunk/languages/jako/lib/Jako/Construct/Statement/Assign.pm
trunk/languages/jako/lib/Jako/Construct/Statement/Concat.pm
trunk/languages/jako/lib/Jako/Construct/Statement/Decrement.pm
trunk/languages/jako/lib/Jako/Construct/Statement/Increment.pm
Log:
[Jako] global
- update PIR generation with get/set_global
Modified: trunk/languages/jako/lib/Jako/Construct/Declaration/Variable.pm
==============================================================================
--- trunk/languages/jako/lib/Jako/Construct/Declaration/Variable.pm
(original)
+++ trunk/languages/jako/lib/Jako/Construct/Declaration/Variable.pm Wed Dec
10 07:08:44 2008
@@ -144,7 +144,7 @@
my $reg = $compiler->temp_pmc();
$compiler->emit(" $reg = new '$pmc_type'");
- $compiler->emit(" global \"$name\" = $reg");
+ $compiler->emit(" set_global \"$name\", $reg");
}
else {
$compiler->emit(" .local $type $name");
Modified: trunk/languages/jako/lib/Jako/Construct/Expression/Call.pm
==============================================================================
--- trunk/languages/jako/lib/Jako/Construct/Expression/Call.pm (original)
+++ trunk/languages/jako/lib/Jako/Construct/Expression/Call.pm Wed Dec 10
07:08:44 2008
@@ -158,7 +158,7 @@
$compiler->emit(" $temp_pmc = $dest");
my $dest_name = $dest_ident->value;
- $compiler->emit(" global \"$dest_name\" = $temp_pmc");
+ $compiler->emit(" set_global \"$dest_name\", $temp_pmc");
}
return 1;
Modified: trunk/languages/jako/lib/Jako/Construct/Expression/Value/Identifier.pm
==============================================================================
--- trunk/languages/jako/lib/Jako/Construct/Expression/Value/Identifier.pm
(original)
+++ trunk/languages/jako/lib/Jako/Construct/Expression/Value/Identifier.pm
Wed Dec 10 07:08:44 2008
@@ -67,7 +67,7 @@
my $temp_pmc = $compiler->temp_pmc();
$compiler->emit(" $temp_pmc = new '$pmc_type'");
- $compiler->emit(" $temp_pmc = global \"$ident_name\"");
+ $compiler->emit(" $temp_pmc = get_global \"$ident_name\"");
$compiler->emit(" $temp_reg = $temp_pmc");
return $temp_reg;
Modified: trunk/languages/jako/lib/Jako/Construct/Statement/Arithmetic.pm
==============================================================================
--- trunk/languages/jako/lib/Jako/Construct/Statement/Arithmetic.pm
(original)
+++ trunk/languages/jako/lib/Jako/Construct/Statement/Arithmetic.pm Wed Dec
10 07:08:44 2008
@@ -164,7 +164,7 @@
$compiler->emit(" $pmc_reg = new '$pmc_type'");
$compiler->emit(" $pmc_reg = $dest");
- $compiler->emit(" global \"$dest_name\" = $pmc_reg");
+ $compiler->emit(" set_global \"$dest_name\", $pmc_reg");
}
return 1;
Modified: trunk/languages/jako/lib/Jako/Construct/Statement/Assign.pm
==============================================================================
--- trunk/languages/jako/lib/Jako/Construct/Statement/Assign.pm (original)
+++ trunk/languages/jako/lib/Jako/Construct/Statement/Assign.pm Wed Dec 10
07:08:44 2008
@@ -60,7 +60,7 @@
$compiler->emit(" $temp_pmc = new '$pmc_type'");
$compiler->emit(" $temp_pmc = $right");
- $compiler->emit(" global \"$left\" = $temp_pmc");
+ $compiler->emit(" set_global \"$left\", $temp_pmc");
}
else {
$compiler->emit(" $left = $right");
Modified: trunk/languages/jako/lib/Jako/Construct/Statement/Concat.pm
==============================================================================
--- trunk/languages/jako/lib/Jako/Construct/Statement/Concat.pm (original)
+++ trunk/languages/jako/lib/Jako/Construct/Statement/Concat.pm Wed Dec 10
07:08:44 2008
@@ -113,7 +113,7 @@
$compiler->emit(" $pmc_reg = new '$pmc_type'");
$compiler->emit(" $pmc_reg = $dest");
- $compiler->emit(" global \"$dest_name\" = $pmc_reg");
+ $compiler->emit(" set_global \"$dest_name\", $pmc_reg");
}
return 1;
Modified: trunk/languages/jako/lib/Jako/Construct/Statement/Decrement.pm
==============================================================================
--- trunk/languages/jako/lib/Jako/Construct/Statement/Decrement.pm
(original)
+++ trunk/languages/jako/lib/Jako/Construct/Statement/Decrement.pm Wed Dec
10 07:08:44 2008
@@ -57,7 +57,7 @@
my $pmc_reg = $compiler->temp_pmc();
$compiler->emit(" $pmc_reg = new '$pmc_type'");
$compiler->emit(" $pmc_reg = $ident");
- $compiler->emit(" global \"$ident_name\" = $pmc_reg");
+ $compiler->emit(" set_global \"$ident_name\", $pmc_reg");
}
return 1;
Modified: trunk/languages/jako/lib/Jako/Construct/Statement/Increment.pm
==============================================================================
--- trunk/languages/jako/lib/Jako/Construct/Statement/Increment.pm
(original)
+++ trunk/languages/jako/lib/Jako/Construct/Statement/Increment.pm Wed Dec
10 07:08:44 2008
@@ -57,7 +57,7 @@
my $pmc_reg = $compiler->temp_pmc();
$compiler->emit(" $pmc_reg = new '$pmc_type'");
$compiler->emit(" $pmc_reg = $ident");
- $compiler->emit(" global \"$ident_name\" = $pmc_reg");
+ $compiler->emit(" set_global \"$ident_name\", $pmc_reg");
}
return 1;