Export cpu

This commit is contained in:
copy 2016-08-01 21:28:19 +02:00
parent 191d34c4e0
commit d308a8e9e1

View file

@ -3483,3 +3483,17 @@ CPU.prototype.trigger_pagefault = function(write, user, present)
throw MAGIC_CPU_EXCEPTION;
};
// Closure Compiler's way of exporting
if(typeof window !== "undefined")
{
window["CPU"] = CPU;
}
else if(typeof module !== "undefined" && typeof module.exports !== "undefined")
{
module.exports["CPU"] = CPU;
}
else if(typeof importScripts === "function")
{
self["CPU"] = CPU;
}