Skip to content

Instantly share code, notes, and snippets.

@munificent
Created November 22, 2011 06:05
Show Gist options
  • Select an option

  • Save munificent/1385015 to your computer and use it in GitHub Desktop.

Select an option

Save munificent/1385015 to your computer and use it in GitHub Desktop.

Revisions

  1. munificent revised this gist Nov 22, 2011. 4 changed files with 37 additions and 17272 deletions.
    3 changes: 2 additions & 1 deletion HelloDartTest.dart
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,8 @@
    // BSD-style license that can be found in the LICENSE file.
    // Simple test program invoked with an option to eagerly
    // compile all code that is loaded in the isolate.
    // VMOptions=--compile_all
    // Compiled using frog, the in-progress self-hosted compiler:
    // dart/frog$ ./frogsh --out=hello.js --compile-only samples/hello.dart

    class HelloDartTest {
    static testMain() {
    17,259 changes: 0 additions & 17,259 deletions HelloDartTest.dart.app.js
    0 additions, 17,259 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
    12 changes: 0 additions & 12 deletions HelloDartTest.dart.js
    Original file line number Diff line number Diff line change
    @@ -1,12 +0,0 @@
    function unnamedcac5e9$main$member(){
    unnamedcac5e9$HelloDartTest$Dart.testMain$member();
    }

    function unnamedcac5e9$main$named($n, $o){
    var seen = 0;
    var def = 0;
    if (seen != $o.count || seen + def + $n != 0)
    $nsme();
    return unnamedcac5e9$main$member();
    }

    35 changes: 35 additions & 0 deletions hello.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    // ********** Library dart:core **************
    // ********** Natives dart:core **************
    // ********** Code for Object **************
    // ********** Code for BadNumberFormatException **************
    function BadNumberFormatException() {}
    // ********** Code for top level **************
    function print(obj) {
    if (typeof console == 'object') {
    if (obj) obj = obj.toString();
    console.log(obj);
    } else {
    write(obj);
    write('\n');
    }
    }
    // ********** Library dart:coreimpl **************
    // ********** Code for NumImplementation **************
    NumImplementation = Number;
    // ********** Code for StringImplementation **************
    StringImplementation = String;
    StringImplementation.prototype.contains = function(pattern, startIndex) {
    return this.indexOf(pattern, startIndex) >= 0;
    }
    // ********** Code for top level **************
    // ********** Library hello **************
    // ********** Code for HelloDartTest **************
    function HelloDartTest() {}
    HelloDartTest.testMain = function() {
    print("Hello, Darter!");
    }
    // ********** Code for top level **************
    function main() {
    HelloDartTest.testMain();
    }
    main();
  2. rckwy revised this gist Oct 11, 2011. 3 changed files with 17271 additions and 0 deletions.
    File renamed without changes.
    17,259 changes: 17,259 additions & 0 deletions HelloDartTest.dart.app.js
    17,259 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
    12 changes: 12 additions & 0 deletions HelloDartTest.dart.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    function unnamedcac5e9$main$member(){
    unnamedcac5e9$HelloDartTest$Dart.testMain$member();
    }

    function unnamedcac5e9$main$named($n, $o){
    var seen = 0;
    var def = 0;
    if (seen != $o.count || seen + def + $n != 0)
    $nsme();
    return unnamedcac5e9$main$member();
    }

  3. rckwy created this gist Oct 11, 2011.
    17 changes: 17 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
    // for details. All rights reserved. Use of this source code is governed by a
    // BSD-style license that can be found in the LICENSE file.
    // Simple test program invoked with an option to eagerly
    // compile all code that is loaded in the isolate.
    // VMOptions=--compile_all

    class HelloDartTest {
    static testMain() {
    print("Hello, Darter!");
    }
    }


    main() {
    HelloDartTest.testMain();
    }