OLD | NEW |
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.full_emitter; | 5 part of dart2js.js_emitter.full_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 /** |
11 * Call-back for adding property with [name] and [value]. | 11 * Call-back for adding property with [name] and [value]. |
12 */ | 12 */ |
13 typedef jsAst.Property AddPropertyFunction(jsAst.Name name, | 13 typedef jsAst.Property AddPropertyFunction( |
14 jsAst.Expression value); | 14 jsAst.Name name, jsAst.Expression value); |
15 | 15 |
16 // Compact field specifications. The format of the field specification is | 16 // Compact field specifications. The format of the field specification is |
17 // <accessorName>:<fieldName><suffix> where the suffix and accessor name | 17 // <accessorName>:<fieldName><suffix> where the suffix and accessor name |
18 // prefix are optional. The suffix directs the generation of getter and | 18 // prefix are optional. The suffix directs the generation of getter and |
19 // setter methods. Each of the getter and setter has two bits to determine | 19 // setter methods. Each of the getter and setter has two bits to determine |
20 // the calling convention. Setter listed below, getter is similar. | 20 // the calling convention. Setter listed below, getter is similar. |
21 // | 21 // |
22 // 00: no setter | 22 // 00: no setter |
23 // 01: function(value) { this.field = value; } | 23 // 01: function(value) { this.field = value; } |
24 // 10: function(receiver, value) { receiver.field = value; } | 24 // 10: function(receiver, value) { receiver.field = value; } |
25 // 11: function(receiver, value) { this.field = value; } | 25 // 11: function(receiver, value) { this.field = value; } |
26 // | 26 // |
27 // The suffix encodes 4 bits using three ASCII ranges of non-identifier | 27 // The suffix encodes 4 bits using three ASCII ranges of non-identifier |
28 // characters. | 28 // characters. |
29 const FIELD_CODE_CHARACTERS = r"<=>?@{|}~%&'()*"; | 29 const FIELD_CODE_CHARACTERS = r"<=>?@{|}~%&'()*"; |
30 const NO_FIELD_CODE = 0; | 30 const NO_FIELD_CODE = 0; |
31 const FIRST_FIELD_CODE = 1; | 31 const FIRST_FIELD_CODE = 1; |
32 const RANGE1_FIRST = 0x3c; // <=>?@ encodes 1..5 | 32 const RANGE1_FIRST = 0x3c; // <=>?@ encodes 1..5 |
33 const RANGE1_LAST = 0x40; | 33 const RANGE1_LAST = 0x40; |
34 const RANGE2_FIRST = 0x7b; // {|}~ encodes 6..9 | 34 const RANGE2_FIRST = 0x7b; // {|}~ encodes 6..9 |
35 const RANGE2_LAST = 0x7e; | 35 const RANGE2_LAST = 0x7e; |
36 const RANGE3_FIRST = 0x25; // %&'()*+ encodes 10..16 | 36 const RANGE3_FIRST = 0x25; // %&'()*+ encodes 10..16 |
37 const RANGE3_LAST = 0x2b; | 37 const RANGE3_LAST = 0x2b; |
OLD | NEW |