From 37072810e0bdee3228fd2772e344c2284decf30b Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Mon, 24 Mar 2014 00:24:28 +0200 Subject: [PATCH] clean up initjs --- src/duk_initjs.js | 45 ++------------------------------------------- 1 file changed, 2 insertions(+), 43 deletions(-) diff --git a/src/duk_initjs.js b/src/duk_initjs.js index f5f6e98c..05f3da35 100644 --- a/src/duk_initjs.js +++ b/src/duk_initjs.js @@ -23,48 +23,7 @@ }); } - // __duk__, renamed to Duktape in 0.9.0 - if (false) { - Object.defineProperty(G, '__duk__', { - value: D, - writable: true, - enumerable: false, - configurable: true - }); - } - - // legacy properties - if (false) { - // removed in Duktape 0.9.0 - def('build', ''); - def('setFinalizer', function(o,v) { Duktape.fin(o,v); }); - def('getFinalizer', function(o) { return Duktape.fin(o); }); - def('addr', function(v) { return D.info(v)[1]; }); - def('refc', function(v) { return D.info(v)[2]; }); - } - - // JSONX/JSONC convenience - if (false) { - def('jxEnc', function(a,b,c) { return D.enc('jsonx', a, b, c); }); - def('jxDec', function(a,b) { return D.dec('jsonx', a, b); }); - def('jcEnc', function(a,b,c) { return D.enc('jsonc', a, b, c); }); - def('jcDec', function(a,b) { return D.dec('jsonc', a, b); }); - } - - // info convenience - if (false) { - def('infox', function (v) { - var t = D.info(v); - if (!t) { return t; } - return { type: t[0], addr: t[1], refc: t[2], hdrsize: t[3], addsize: t[4], bcsize: t[5] }; - }); - } - - // anticipate new functions - if (false) { - } - - // console.log compatibility + // Compatibility for 'console.log'. if (false) { console = { log: function() { @@ -73,7 +32,7 @@ }; } - // logger object for C code + // Logger object for C code provided by init code now. if (true) { D.Logger.clog = new D.Logger('C'); }