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