[svn:parrot] r47996 - in branches/gsoc_threads: examples/pir include/parrot runtime/parrot/include src/pmc t/pmc
mikehh at svn.parrot.org
mikehh at svn.parrot.org
Mon Jul 5 01:14:45 UTC 2010
Author: mikehh
Date: Mon Jul 5 01:14:44 2010
New Revision: 47996
URL: https://trac.parrot.org/parrot/changeset/47996
Log:
fix codetest failure - trailing whitespace
Modified:
branches/gsoc_threads/examples/pir/coop_threads.pir
branches/gsoc_threads/include/parrot/interpreter.h
branches/gsoc_threads/runtime/parrot/include/green_threads.pir
branches/gsoc_threads/src/pmc/alarm.pmc
branches/gsoc_threads/src/pmc/callback.pmc
branches/gsoc_threads/t/pmc/pmclist.t
Modified: branches/gsoc_threads/examples/pir/coop_threads.pir
==============================================================================
--- branches/gsoc_threads/examples/pir/coop_threads.pir Mon Jul 5 01:11:51 2010 (r47995)
+++ branches/gsoc_threads/examples/pir/coop_threads.pir Mon Jul 5 01:14:44 2010 (r47996)
@@ -55,7 +55,7 @@
cur_th = interpinfo .INTERPINFO_CURRENT_CONT
push ths, cur_th
-again:
+again:
next_th = shift ths
invokecc next_th
@@ -73,16 +73,16 @@
.sub th_main
.local pmc ths
-again1:
+again1:
ths = get_global 'threads'
$I0 = ths
if $I0 <= 0 goto done
th_resched()
-
+
goto again1
-done:
+done:
.end
=head1
@@ -115,12 +115,12 @@
say "sub3: Good morning"
th_resched()
-
+
$I0 = 5
$I1 = $I0 + 3
th_resched()
-
+
print "sub3: 5 + 3 = "
say $I1
@@ -137,7 +137,7 @@
$P0 = get_global 'sub3'
th_create($P0)
-
+
$P0 = get_global 'sub2'
th_create($P0)
@@ -162,7 +162,7 @@
All done
=cut
-
+
# Local Variables:
# mode: pir
# fill-column: 100
Modified: branches/gsoc_threads/include/parrot/interpreter.h
==============================================================================
--- branches/gsoc_threads/include/parrot/interpreter.h Mon Jul 5 01:11:51 2010 (r47995)
+++ branches/gsoc_threads/include/parrot/interpreter.h Mon Jul 5 01:14:44 2010 (r47996)
@@ -270,7 +270,7 @@
int current_runloop_id;
UINTVAL last_alarm; /* has an alarm triggered? */
- FLOATVAL quantum_done; /* expiration of current quantum */
+ FLOATVAL quantum_done; /* expiration of current quantum */
struct _Thread_data *thread_data; /* thread specific items */
Modified: branches/gsoc_threads/runtime/parrot/include/green_threads.pir
==============================================================================
--- branches/gsoc_threads/runtime/parrot/include/green_threads.pir Mon Jul 5 01:11:51 2010 (r47995)
+++ branches/gsoc_threads/runtime/parrot/include/green_threads.pir Mon Jul 5 01:14:44 2010 (r47996)
@@ -23,8 +23,8 @@
#=head2 gt_exit ()
#
# Exit the current green thread.
-#
-#=cut
+#
+#=cut
#
.include 'interpinfo.pasm'
@@ -50,7 +50,7 @@
$P0[5] = 0
$P0[6] = .PARROT_TIMER_RUNNING
$P0[7] = 1
-
+
$P2 = new 'Timer', $P0
set_global 'gt_resched_timer', $P2
.end
@@ -62,9 +62,9 @@
$I0 = threads
print "In gt_resched; t = "
say $I0
-
+
if $I0 <= 0 goto done
-
+
$P0 = interpinfo .INTERPINFO_CURRENT_CONT
push threads, $P0
@@ -82,7 +82,7 @@
.sub gt_spawn
.param pmc my_sub
.param pmc args :slurpy
-
+
$P0 = new 'Continuation'
set_addr $P0, run_sub
Modified: branches/gsoc_threads/src/pmc/alarm.pmc
==============================================================================
--- branches/gsoc_threads/src/pmc/alarm.pmc Mon Jul 5 01:11:51 2010 (r47995)
+++ branches/gsoc_threads/src/pmc/alarm.pmc Mon Jul 5 01:14:44 2010 (r47996)
@@ -11,7 +11,7 @@
.include 'alarm.pasm'
new P0, 'Alarm'
- set P0[.PARROT_ALARM_TIME], N_time # A FLOATVAL
+ set P0[.PARROT_ALARM_TIME], N_time # A FLOATVAL
set P0[.PARROT_ALARM_SUB], P_sub # set handler sub PMC
invoke P0 # schedule the alarm
@@ -35,7 +35,7 @@
pmclass Alarm provides invokable auto_attrs {
ATTR FLOATVAL alarm_time;
- ATTR PMC *alarm_sub;
+ ATTR PMC *alarm_sub;
/*
Modified: branches/gsoc_threads/src/pmc/callback.pmc
==============================================================================
--- branches/gsoc_threads/src/pmc/callback.pmc Mon Jul 5 01:11:51 2010 (r47995)
+++ branches/gsoc_threads/src/pmc/callback.pmc Mon Jul 5 01:14:44 2010 (r47996)
@@ -43,7 +43,7 @@
Parrot_Callback_attributes *cb_data = PARROT_CALLBACK(SELF);
PMC *user_data = cb_data->user_data;
PMC *ext_data = cb_data->external_data;
-
+
Parrot_run_callback(INTERP, user_data, ext_data);
return (opcode_t*) next;
Modified: branches/gsoc_threads/t/pmc/pmclist.t
==============================================================================
--- branches/gsoc_threads/t/pmc/pmclist.t Mon Jul 5 01:11:51 2010 (r47995)
+++ branches/gsoc_threads/t/pmc/pmclist.t Mon Jul 5 01:14:44 2010 (r47996)
@@ -1,5 +1,5 @@
#!./parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
.sub main :main
@@ -25,14 +25,14 @@
ok(0, "pop empty")
goto try_shift
-
+
pop_good:
ok(1, "pop empty")
try_shift:
$P0 = new 'PMCList'
-
+
push_eh shift_good
$P1 = pop $P0
pop_eh
@@ -49,7 +49,7 @@
.param int n
if n < 1 goto done
-
+
$P0 = new 'Integer'
$P0 = n
push a, $P0
@@ -69,7 +69,7 @@
pop_eh
$I0 = $P0
-
+
if $I0 != 5 goto fail
ok(1, "push five")
@@ -88,10 +88,10 @@
$I0 = $P0
if $I0 == 1 goto size_good
-
+
ok(0, "push two pop one")
goto try_value
-
+
size_good:
ok(1, "push two pop one")
@@ -102,8 +102,8 @@
if $I0 == 2 goto value_good
ok(0, "push two pop two")
.return()
-
-value_good:
+
+value_good:
ok(1, "push two pop two")
.end
@@ -115,15 +115,15 @@
$P1 = new 'Integer', 1
unshift $P0, $P1
-
+
$P1 = shift $P0
$I0 = $P0
if $I0 == 1 goto size_good
-
+
ok(0, "unshift shift size")
goto try_value
-
+
size_good:
ok(1, "unshift shift size")
@@ -134,8 +134,8 @@
if $I0 == 2 goto value_good
ok(0, "unshift shift value")
.return()
-
-value_good:
+
+value_good:
ok(1, "unshift shift value")
.end
@@ -154,7 +154,7 @@
if $I0 == 5 goto value_good
ok(0, "push shift")
.return()
-
+
value_good:
ok(1, "push shift")
.end
@@ -174,7 +174,7 @@
if $I0 == 5 goto value_good
ok(0, "unshift pop")
.return()
-
+
value_good:
ok(1, "unshift pop")
.end
@@ -194,27 +194,27 @@
$P1 = 9.8
$P0.'insert_by_number'($P1)
-
+
$I0 = $P0
if $I0 == 3 goto size_good
ok(0, "insert by num")
.return()
-
+
size_good:
$P2 = shift $P0
$P1 = new 'Float'
$P1 = 1.41
- eq_num $P1, $P2, shift_good
+ eq_num $P1, $P2, shift_good
ok(0, "insert by num")
.return()
-
+
shift_good:
$P2 = pop $P0
$P1 = new 'Float'
$P1 = 9.8
- eq_num $P1, $P2, pop_good
+ eq_num $P1, $P2, pop_good
ok(0, "insert by num")
.return()
More information about the parrot-commits
mailing list