Last active
December 20, 2015 10:19
-
-
Save paularmstrong/6114594 to your computer and use it in GitHub Desktop.
Swig:Next benchmarking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function anonymous(_swig,_ctx,_filters,_,_fn) { | |
var _output = ""; | |
_output += _filters["e"]((((typeof obj !== "undefined" && obj.hasOwnProperty("a")) ? ((typeof obj !== "undefined" && obj.hasOwnProperty("a")) ? obj.a : "") : ((typeof _ctx.obj !== "undefined" && _ctx.obj.hasOwnProperty("a")) ? _ctx.obj.a : "")))); | |
_output += "\n"; | |
_output += _filters["e"]((((typeof obj !== "undefined") ? ((typeof obj !== "undefined") ? obj : "") : ((typeof _ctx.obj !== "undefined") ? _ctx.obj : ""))['b'])); | |
_output += "\n"; | |
return _output; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function anonymous(_context,_parents,_filters,_,_ext) { | |
_parents = _parents ? _parents.slice() : []; | |
_context = _context || {}; | |
var j = _parents.length, | |
_output = "", | |
_this = this; | |
while (j--) { | |
if (_parents[j] === this.id) { | |
return "Circular import of template " + this.id + " in " + _parents[_parents.length-1]; | |
} | |
} | |
_parents.push(this.id); | |
if (typeof _context !== "undefined" && typeof _context.obj_a === "function") { | |
_output = (typeof _output === "undefined") ? (function () { | |
return _context["obj_a"](); | |
})(): _output + (function () { | |
return _context["obj_a"](); | |
})(); | |
} else if (typeof obj_a === "function") { | |
_output = (typeof _output === "undefined") ? (function () { | |
return obj_a(); | |
})(): _output + (function () { | |
return obj_a(); | |
})(); | |
} else { | |
var __obj_a = ""; | |
if ((typeof _context !== "undefined" && typeof _context.obj !== "undefined" && typeof _context.obj.a !== "undefined")) { | |
__obj_a = _filters.escape.call(this, (typeof _context.obj.a === 'function') ? _context.obj.a() : _context.obj.a, true); | |
} else if ((typeof obj !== "undefined" && typeof obj.a !== "undefined")) { | |
__obj_a = _filters.escape.call(this, (typeof obj.a === 'function') ? obj.a() : obj.a, true); | |
} | |
_output = (typeof _output === "undefined") ? __obj_a: _output + __obj_a; | |
} | |
_output += "\n"; | |
if (typeof _context !== "undefined" && typeof _context.obj__b__ === "function") { | |
_output = (typeof _output === "undefined") ? (function () { | |
return _context["obj__b__"](); | |
})(): _output + (function () { | |
return _context["obj__b__"](); | |
})(); | |
} else if (typeof obj__b__ === "function") { | |
_output = (typeof _output === "undefined") ? (function () { | |
return obj__b__(); | |
})(): _output + (function () { | |
return obj__b__(); | |
})(); | |
} else { | |
var __obj__b__ = ""; | |
if ((typeof _context !== "undefined" && typeof _context.obj !== "undefined" && typeof _context.obj['b'] !== "undefined")) { | |
__obj__b__ = _filters.escape.call(this, (typeof _context.obj['b'] === 'function') ? _context.obj['b']() : _context.obj['b'], true); | |
} else if ((typeof obj !== "undefined" && typeof obj['b'] !== "undefined")) { | |
__obj__b__ = _filters.escape.call(this, (typeof obj['b'] === 'function') ? obj['b']() : obj['b'], true); | |
} | |
_output = (typeof _output === "undefined") ? __obj__b__: _output + __obj__b__; | |
} | |
return _output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment