flymis/WebRoot/dojojs/src/hostenv_spidermonkey.js
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
/*
* SpiderMonkey host environment
*/
dojo.hostenv.name_ = 'spidermonkey';
dojo.hostenv.println = print;
dojo.hostenv.exit = function(exitcode){
quit(exitcode);
}
// version() returns 0, sigh. and build() returns nothing but just prints.
dojo.hostenv.getVersion = function(){ return version(); }
// make jsc shut up (so we can use jsc for sanity checking)
/*@cc_on
@if (@_jscript_version >= 7)
var line2pc; var print; var load; var quit;
@end
@*/
if(typeof line2pc == 'undefined'){
dojo.raise("attempt to use SpiderMonkey host environment when no 'line2pc' global");
}
/*
* This is a hack that determines the current script file by parsing a generated
* stack trace (relying on the non-standard "stack" member variable of the
* SpiderMonkey Error object).
* If param depth is passed in, it'll return the script file which is that far down
* the stack, but that does require that you know how deep your stack is when you are
* calling.
*/
function dj_spidermonkey_current_file(depth){
var s = '';
try{
throw Error("whatever");
}catch(e){
s = e.stack;
}
// lines are like: bu_getCurrentScriptURI_spidermonkey("ScriptLoader.js")@burst/Runtime.js:101
var matches = s.match(/[^@]*\.js/gi);
if(!matches){
dojo.raise("could not parse stack string: '" + s + "'");
}
var fname = (typeof depth != 'undefined' && depth) ? matches[depth + 1] : matches[matches.length - 1];
if(!fname){
dojo.raise("could not find file name in stack string '" + s + "'");
}
//print("SpiderMonkeyRuntime got fname '" + fname + "' from stack string '" + s + "'");
后面还有 19 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。