• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision473f8b23f1f855db41672d424cd47ea7b4a7debc (tree)
Time2023-08-22 02:47:42
AuthorAlbert Mietus < albert AT mietus DOT nl >
CommiterAlbert Mietus < albert AT mietus DOT nl >

Log Message

CC_P_SimpleSieve_input now (only, set) in SimpleSieve.py

Change Summary

Incremental Difference

diff -r 4391aca2d912 -r 473f8b23f1f8 CMP_OTHER_LANGUAGES/Sieve_in_rPython/FinderClass.py
--- a/CMP_OTHER_LANGUAGES/Sieve_in_rPython/FinderClass.py Mon Aug 21 18:29:11 2023 +0200
+++ b/CMP_OTHER_LANGUAGES/Sieve_in_rPython/FinderClass.py Mon Aug 21 19:47:42 2023 +0200
@@ -5,7 +5,7 @@
55 # Hi-lock: (("@@ TRACE:?" (0 (quote ediff-fine-diff-C) prepend)))
66
77 import SimpleSieve
8-from SimpleSieve import cc_P_SimpleSieve
8+from SimpleSieve import CC_P_SimpleSieve_input #XXX
99
1010 from CC import buildin
1111 from CC import base
@@ -66,7 +66,6 @@
6666 )
6767
6868
69- CC_P_SimpleSieve_input = 6 # XXX
7069 # GAM/Note: As the methods are 'in' the CC_Finder namespace, the '*_Finder' prefix is not needed ...
7170 # ... ``CC_E_Finder__SimpleSieve_input__newPrime`` => SimpleSieve_input__newPrime
7271
@@ -91,7 +90,7 @@
9190 assert isinstance(receiver, buildin.CC_B_Component), "receiver is not CC_B_Component[aka: CC_ComponentType], but %s" % type(receiver)
9291 handlers = outport.handlers; assert handlers, "handlers shouldn't be None, nor an empty list"
9392
94- handler = handlers[self.CC_P_SimpleSieve_input] # NOTE: in handCompiled: 'signal'; now handler
93+ handler = handlers[CC_P_SimpleSieve_input] # NOTE: in handCompiled: 'signal'; now handler
9594 print ('=== TRACE SimpleSieve_input__newPrime:: handler=' + _debug.handler_name(handler))
9695
9796 # XXX REFACTOR: do not hard-code the Machinery :-)
diff -r 4391aca2d912 -r 473f8b23f1f8 CMP_OTHER_LANGUAGES/Sieve_in_rPython/SimpleSieve.py
--- a/CMP_OTHER_LANGUAGES/Sieve_in_rPython/SimpleSieve.py Mon Aug 21 18:29:11 2023 +0200
+++ b/CMP_OTHER_LANGUAGES/Sieve_in_rPython/SimpleSieve.py Mon Aug 21 19:47:42 2023 +0200
@@ -29,6 +29,7 @@
2929 In "handCompiled-C code, we use a typedef ...(..._FT)... **functionprototype**
3030 """
3131
32+CC_P_SimpleSieve_input = 6 # XXX
3233
3334 def debug():
3435 from CC import _debug
diff -r 4391aca2d912 -r 473f8b23f1f8 CMP_OTHER_LANGUAGES/Sieve_in_rPython/hack.py
--- a/CMP_OTHER_LANGUAGES/Sieve_in_rPython/hack.py Mon Aug 21 18:29:11 2023 +0200
+++ b/CMP_OTHER_LANGUAGES/Sieve_in_rPython/hack.py Mon Aug 21 19:47:42 2023 +0200
@@ -22,9 +22,10 @@
2222 called `cc_S_Finder_newPrime` (in handCompiled C).
2323 And each event in a protocol has a seqNo const; like ``CC_P_SimpleSieve_input``
2424 We fake them in here, but use them "as if".""")
25+ from SimpleSieve import CC_P_SimpleSieve_input
2526 cc_S_Finder_newPrime = [None, None, None, None, None, None, # 0-5: not relevant here
2627 f.SimpleSieve_input__newPrime ] # 6/CC_P_SimpleSieve_input
27- assert CC_Finder.CC_P_SimpleSieve_input == 6, " event should be on the correct index"
28+ assert CC_P_SimpleSieve_input == 6, " event should be on the correct index"
2829
2930 # Connect ...
3031 g.found.connection = f
@@ -33,8 +34,9 @@
3334
3435 # ... and trigger the call ...
3536 from CC import _debug
37+
3638 print("XXX HACK: calling g.SimpleSieve_input__newPrime(42) -- should trigger f's method::" +
37- _debug.handler_name(g.found.handlers[CC_Finder.CC_P_SimpleSieve_input]))
39+ _debug.handler_name(g.found.handlers[CC_P_SimpleSieve_input]))
3840
3941 try:
4042 g.SimpleSieve_input__newPrime(42)