Merge pull request #3330 from enquora/objj-runtime-modernize

Objective-J: Adopt general runtime fixes from the npm runtime
This commit is contained in:
David Richardson authored and GitHub committed 2026-10-22 14:22:34 -06:00
commit d2a687d158
4 files changed
+26

No files matched your search

+4
View File
@@ -70,6 +70,10 @@ if (typeof OBJJ_COMPILER_FLAGS !== 'undefined')
case "SourceMap":
flags.sourceMap = true;
break;
case "SourceMapIncludeSource":
flags.sourceMapIncludeSource = true;
break;
}
}
FileExecutable.setCurrentCompilerFlags(flags);
+19
View File
@@ -171,6 +171,25 @@ CFDictionary.prototype.toString = function()
DISPLAY_NAME(CFDictionary.prototype.toString);
CFDictionary.prototype.toJSObject = function()
{
var jsObject = new Object(),
keys = this._keys,
index = 0,
count = this._count;
for (; index < count; ++index)
{
var key = keys[index];
jsObject[key] = this.valueForKey(key);
}
return jsObject;
};
DISPLAY_NAME(CFDictionary.prototype.toJSObject);
GLOBAL(CFMutableDictionary) = function(/*CFDictionary*/ aDictionary)
{
CFDictionary.apply(this, []);
+1
View File
@@ -192,6 +192,7 @@ GLOBAL(CPLogColorize) = function(aString, aLevel)
GLOBAL(CPLogPrint) = function(aString, aLevel, aTitle, aFormatter)
{
if (CPLogDisable) return;
if (stream === undefined) {
try {
stream = require("narwhal/term").stream;
+2
View File
@@ -219,6 +219,8 @@ Executable.prototype.setCode = function(code, sourceMap)
{
this._code = code;
if (code == null) return;
var parameters = this.functionParameters().join(",");
var sourceMapBase64;