mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-23 08:38:53 +00:00
Merge pull request #3330 from enquora/objj-runtime-modernize
Objective-J: Adopt general runtime fixes from the npm runtime
This commit is contained in:
4 files changed
+26
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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, []);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -219,6 +219,8 @@ Executable.prototype.setCode = function(code, sourceMap)
|
||||
{
|
||||
this._code = code;
|
||||
|
||||
if (code == null) return;
|
||||
|
||||
var parameters = this.functionParameters().join(",");
|
||||
var sourceMapBase64;
|
||||
|
||||
|
||||
Reference in new issue
Block a user