Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Side by Side Diff: pkg/compiler/lib/src/js_emitter/old_emitter/declarations.dart

Issue 956953002: Support for a dart2js `dartDeferredLoader` hook. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 /// Enables debugging of fast/slow objects using V8-specific primitives. 7 /// Enables debugging of fast/slow objects using V8-specific primitives.
8 const DEBUG_FAST_OBJECTS = false; 8 const DEBUG_FAST_OBJECTS = false;
9 9
10 /** 10 /**
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const String HOOKS_API_USAGE = """ 50 const String HOOKS_API_USAGE = """
51 // The code supports the following hooks: 51 // The code supports the following hooks:
52 // dartPrint(message): 52 // dartPrint(message):
53 // if this function is defined it is called instead of the Dart [print] 53 // if this function is defined it is called instead of the Dart [print]
54 // method. 54 // method.
55 // 55 //
56 // dartMainRunner(main, args): 56 // dartMainRunner(main, args):
57 // if this function is defined, the Dart [main] method will not be invoked 57 // if this function is defined, the Dart [main] method will not be invoked
58 // directly. Instead, a closure that will invoke [main], and its arguments 58 // directly. Instead, a closure that will invoke [main], and its arguments
59 // [args] is passed to [dartMainRunner]. 59 // [args] is passed to [dartMainRunner].
60 //
61 // dartDeferredLibraryLoader(uri, successCallback, errorCallback):
62 // if this function is defined, it will be called when a deferered library
63 // is loaded. It should load and eval the javascript on uri, and call
Lasse Reichstein Nielsen 2015/02/26 08:44:09 javascript on uri -> javascript of `uri`
sigurdm 2015/02/26 13:19:05 Done.
64 // successCallback. If it fails to do so, it should call errorCallback with
65 // an error.
60 """; 66 """;
61 67
62 // Compact field specifications. The format of the field specification is 68 // Compact field specifications. The format of the field specification is
63 // <accessorName>:<fieldName><suffix> where the suffix and accessor name 69 // <accessorName>:<fieldName><suffix> where the suffix and accessor name
64 // prefix are optional. The suffix directs the generation of getter and 70 // prefix are optional. The suffix directs the generation of getter and
65 // setter methods. Each of the getter and setter has two bits to determine 71 // setter methods. Each of the getter and setter has two bits to determine
66 // the calling convention. Setter listed below, getter is similar. 72 // the calling convention. Setter listed below, getter is similar.
67 // 73 //
68 // 00: no setter 74 // 00: no setter
69 // 01: function(value) { this.field = value; } 75 // 01: function(value) { this.field = value; }
70 // 10: function(receiver, value) { receiver.field = value; } 76 // 10: function(receiver, value) { receiver.field = value; }
71 // 11: function(receiver, value) { this.field = value; } 77 // 11: function(receiver, value) { this.field = value; }
72 // 78 //
73 // The suffix encodes 4 bits using three ASCII ranges of non-identifier 79 // The suffix encodes 4 bits using three ASCII ranges of non-identifier
74 // characters. 80 // characters.
75 const FIELD_CODE_CHARACTERS = r"<=>?@{|}~%&'()*"; 81 const FIELD_CODE_CHARACTERS = r"<=>?@{|}~%&'()*";
76 const NO_FIELD_CODE = 0; 82 const NO_FIELD_CODE = 0;
77 const FIRST_FIELD_CODE = 1; 83 const FIRST_FIELD_CODE = 1;
78 const RANGE1_FIRST = 0x3c; // <=>?@ encodes 1..5 84 const RANGE1_FIRST = 0x3c; // <=>?@ encodes 1..5
79 const RANGE1_LAST = 0x40; 85 const RANGE1_LAST = 0x40;
80 const RANGE2_FIRST = 0x7b; // {|}~ encodes 6..9 86 const RANGE2_FIRST = 0x7b; // {|}~ encodes 6..9
81 const RANGE2_LAST = 0x7e; 87 const RANGE2_LAST = 0x7e;
82 const RANGE3_FIRST = 0x25; // %&'()*+ encodes 10..16 88 const RANGE3_FIRST = 0x25; // %&'()*+ encodes 10..16
83 const RANGE3_LAST = 0x2b; 89 const RANGE3_LAST = 0x2b;
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/js_lib/js_helper.dart » ('j') | sdk/lib/_internal/compiler/js_lib/preambles/d8.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698