mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Merge pull request #3263 from enquora/modernize-CPException-inline-method-call-string
Refactor METHOD_CALL_STRING macro to Javascript function Replace the unhygienic METHOD_CALL_STRING() C pre-processor macro in CPException.j with a standard JavaScript helper function, _CPMethodCallString(). Add a `// MARK: - Exception Utilities` navigation landmark. This removes a legacy text-substitution dependency, enabling single-pass AST generation for the native compilation pipeline.
This commit is contained in:
@@ -248,8 +248,13 @@ if (Error.prototype._userInfo !== null)
|
||||
|
||||
[CPException initialize];
|
||||
|
||||
#define METHOD_CALL_STRING()\
|
||||
((class_isMetaClass(anObject.isa) ? "+" : "-") + "[" + [anObject className] + " " + aSelector + "]: ")
|
||||
// MARK: - Exception Utilities
|
||||
|
||||
function _CPMethodCallString(anObject, aSelector)
|
||||
{
|
||||
var prefix = class_isMetaClass(anObject.isa) ? "+" : "-";
|
||||
return prefix + "[" + [anObject className] + " " + aSelector + "]: ";
|
||||
}
|
||||
|
||||
function _CPRaiseInvalidAbstractInvocation(anObject, aSelector)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user