improve for compilation
This commit is contained in:
parent
d5d23f7ea9
commit
00d57971e9
22
lib/jor1k.js
22
lib/jor1k.js
|
@ -21,8 +21,11 @@ var VIRTIO_INTERRUPTSTATUS_REG = 0x60;
|
|||
var VIRTIO_INTERRUPTACK_REG = 0x64;
|
||||
var VIRTIO_STATUS_REG = 0x70;
|
||||
|
||||
/** @const */
|
||||
var VRING_DESC_F_NEXT = 1; /* This marks a buffer as continuing via the next field. */
|
||||
/** @const */
|
||||
var VRING_DESC_F_WRITE = 2; /* This marks a buffer as write-only (otherwise read-only). */
|
||||
/** @const */
|
||||
var VRING_DESC_F_INDIRECT = 4; /* This means the buffer contains a list of buffer descriptors. */
|
||||
|
||||
|
||||
|
@ -43,19 +46,20 @@ function abort()
|
|||
throw "abort";
|
||||
}
|
||||
}
|
||||
var hex8 = h;
|
||||
|
||||
var DebugMessage;
|
||||
|
||||
if(DEBUG)
|
||||
function hex8(n)
|
||||
{
|
||||
DebugMessage = console.log.bind(console);
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugMessage = function() {};
|
||||
return h(n);
|
||||
}
|
||||
|
||||
/** @param {...string} log */
|
||||
function DebugMessage(log)
|
||||
{
|
||||
if(DEBUG)
|
||||
{
|
||||
console.log.apply(console, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
function LoadXMLResource(url, OnSuccess, OnError) {
|
||||
var req = new XMLHttpRequest();
|
||||
|
|
Loading…
Reference in a new issue