Changeset 2299
- Timestamp:
- 03/05/10 04:41:04 (2 years ago)
- Location:
- cobra/trunk
- Files:
-
- 1 added
- 9 modified
-
Developer/IntermediateReleaseNotes.text (modified) (1 diff)
-
Source/Attributes.cobra (modified) (1 diff)
-
Source/Boxes.cobra (modified) (8 diffs)
-
Source/CobraParser.cobra (modified) (2 diffs)
-
Source/Container.cobra (modified) (1 diff)
-
Source/DocGenerator.cobra (modified) (1 diff)
-
Source/Members.cobra (modified) (6 diffs)
-
Source/NameSpace.cobra (modified) (1 diff)
-
Source/Property.cobra (modified) (2 diffs)
-
Tests/220-delegates-etc/100-delegates/160-begin-end-invoke.cobra (added)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Developer/IntermediateReleaseNotes.text
r2295 r2299 436 436 437 437 * Fixed: Cannot instantiate generic params under some circumstances. 438 439 * Fixed: Cobra compile failure on delegates calling .(begin|end)Invoke. ticket:196 -
cobra/trunk/Source/Attributes.cobra
r2298 r2299 107 107 return true 108 108 109 get isNames as List<of String>109 get isNames as IList<of String> 110 110 return List<of String>() 111 111 -
cobra/trunk/Source/Boxes.cobra
r2282 r2299 41 41 """ 42 42 43 cue init(token as IToken, idToken as IToken, name as String, paramList as List<of IType>, isNames as List<of String>, attribs as AttributeList, baseInterfaceNodes as List<of ITypeProxy>, docString as String?)43 cue init(token as IToken, idToken as IToken, name as String, paramList as List<of IType>, isNames as IList<of String>, attribs as AttributeList, baseInterfaceNodes as List<of ITypeProxy>, docString as String?) 44 44 base.init(token, name, isNames, docString) 45 45 _idToken = idToken … … 1110 1110 var _addsProxies as List<of ITypeProxy> 1111 1111 1112 cue init(token as IToken, idToken as IToken, name as String, paramList as List<of IType>, isNames as List<of String>, attribs as AttributeList, implementsNodes as List<of ITypeProxy>, addsProxies as List<of ITypeProxy>, docString as String?)1112 cue init(token as IToken, idToken as IToken, name as String, paramList as List<of IType>, isNames as IList<of String>, attribs as AttributeList, implementsNodes as List<of ITypeProxy>, addsProxies as List<of ITypeProxy>, docString as String?) 1113 1113 base.init(token, idToken, name, paramList, isNames, attribs, implementsNodes, docString) 1114 1114 _addsProxies = addsProxies … … 1162 1162 var _subclasses = List<of Class>() 1163 1163 1164 cue init(token as IToken, idToken as IToken, name as String, paramList as List<of IType>, isNames as List<of String>, attribs as AttributeList, baseNode as ITypeProxy?, implementsNodes as List<of ITypeProxy>, addsProxies as List<of ITypeProxy>, docString as String?)1164 cue init(token as IToken, idToken as IToken, name as String, paramList as List<of IType>, isNames as IList<of String>, attribs as AttributeList, baseNode as ITypeProxy?, implementsNodes as List<of ITypeProxy>, addsProxies as List<of ITypeProxy>, docString as String?) 1165 1165 base.init(token, idToken, name, paramList, isNames, attribs, implementsNodes, addsProxies, docString) 1166 1166 _baseNode = baseNode … … 1317 1317 # because we need them for class, struct and mixin, but not for interfaces. Awesome! :-) 1318 1318 1319 cue init(token as IToken, idToken as IToken, name as String, paramList as List<of IType>, isNames as List<of String>, attribs as AttributeList, baseNode as ITypeProxy?, implementsNodes as List<of ITypeProxy>, addsProxies as List<of ITypeProxy>, docString as String?)1319 cue init(token as IToken, idToken as IToken, name as String, paramList as List<of IType>, isNames as IList<of String>, attribs as AttributeList, baseNode as ITypeProxy?, implementsNodes as List<of ITypeProxy>, addsProxies as List<of ITypeProxy>, docString as String?) 1320 1320 base.init(token, idToken, name, paramList, isNames, attribs, implementsNodes, docString) 1321 1321 # there are restrictions on mixins which may be relaxed in the future … … 1369 1369 inherits Box 1370 1370 1371 cue init(token as IToken, idToken as IToken, name as String, paramList as List<of IType>, isNames as List<of String>, attribs as AttributeList, baseNodes as List<of ITypeProxy>, docString as String?)1371 cue init(token as IToken, idToken as IToken, name as String, paramList as List<of IType>, isNames as IList<of String>, attribs as AttributeList, baseNodes as List<of ITypeProxy>, docString as String?) 1372 1372 base.init(token, idToken, name, paramList, isNames, attribs, baseNodes, docString) 1373 1373 … … 1408 1408 inherits ClassOrStruct 1409 1409 1410 cue init(token as IToken, idToken as IToken, name as String, paramList as List<of IType>, isNames as List<of String>, attribs as AttributeList, baseName as String?, interfaceNodes as List<of ITypeProxy>, addsProxies as List<of ITypeProxy>, docString as String?)1410 cue init(token as IToken, idToken as IToken, name as String, paramList as List<of IType>, isNames as IList<of String>, attribs as AttributeList, baseName as String?, interfaceNodes as List<of ITypeProxy>, addsProxies as List<of ITypeProxy>, docString as String?) 1411 1411 base.init(token, idToken, name, paramList, isNames, attribs, interfaceNodes, addsProxies, docString) 1412 1412 … … 1490 1490 1491 1491 def _bindInt 1492 m = Method(.token, .token, this, 'invoke', List<of Param>(.params), .returnType ? .returnTypeProxy, nil, List<of String>(.isNames), AttributeList(), '') 1493 m.statements.add(ThrowStmt(.token, PostCallExpr(.token, IdentifierExpr(.token, 'Exception'), List<of Expr>()))) # just to avoid a Cobra warning during .bindImp 1494 .addDecl(m) 1492 returnType as ITypeProxy = .returnType ? .returnTypeProxy 1493 .addDecl(_makeMethod('invoke', .params.clone, returnType)) 1494 # dynamic type vari length param in list as placeholder for multiple params 1495 params = [Param('vParam', VariTypeIdentifier(.token, TypeIdentifier(.token, DynamicType())))] 1496 .addDecl(_makeMethod('beginInvoke', params, TypeIdentifier(.token.copy('ID', 'IAsyncResult')) to ITypeProxy)) 1497 .addDecl(_makeMethod('endInvoke', params, returnType )) 1495 1498 base._bindInt 1496 1499 for param in .params … … 1502 1505 pass 1503 1506 1504 1507 def _makeMethod(name as String, params as IList<of Param>, returnTypeProxy as ITypeProxy) as Method 1508 m = Method(.token, .token, this, name, params, returnTypeProxy, nil, .isNames.clone, AttributeList(), '') 1509 # method body just to avoid a Cobra warning during .bindImp 1510 m.statements.add(ThrowStmt(.token, PostCallExpr(.token, IdentifierExpr(.token, 'Exception'), List<of Expr>()))) 1511 return m 1512 1505 1513 class GenericParam inherits CobraType is partial 1506 1514 """ -
cobra/trunk/Source/CobraParser.cobra
r2244 r2299 3637 3637 """ 3638 3638 3639 cue init(isNames as List<of String>, attributes as AttributeList, inheritsProxies as List<of ITypeProxy>, implementsProxies as List<of ITypeProxy>, addsProxies as List<of ITypeProxy>)3639 cue init(isNames as IList<of String>, attributes as AttributeList, inheritsProxies as List<of ITypeProxy>, implementsProxies as List<of ITypeProxy>, addsProxies as List<of ITypeProxy>) 3640 3640 base.init 3641 3641 _isNames = isNames … … 3645 3645 _addsProxies = addsProxies 3646 3646 3647 get isNames from var as List<of String>3647 get isNames from var as IList<of String> 3648 3648 3649 3649 get attributes from var as AttributeList -
cobra/trunk/Source/Container.cobra
r2207 r2299 85 85 var _declsByNameCI as Dictionary<of String, TMember> 86 86 var _docString as String 87 var _isNames as List<of String>88 89 cue init(token as IToken, name as String, isNames as List<of String>, docString as String?)87 var _isNames as IList<of String> 88 89 cue init(token as IToken, name as String, isNames as IList<of String>, docString as String?) 90 90 .init(nil, token, name, isNames, docString) 91 91 92 cue init(parent as IParentSpace?, token as IToken, name as String, isNames as List<of String>, docString as String?)92 cue init(parent as IParentSpace?, token as IToken, name as String, isNames as IList<of String>, docString as String?) 93 93 base.init(token, name) 94 94 _initParent(parent) -
cobra/trunk/Source/DocGenerator.cobra
r2218 r2299 265 265 .writeIsNames(box.isNames) 266 266 267 def writeIsNames(isNames as List<of String>)267 def writeIsNames(isNames as IList<of String>) 268 268 if isNames.count 269 269 .write('is ') -
cobra/trunk/Source/Members.cobra
r2279 r2299 34 34 var _parentBox as Box 35 35 var _docString as String? 36 var _isNames as List<of String>?36 var _isNames as IList<of String>? 37 37 var _attribs as AttributeList 38 38 var _overloadGroup as MemberOverload? … … 43 43 var _binaryName as String? 44 44 45 cue init(token as IToken, idToken as IToken, parentBox as Box, name as String, isNames as List<of String>, attribs as AttributeList)45 cue init(token as IToken, idToken as IToken, parentBox as Box, name as String, isNames as IList<of String>, attribs as AttributeList) 46 46 .init(token, idToken, parentBox, name, isNames, attribs, nil) 47 47 48 cue init(token as IToken, idToken as IToken, parentBox as Box, name as String, isNames as List<of String>, attribs as AttributeList, docString as String?)48 cue init(token as IToken, idToken as IToken, parentBox as Box, name as String, isNames as IList<of String>, attribs as AttributeList, docString as String?) 49 49 base.init(idToken, name) 50 50 _idToken = idToken … … 655 655 var _isCompilerGenerated as bool 656 656 657 cue init(token as IToken, idToken as IToken, box as Box, parentMethod as AbstractMethod?, name as String, paramsList as List<of Param>, isNames asList<of String>, attribs as AttributeList, docString as String)657 cue init(token as IToken, idToken as IToken, box as Box, parentMethod as AbstractMethod?, name as String, paramsList as IList<of Param>, isNames as IList<of String>, attribs as AttributeList, docString as String) 658 658 base.init(token, idToken, box, name, isNames, attribs, docString) 659 659 _parentMethod = parentMethod 660 _params = paramsList660 _params = List<of Param>(paramsList) 661 661 _oldExprs = List<of OldExpr>() 662 662 _locals = List<of LocalVar>() … … 1023 1023 var _implementsType as IType? 1024 1024 1025 cue init(token as IToken, idToken as IToken, box as Box, name as String, paramsList as List<of Param>, returnTypeNode as ITypeProxy, implementsTypeNode as ITypeProxy?, isNames asList<of String>, attribs as AttributeList, docString as String)1025 cue init(token as IToken, idToken as IToken, box as Box, name as String, paramsList as IList<of Param>, returnTypeNode as ITypeProxy, implementsTypeNode as ITypeProxy?, isNames as IList<of String>, attribs as AttributeList, docString as String) 1026 1026 .init(token, idToken, box, name, List<of IType>(), paramsList, returnTypeNode, implementsTypeNode, isNames, attribs, docString) 1027 1027 1028 cue init(token as IToken, idToken as IToken, box as Box, name as String, genericParams as List<of IType>, paramsList as List<of Param>, returnTypeNode as ITypeProxy, implementsTypeNode as ITypeProxy?, isNames asList<of String>, attribs as AttributeList, docString as String)1028 cue init(token as IToken, idToken as IToken, box as Box, name as String, genericParams as List<of IType>, paramsList as IList<of Param>, returnTypeNode as ITypeProxy, implementsTypeNode as ITypeProxy?, isNames as IList<of String>, attribs as AttributeList, docString as String) 1029 1029 base.init(token, idToken, box, nil, name, paramsList, isNames, attribs, docString) 1030 1030 _genericParams = genericParams … … 1219 1219 var _returnTypeNode as ITypeProxy? 1220 1220 1221 cue init(token as IToken, idToken as IToken, box as Box, name as String, isNames as List<of String>, attribs as AttributeList, docString as String?)1221 cue init(token as IToken, idToken as IToken, box as Box, name as String, isNames as IList<of String>, attribs as AttributeList, docString as String?) 1222 1222 base.init(token, idToken, box, name, isNames, attribs, docString) 1223 1223 1224 cue init(token as IToken, idToken as IToken, box as Box, name as String, returnTypeOrNode as INode, isNames as List<of String>, attribs as AttributeList, docString as String)1224 cue init(token as IToken, idToken as IToken, box as Box, name as String, returnTypeOrNode as INode, isNames as IList<of String>, attribs as AttributeList, docString as String) 1225 1225 .init(token, idToken, box, name, isNames, attribs, docString) 1226 1226 if returnTypeOrNode inherits IType … … 1338 1338 get xetPartName as String is abstract 1339 1339 1340 get isNames as List<of String>? is override1340 get isNames as IList<of String>? is override 1341 1341 # may need to get more sophisticated here if, in the future, we support C#'s somewhat recent ability to put access modifiers on just the set or get part of a property 1342 1342 return _parent.isNames -
cobra/trunk/Source/NameSpace.cobra
r2207 r2299 8 8 def extensionMemberFor(box as Box, name as String) as IMember? 9 9 get isFromBinaryLibrary as bool 10 get isNames as List<of String>10 get isNames as IList<of String> 11 11 12 12 -
cobra/trunk/Source/Property.cobra
r2006 r2299 3 3 inherits ProperDexer 4 4 5 cue init(token as IToken, idToken as IToken, box as Box, name as String, isNames as List<of String>, attribs as AttributeList, coverVar as BoxVar, coverAccess as String, docString as String)5 cue init(token as IToken, idToken as IToken, box as Box, name as String, isNames as IList<of String>, attribs as AttributeList, coverVar as BoxVar, coverAccess as String, docString as String) 6 6 base.init(token, idToken, box, name, isNames, attribs, docString) 7 7 _coverVar = coverVar … … 9 9 _isNames = isNames 10 10 11 cue init(token as IToken, idToken as IToken, box as Box, name as String, returnTypeOrNode as INode, isNames as List<of String>, attribs as AttributeList, docString as String)11 cue init(token as IToken, idToken as IToken, box as Box, name as String, returnTypeOrNode as INode, isNames as IList<of String>, attribs as AttributeList, docString as String) 12 12 base.init(token, idToken, box, name, returnTypeOrNode, isNames, attribs, docString) 13 13



