eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Comanche::SimulatedSqueakBlock':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: SimulatedSqueakBlock (in Comanche)


Inheritance:

   Object
   |
   +--Comanche::SimulatedSqueakBlock

Package:
stx:goodies/webServer/comanche
Category:
Net-Communication-HTTP-Comanche-Swiki-STX-Support
Version:
rev: 1.15 date: 2018/04/26 10:48:36
user: cg
file: SimulatedSqueakBlock.st directory: goodies/webServer/comanche
module: stx stc-classLibrary: comanche

Class protocol:

mimicri
o  wrapIfBlock: anObject


Instance protocol:

accessing
o  realBlock
return the value of the instance variable 'realBlock' (automatically generated)

o  realBlock: something
set the value of the instance variable 'realBlock' (automatically generated)

o  source
return the value of the instance variable 'source' (automatically generated)

o  source: something
set the value of the instance variable 'source' (automatically generated)

evaluation
o  value
(comment from inherited method)
return the receiver itself.
This allows every object to be used where blocks or valueHolders
are typically used, and allows for valueHolders and blocks to be
used interchangably in some situations.

Time will show, if this is a good idea or leads to sloppy programming
style ... (the idea was borrowed from the Self language).

WARNING: don't 'optimize' away ifXXX: blocks
(i.e. do NOT replace
foo ifTrue:[var1] ifFalse:[var2]
by:
foo ifTrue:var1 ifFalse:var2
)
- the compilers will only generate inline code for the if,
iff the argument(s) are blocks - otherwise, a true send is
generated.
This 'optimization' will work semantically correct,
but execute SLOWER instead.

Using constants (foo ifTrue:1 ifFalse:2) does not introduce a performance penalty.

o  value: arg1

o  value: arg1 value: arg2

o  value: arg1 value: arg2 value: arg3

o  value: arg1 value: arg2 value: arg3 value: arg4

o  valueWithArguments: args

mimicry
o  copy

o  fixTemps

o  isBlock

wrapping
o  wrapIfBlock: anObject



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 15:44:36 GMT