Changeset 1372
- Timestamp:
- 12/12/09 10:08:22 (15 years ago)
- Files:
-
- trunk/docsrc/attribute.dd (modified) (1 diff)
- trunk/docsrc/iasm.dd (modified) (2 diffs)
- trunk/docsrc/interface.dd (modified) (1 diff)
- trunk/docsrc/template.dd (modified) (1 diff)
- trunk/docsrc/version.dd (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/docsrc/attribute.dd
r1257 r1372 19 19 $(LINK2 #abstract, $(B abstract)) 20 20 $(LINK2 #const, $(B const)) 21 21 $(LINK2 #auto, $(B auto)) 22 22 $(LINK2 #scope, $(B scope)) 23 23 $(V2 $(LINK2 #gshared, $(B __gshared)) 24 24 $(LINK2 #shared, $(B shared)) 25 25 $(LINK2 #immutable, $(B immutable)) 26 26 27 27 ) 28 28 29 $(GNAME DeclarationBlock) 29 $(GNAME DeclarationBlock): 30 30 $(LINK2 module.html#DeclDef, $(I DeclDef)) 31 31 $(B { }) 32 32 $(B {) $(LINK2 module.html#DeclDefs, $(I DeclDefs)) $(B }) 33 33 ) 34 34 35 35 $(P Attributes are a way to modify one or more declarations. 36 36 The general forms are: 37 37 ) 38 38 39 39 <pre> trunk/docsrc/iasm.dd
r850 r1372 32 32 $(B db) $(I Operands) 33 33 $(B ds) $(I Operands) 34 34 $(B di) $(I Operands) 35 35 $(B dl) $(I Operands) 36 36 $(B df) $(I Operands) 37 37 $(B dd) $(I Operands) 38 38 $(B de) $(I Operands) 39 39 $(I Opcode) 40 40 $(I Opcode Operands) 41 41 42 $(GNAME Operands) 42 $(GNAME Operands): 43 43 $(I Operand) 44 44 $(I Operand) $(B ,) $(I Operands) 45 45 ) 46 46 47 47 <h2>Labels</h2> 48 48 49 49 $(P Assembler instructions can be labeled just like other statements. 50 50 They can be the target of goto statements. 51 51 For example: 52 52 ) … … 260 260 $(GNAME AsmUnaExp): 261 261 $(I AsmTypePrefix) $(I AsmExp) 262 262 $(B offsetof) $(I AsmExp) 263 263 $(B seg) $(I AsmExp) 264 264 $(B +) $(I AsmUnaExp) 265 265 $(B -) $(I AsmUnaExp) 266 266 $(B !) $(I AsmUnaExp) 267 267 $(B ~) $(I AsmUnaExp) 268 268 $(I AsmPrimaryExp) 269 269 270 $(GNAME AsmPrimaryExp) 270 $(GNAME AsmPrimaryExp): 271 271 $(I IntegerConstant) 272 272 $(I FloatConstant) 273 273 $(B __LOCAL_SIZE) 274 274 $(B $) 275 275 $(I Register) 276 276 $(I DotIdentifier) 277 277 278 $(GNAME DotIdentifier) 278 $(GNAME DotIdentifier): 279 279 $(I Identifier) 280 280 $(I Identifier) $(B .) $(I DotIdentifier) 281 281 ) 282 282 283 283 $(P The operand syntax more or less follows the Intel CPU documentation 284 284 conventions. 285 285 In particular, the convention is that for two operand instructions 286 286 the source is the right operand and the destination is the left 287 287 operand. 288 288 The syntax differs from that of Intel's in order to be compatible trunk/docsrc/interface.dd
r932 r1372 1 1 Ddoc 2 2 3 3 $(SPEC_S Interfaces, 4 4 5 5 $(GRAMMAR 6 6 $(GNAME InterfaceDeclaration): 7 7 $(B interface) $(I Identifier) $(I InterfaceBody) 8 8 $(B interface) $(I Identifier) $(B :) $(I SuperInterfaces) $(I InterfaceBody) 9 9 10 $(GNAME SuperInterfaces) 10 $(GNAME SuperInterfaces): 11 11 $(I Identifier) 12 12 $(I Identifier) $(B ,) $(I SuperInterfaces) 13 13 14 14 $(GNAME InterfaceBody): 15 15 $(B {) DeclDefs $(B }) 16 16 ) 17 17 18 18 $(P Interfaces describe a list of functions that a class that inherits 19 19 from the interface must implement. 20 20 A class that implements an interface can be converted to a reference trunk/docsrc/template.dd
r1327 r1372 11 11 ) 12 12 13 13 $(GRAMMAR 14 14 $(GNAME TemplateDeclaration): 15 15 $(B template) $(I TemplateIdentifier) $(B $(LPAREN)) $(I TemplateParameterList) $(B $(RPAREN)) $(V2 $(GLINK Constraint)$(SUB $(I opt))) 16 16 $(B {) DeclDefs $(B }) 17 17 18 18 $(GNAME TemplateIdentifier): 19 19 $(I Identifier) 20 20 21 $(GNAME TemplateParameterList) 21 $(GNAME TemplateParameterList): 22 22 $(I TemplateParameter) 23 23 $(I TemplateParameter) , $(I TemplateParameterList) 24 24 25 25 $(GNAME TemplateParameter): 26 26 $(GLINK TemplateTypeParameter) 27 27 $(GLINK TemplateValueParameter) 28 28 $(GLINK TemplateAliasParameter) 29 29 $(GLINK TemplateTupleParameter) 30 30 $(V2 31 31 $(GLINK TemplateThisParameter)) trunk/docsrc/version.dd
r1359 r1372 109 109 } 110 110 else 111 111 { 112 112 ... // use default, but slow, version 113 113 } 114 114 ------ 115 115 116 116 <h3>$(LNAME2 VersionSpecification, Version Specification)</h3> 117 117 118 118 $(GRAMMAR 119 $(GNAME VersionSpecification) 119 $(GNAME VersionSpecification): 120 120 $(B version =) $(I Identifier) $(B ;) 121 121 $(B version =) $(I Integer) $(B ;) 122 122 ) 123 123 124 124 $(P The version specification makes it straightforward to group 125 125 a set of features under one major version, for example: 126 126 ) 127 127 128 128 ------ 129 129 version (ProfessionalEdition) … … 318 318 int a, b; 319 319 debug: 320 320 int flag; 321 321 } 322 322 ------ 323 323 324 324 325 325 <h3>Debug Specification</h3> 326 326 327 327 $(GRAMMAR 328 $(GNAME DebugSpecification) 328 $(GNAME DebugSpecification): 329 329 $(B debug =) $(I Identifier) $(B ;) 330 330 $(B debug =) $(I Integer) $(B ;) 331 331 ) 332 332 333 333 $(P Debug identifiers and levels are set either by the command line switch 334 334 $(B -debug) or by a $(I DebugSpecification). 335 335 ) 336 336 337 337 $(P Debug specifications only affect the module they appear in, they 338 338 do not affect any imported modules. Debug identifiers are in their
