LanguageKit boxing fixes (add float boxing, fix selector boxing and unknown boxing)
Updated 1 year, 6 months ago
| Eric Wasylishen | Reviewers | ||
| trunk | EtoileCore | ||
| TheRaven | |||
| None | Etoile trunk (etoile/trunk/Etoile) | ||
-Add float/double boxing -Fix selector boxing. It was calling +[Symbol SymbolForCString:] with a SEL. I added a new method, +[Symbol SymbolForSelector:] (which may be redundant since there is already -initWithSelector, but it's easier to call from LLVM, I think). -Deleted a copy of Symbol.m from Smalltalk/Support (it looks like it was left there by accident) -Modify the NSRect, NSPoint, NSRange boxing to use getGlobalVariable to get the cached NSValue class rather than using Runtime->LookupClass -I'm not convinced the boxing for "unknown" types (the default: case in BoxValue) works, but it now calls CreateLoad on the NSValue class. (Not calling CreateLoad was the cause of the weird behaviour I was having.)
Included is a test case for float boxing (it didn't show up in the diff for some reason.)
Review request changed
Updated 1 year, 6 months ago (February 26th, 2009, 9:28 p.m.)
-
-Add float/double boxing -Fix selector boxing. It was calling +[Symbol SymbolForCString:] with a SEL. I added a new method, +[Symbol SymbolForSelector:] (which may be redundant since there is already -initWithSelector, but it's easier to call from LLVM, I think). One thing I'm not sure about is whether the +[Symbol SymbolForCString:] and +[Symbol SymbolForSelector:] methods should autorelease the returned Symbol - it looks they never get released right now. -Deleted a copy of Symbol.m from Smalltalk/Support (it looks like it was left there by accident) -Modify the NSRect, NSPoint, NSRange boxing to use getGlobalVariable to get the cached NSValue class rather than using Runtime->LookupClass
-Add float/double boxing -Fix selector boxing. It was calling +[Symbol SymbolForCString:] with a SEL. I added a new method, +[Symbol SymbolForSelector:] (which may be redundant since there is already -initWithSelector, but it's easier to call from LLVM, I think). -Deleted a copy of Symbol.m from Smalltalk/Support (it looks like it was left there by accident) -Modify the NSRect, NSPoint, NSRange boxing to use getGlobalVariable to get the cached NSValue class rather than using Runtime->LookupClass -I'm not convinced the boxing for "unknown" types (the default: case in BoxValue) works, but it now calls CreateLoad on the NSValue class. (Not calling CreateLoad was the cause of the weird behaviour I was having.)
Posted 1 year, 6 months ago (February 27th, 2009, 3:23 a.m.)