diff --git a/js-assembler/runtime-src/baselib_format.js b/js-assembler/runtime-src/baselib_format.js index 8c1f419..ebad0ad 100644 --- a/js-assembler/runtime-src/baselib_format.js +++ b/js-assembler/runtime-src/baselib_format.js @@ -8,7 +8,8 @@ // format: string [X ...] string -> string - // String formatting. + // String formatting. If an exception occurs, throws + // a plain Error whose message describes the formatting error. var format = function(formatStr, args, functionName) { var throwFormatError = function() { functionName = functionName || 'format'; diff --git a/js-assembler/runtime-src/helpers.js b/js-assembler/runtime-src/helpers.js index 04fdc2c..eb8833b 100644 --- a/js-assembler/runtime-src/helpers.js +++ b/js-assembler/runtime-src/helpers.js @@ -279,26 +279,26 @@ if (! this['plt']) { this['plt'] = {}; } } - var wrapJsValue = function(x) { - if (x === undefined) { - return types.jsValue('undefined', x); - } - else if (x === null) { - return types.jsValue('null', x); - } - else if (typeof(x) == 'function') { - return types.jsValue('function', x); - } - else if ( x instanceof Array ) { - return types.jsValue('array', x); - } - else if ( typeof(x) == 'string' ) { - return types.jsValue("'" + x.toString() + "'", x); - } - else { - return types.jsValue(x.toString(), x); - } - }; +// var wrapJsValue = function(x) { +// if (x === undefined) { +// return types.jsValue('undefined', x); +// } +// else if (x === null) { +// return types.jsValue('null', x); +// } +// else if (typeof(x) == 'function') { +// return types.jsValue('function', x); +// } +// else if ( x instanceof Array ) { +// return types.jsValue('array', x); +// } +// else if ( typeof(x) == 'string' ) { +// return types.jsValue("'" + x.toString() + "'", x); +// } +// else { +// return types.jsValue(x.toString(), x); +// } +// }; var getKeyCodeName = function(e) { @@ -490,7 +490,7 @@ if (! this['plt']) { this['plt'] = {}; } helpers.flattenSchemeListToArray = flattenSchemeListToArray; helpers.ordinalize = ordinalize; - helpers.wrapJsValue = wrapJsValue; +// helpers.wrapJsValue = wrapJsValue; helpers.getKeyCodeName = getKeyCodeName; diff --git a/js-assembler/runtime-src/types.js b/js-assembler/runtime-src/types.js index 7ec6e18..a39afe8 100644 --- a/js-assembler/runtime-src/types.js +++ b/js-assembler/runtime-src/types.js @@ -21,22 +21,15 @@ if (! this['plt']) { this['plt'] = {}; } var helpers = scope['helpers']; - var getEqHashCode = helpers.getEqHashCode, - // makeLowLevelEqHash: -> hashtable - // Constructs an eq hashtable that uses Moby's getEqHashCode function. - - makeLowLevelEqHash = helpers.makeLowLevelEqHash; + var getEqHashCode = plt.baselib.hash.getEqHashCode; + // makeLowLevelEqHash: -> hashtable + // Constructs an eq hashtable that uses Moby's getEqHashCode function. + var makeLowLevelEqHash = plt.baselib.hash.makeLowLevelEqHash; var toWrittenString = plt.baselib.format.toWrittenString; var toDisplayedString = plt.baselib.format.toDisplayedString; var toDomNode = plt.baselib.format.toDomNode; - scope.link.ready('helpers', function() { - helpers = scope['helpers']; - getEqHashCode = helpers.getEqHashCode; - makeLowLevelEqHash = helpers.makeLowLevelEqHash; - }); - var appendChild = function(parent, child) {