Permalink
Browse files

Merge commit '2717b0c'

  • Loading branch information...
2 parents bec6e00 + 2717b0c commit fdc91b92617cbd411bedf9bed0096a131d46ae63 @yurydelendik yurydelendik committed Jun 23, 2014
Showing 565 changed files with 35,844 additions and 9,603 deletions.
View
@@ -18,6 +18,8 @@ src/avm2/utils/js
src/flash/playerglobal.js
src/flash/playerglobal.abc
+src/flash/playerglobal-new.js
+src/flash/playerglobal-new.abc
node_modules/
View
@@ -27,12 +27,6 @@ module.exports = function(grunt) {
all: ['src/avm1/*.js', 'src/flash/**/*.js', 'src/swf/*.js']
},
exec: {
- reftest: {
- cmd: 'make -C test/ reftest'
- },
- makeref: {
- cmd: 'make -C test/ makeref'
- },
webserver: {
cmd: 'python utils/webserver.py'
},
@@ -45,10 +39,22 @@ module.exports = function(grunt) {
build_bundle: {
cmd: 'make -C utils/builder build'
},
+ build_avm2_ts: {
+ cmd: '../../node_modules/.bin/tsc --target ES5 references.ts',
+ cwd: 'src/avm2'
+ },
generate_abcs: {
cmd: 'python generate.py',
cwd: 'src/avm2/generated'
},
+ build_playerglobal: {
+ cmd: 'node build -t 9',
+ cwd: 'utils/playerglobal-builder'
+ },
+ build_avm1lib: {
+ cmd: 'node compileabc -m ../src/avm1lib/avm1lib.manifest',
+ cwd: 'utils/'
+ },
lint_success: {
cmd: 'echo "SUCCESS: no lint errors"'
}
@@ -62,9 +68,19 @@ module.exports = function(grunt) {
files: 'extension/firefox/**/*',
tasks: ['build-extension']
},
- abcs: {
- files: 'src/avm2/generated/**/*.as',
- tasks: ['exec:generate_abcs']
+ avm1lib: {
+ files: ['src/avm1lib/*.as',
+ 'src/avm1lib/avm1lib.manifest'],
+ tasks: ['exec:build_avm1lib']
+ },
+ playerglobal: {
+ files: ['src/flash/**/*.as',
+ 'utils/playerglobal-builder/manifest.json'],
+ tasks: ['exec:build_playerglobal']
+ },
+ avm2_ts: {
+ files: ['src/avm2/*.ts'],
+ tasks: ['exec:build_avm2_ts']
}
}
});
@@ -77,8 +93,9 @@ module.exports = function(grunt) {
grunt.registerTask('update-flash-refs', function () {
var updateFlashRefs = require('./utils/update-flash-refs.js');
- updateFlashRefs('examples/inspector/inspector.html', 'src/flash');
- updateFlashRefs('test/harness/slave.html', 'src/flash');
+ updateFlashRefs('examples/inspector/inspector.html', 'src');
+ updateFlashRefs('test/harness/slave.html', 'src');
+ updateFlashRefs('examples/xlsimport/index.html', 'src');
});
grunt.registerTask('server', function () {
@@ -88,9 +105,31 @@ module.exports = function(grunt) {
});
});
+ grunt.registerTask('reftest', function () {
+ var done = this.async();
+ grunt.util.spawn({cmd: 'make', args: ['reftest'], opts: { cwd: 'test', stdio: 'inherit'}}, function () {
+ done();
+ });
+ });
+
+ grunt.registerTask('makeref', function () {
+ var done = this.async();
+ grunt.util.spawn({cmd: 'make', args: ['makeref'], opts: { cwd: 'test', stdio: 'inherit'}}, function () {
+ done();
+ });
+ });
+
+ grunt.registerTask('watch-playerglobal', ['exec:build_playerglobal', 'watch:playerglobal']);
+ grunt.registerTask('watch-avm1lib', ['exec:build_avm1lib', 'watch:avm1lib']);
+ grunt.registerTask('watch-avm2', ['exec:build_avm2_ts', 'watch:avm2_ts']);
+
// temporary make/python calls based on grunt-exec
- grunt.registerTask('reftest', ['exec:reftest']);
- grunt.registerTask('makeref', ['exec:makeref']);
- grunt.registerTask('build-web', ['exec:build_bundle', 'exec:build_extension', 'exec:build_web']);
- grunt.registerTask('build-extension', ['exec:build_bundle', 'exec:build_extension']);
+ grunt.registerTask('build-web', ['exec:build_avm2_ts', 'exec:build_bundle', 'exec:build_extension', 'exec:build_web']);
+ grunt.registerTask('build-extension', ['exec:build_avm2_ts', 'exec:build_bundle', 'exec:build_extension']);
+ grunt.registerTask('build-playerglobal', ['exec:build_playerglobal']);
+ grunt.registerTask('build-bundle', ['exec:build_avm2_ts', 'exec:build_bundle']);
+
+ grunt.registerTask('playerglobal', ['exec:build_playerglobal']);
+ grunt.registerTask('avm1lib', ['exec:build_avm1lib']);
+ grunt.registerTask('avm2', ['exec:build_avm2_ts']);
};
View
@@ -17,13 +17,11 @@ default:
@echo " build-playerglobal|build-extension|build-bundle|build-web|"
@echo " run-tamarin-tests|run-tamarin-sanity-tests|check-extension|"
@echo " test|push-test|build-bot|start-build-bot|update-flash-refs|"
- @echo " install-tamarin|bootstrap]"
+ @echo " install-avmshell|install-tamarin-src|bootstrap]"
check-system:
echo "Checking the presence of grunt-cli..."
grunt --version
- echo "Checking the presence of wget..."
- wget --version
echo "Checking the presence of java..."
java -version
echo "Checking the presence of node..."
@@ -41,18 +39,21 @@ install-libs:
install-utils: check-system
npm install
- make -C utils/ install-asc install-closure install-js install-node-modules install-flex-sdk
+ make -C utils/ install-avmshell install-js
-install-tamarin: check-system
+install-avmshell:
+ make -C utils/ install-avmshell
+
+install-tamarin-src: check-system
echo "Checking the presence of mercurial..."
hg --version
- make -C utils/ install-tamarin install-tamarin-tests
+ make -C utils/ install-tamarin-src install-tamarin-tests
BASE ?= $(error ERROR: Specify BASE that points to the Shumway folder with installed utils)
link-utils:
ln -s $(BASE)/node_modules .
- ln -s $(BASE)/utils/asc.jar $(BASE)/utils/cc.jar $(BASE)/utils/tamarin-redux $(BASE)/utils/jsshell $(BASE)/utils/node_modules utils/
+ ln -s $(BASE)/utils/tamarin-redux $(BASE)/utils/jsshell utils/
run-tamarin-sanity-tests:
make -C utils/ run-tamarin-sanity-tests
@@ -63,12 +64,15 @@ run-tamarin-tests:
build-playerglobal:
make -C utils/ build-playerglobal
+build-playerglobal-fp:
+ make -C utils/ build-playerglobal-fp
+
build-playerglobal-min:
make -C utils/ install-apparat
make -C utils/playerglobal build-min
build-bundle:
- make -C utils/builder build
+ grunt build-bundle
build-extension: build-bundle
make -C extension/firefox/ build
@@ -81,6 +81,7 @@
<div class="avm2Option toolbarButton" id="wireframe">Wireframe</div>
<div class="toolbarButton" id="sample">Sample</div>
<div class="avm2Option toolbarButton" id="turbo">Turbo</div>
+ <div class="avm2Option toolbarButton" id="caching">Caching</div>
</div>
<script>
@@ -106,8 +107,8 @@
<script src="../../src/swf/Timeline.js"></script>
<script>
- var Option = options.Option;
- var OptionSet = options.OptionSet;
+ var Option = Shumway.Options.Option;
+ var OptionSet = Shumway.Options.OptionSet;
var coreOptions = new OptionSet("Core Options");
</script>
@@ -170,15 +171,15 @@
<!-- Load AVM2 Dependencies -->
<script> console.time("Load AVM2 Dependencies"); </script>
+ <script src="../../src/avm2/global.js"></script>
+ <script src="../../src/avm2/utilities.js"></script>
<script src="../../src/avm2/settings.js"></script>
<script src="../../src/avm2/avm2Util.js"></script>
<script src="../../src/avm2/metrics.js"></script>
<script>
- var Counter = new metrics.Counter(true);
- var FrameCounter = new metrics.Counter(true);
- var CanvasCounter = new metrics.Counter(true);
- var Timer = metrics.Timer;
+ var FrameCounter = new Shumway.Metrics.Counter(true);
+ var CanvasCounter = new Shumway.Metrics.Counter(true);
var systemOptions = new OptionSet("System Options");
var disassemble = systemOptions.register(new Option("d", "disassemble", "boolean", false, "disassemble"));
var traceLevel = systemOptions.register(new Option("t", "traceLevel", "number", 0, "trace level"));
@@ -204,37 +205,65 @@
<script src="../../src/avm2/compiler/c4/looper.js"></script>
<script src="../../src/avm2/compiler/c4/transform.js"></script>
<script src="../../src/avm2/compiler/c4/backend.js"></script>
+ <script src="../../src/avm2/trampoline.js"></script>
+ <script src="../../src/avm2/bindings.js"></script>
+ <script src="../../src/avm2/scope.js"></script>
<script src="../../src/avm2/domain.js"></script>
+
<script src="../../src/avm2/class.js"></script>
+ <script>
+ var domainOptions = systemOptions.register(new OptionSet("ApplicationDomain Options"));
+ var traceClasses = domainOptions.register(new Option("tc", "traceClasses", "boolean", false, "trace class creation"));
+ var traceDomain = domainOptions.register(new Option("td", "traceDomain", "boolean", false, "trace domain property access"));
+ var playerglobal;
+ var playerglobalLoadedPromise;
+
+ </script>
<script src="../../src/avm2/xregexp.js"></script>
<script src="../../src/avm2/runtime.js"></script>
+ <script src="../../src/avm2/runtime-exports.js"></script>
<script src="../../src/avm2/hacks.js"></script>
<script src="../../src/avm2/array.js"></script>
<script src="../../src/avm2/vectors-numeric.js"></script>
<script src="../../src/avm2/vectors-generic.js"></script>
<script src="../../src/avm2/xml.js"></script>
- <script src="../../src/avm2/json2.js"></script>
<script src="../../src/avm2/amf.js"></script>
<script src="../../src/avm2/proxy.js"></script>
<script src="../../src/avm2/dictionary.js"></script>
<script src="../../src/avm2/native.js"></script>
<script src="../../src/avm2/disassembler.js"></script>
<script src="../../src/avm2/interpreter.js"></script>
- <script src="../../src/avm2/vm.js"></script>
+ <!--<script src="../../src/avm2/vm.js"></script>-->
<script> console.timeEnd("Load AVM2 Dependencies"); </script>
+ <script> console.time("Load Compiled Code Cache"); </script>
+ <!--<script src="../../src/avm2/bin/out.js"></script>-->
+ <!--<script src="../../src/avm2/bin/builtin.as.js"></script>-->
+ <!--<script src="../../src/avm2/bin/race3.as.js"></script>-->
+ <!--<script src="../../src/avm2/bin/player.as.js"></script>-->
+ <!--<script src="../../src/avm2/bin/demo.as.js"></script>-->
+ <!--<script src="../../src/avm2/bin/box.as.js"></script>-->
+ <!--<script src="../../src/avm2/bin/box.as.cc.js"></script>-->
+ <!--<script src="../../src/avm2/bin/main.as.js"></script>-->
+ <!--<script src="../../src/avm2/bin/main.as.cc.js"></script>-->
+ <!--<script src="../../src/avm2/bin/truck.as.js"></script>-->
+ <!--<script src="../../src/avm2/bin/candy.as.js"></script>-->
+ <script> console.timeEnd("Load Compiled Code Cache"); </script>
+
<!-- Load Flash Dependencies -->
<script> console.time("Load Flash Dependencies"); </script>
+ <!-- Autogenerated avm1lib references: base=../../src/avm1lib/ -->
+ <script src="../../src/avm1lib/AS2Button.js"></script>
+ <script src="../../src/avm1lib/AS2Globals.js"></script>
+ <script src="../../src/avm1lib/AS2MovieClip.js"></script>
+ <script src="../../src/avm1lib/AS2MovieClipLoader.js"></script>
+ <script src="../../src/avm1lib/AS2TextField.js"></script>
+ <script src="../../src/avm1lib/AS2Utils.js"></script>
+ <!-- Autogenerated avm1lib references end -->
<!-- Autogenerated flash references: base=../../src/flash/ -->
<script src="../../src/flash/accessibility/Accessibility.js"></script>
- <script src="../../src/flash/avm1lib/AS2Button.js"></script>
- <script src="../../src/flash/avm1lib/AS2Globals.js"></script>
- <script src="../../src/flash/avm1lib/AS2MovieClip.js"></script>
- <script src="../../src/flash/avm1lib/AS2MovieClipLoader.js"></script>
- <script src="../../src/flash/avm1lib/AS2TextField.js"></script>
- <script src="../../src/flash/avm1lib/AS2Utils.js"></script>
<script src="../../src/flash/display/Bitmap.js"></script>
<script src="../../src/flash/display/BitmapData.js"></script>
<script src="../../src/flash/display/DisplayObject.js"></script>
@@ -328,7 +357,6 @@
<script src="../../src/flash/utils/Timer.js"></script>
<!-- Autogenerated flash references end -->
<script src="../../src/flash/stubs.js"></script>
- <script src="../../src/flash/playerglobal.js"></script>
<script>
console.timeEnd("Load Flash Dependencies");
console.timeEnd("Load");
@@ -113,7 +113,7 @@ var Terminal = (function () {
var KEY_T = 84;
this.showLineNumbers = true;
- this.showLineTime = false;
+ this.showLineTime = true;
this.showLineCounter = false;
function onFocusIn(event) {
@@ -227,7 +227,7 @@ var Terminal = (function () {
var charSize = 5;
var lineNumberMargin = this.textMarginLeft;
- var lineTimeMargin = lineNumberMargin + (this.showLineNumbers ? String(this.buffer.length).length * charSize : 0);
+ var lineTimeMargin = lineNumberMargin + (this.showLineNumbers ? (String(this.buffer.length).length + 2) * charSize: 0);
var lineRepeatMargin = lineTimeMargin + (this.showLineTime ? charSize * 8 : 2 * charSize);
var lineMargin = lineRepeatMargin + charSize * 5;
@@ -239,7 +239,8 @@ var Terminal = (function () {
var line = this.buffer.get(lineIndex);
var lineFormat = this.buffer.getFormat(lineIndex);
var lineRepeat = this.buffer.getRepeat(lineIndex);
- var lineTimeDelta = lineIndex > 1 ? this.buffer.getTime(lineIndex) - this.buffer.getTime(lineIndex - 1) : 0;
+ // var lineTimeDelta = lineIndex > 1 ? this.buffer.getTime(lineIndex) - this.buffer.getTime(lineIndex - 1) : 0;
+ var lineTimeDelta = lineIndex > 1 ? this.buffer.getTime(lineIndex) - this.buffer.getTime(0) : 0;
this.context.fillStyle = lineIndex % 2 ? lineColor : alternateLineColor;
if (lineFormat && lineFormat.backgroundFillStyle) {
Oops, something went wrong.

0 comments on commit fdc91b9

Please sign in to comment.