Created
July 26, 2013 14:12
-
-
Save imaya/6089176 to your computer and use it in GitHub Desktop.
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
/*** | |
* A JSX application. | |
*/ | |
import "js.jsx"; | |
final class ByteArray { | |
static function get(array: Array.<int>, n: int): int { | |
return array[n]; | |
} | |
} | |
class _Main { | |
static function main(args : string[]): void { | |
var console_log = js.global['console']['log'] as __noconvert__ function(msg: variant): void; | |
var array = [0,1,2,3]: int[]; | |
console_log(ByteArray.get(array, 2)); | |
} | |
} | |
// vim: set tabstop=2 shiftwidth=2 expandtab: |
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
var JSX = {}; | |
(function (a) { | |
function c(b, e) { | |
var a = function () { | |
}; | |
a.prototype = e.prototype; | |
var c = new a(); | |
for (var d in b) { | |
b[d].prototype = c; | |
} | |
} | |
function w(c, b) { | |
for (var a in b.prototype) | |
if (b.prototype.hasOwnProperty(a)) | |
c.prototype[a] = b.prototype[a]; | |
} | |
function v(a, b, d) { | |
function c(a, b, c) { | |
delete a[b]; | |
a[b] = c; | |
return c; | |
} | |
Object.defineProperty(a, b, { | |
get: function () { | |
return c(a, b, d()); | |
}, | |
set: function (d) { | |
c(a, b, d); | |
}, | |
enumerable: true, | |
configurable: true | |
}); | |
} | |
function u(a, b, c) { | |
return a[b] = a[b] / c | 0; | |
} | |
var g = parseInt; | |
var h = parseFloat; | |
function t(a) { | |
return a !== a; | |
} | |
var j = isFinite; | |
var k = encodeURIComponent; | |
var l = decodeURIComponent; | |
var q = encodeURI; | |
var n = decodeURI; | |
var o = Object.prototype.toString; | |
var p = Object.prototype.hasOwnProperty; | |
function b() { | |
} | |
a.require = function (b) { | |
var a = e[b]; | |
return a !== undefined ? a : null; | |
}; | |
a.profilerIsRunning = function () { | |
return b.getResults != null; | |
}; | |
a.getProfileResults = function () { | |
return (b.getResults || function () { | |
return {}; | |
})(); | |
}; | |
a.postProfileResults = function (a, c) { | |
if (b.postResults == null) | |
throw new Error('profiler has not been turned on'); | |
return b.postResults(a, c); | |
}; | |
a.resetProfileResults = function () { | |
if (b.resetResults == null) | |
throw new Error('profiler has not been turned on'); | |
return b.resetResults(); | |
}; | |
a.DEBUG = false; | |
function r() { | |
} | |
; | |
c([r], Error); | |
function s() { | |
} | |
; | |
c([s], Object); | |
function i(a, b) { | |
return a[b]; | |
} | |
; | |
function d() { | |
} | |
; | |
c([d], Object); | |
function m(c) { | |
var a; | |
var b; | |
a = f.global.console.log; | |
b = [ | |
0, | |
1, | |
2, | |
3 | |
]; | |
a(i(b, 2)); | |
} | |
; | |
d.main = m; | |
var f = { | |
global: function () { | |
return this; | |
}() | |
}; | |
var e = { '1.jsx': { _Main: d } }; | |
}(JSX)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment