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

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

Issue 1221333015: dart2js: Move field-visiting code to the program-builder. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove bad show line. Created 5 years, 5 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
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 /**
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(jsAst.Name name,
14 jsAst.Expression value); 14 jsAst.Expression value);
15 15
16 /**
17 * [member] is a field (instance, static, or top level).
18 *
19 * [name] is the field name that the [Namer] has picked for this field's
20 * storage, that is, the JavaScript property name.
21 *
22 * [accessorName] is the name of the accessor. For instance fields this is
23 * mostly the same as [name] except when [member] is shadowing a field in its
24 * superclass. For other fields, they are rarely the same.
25 *
26 * [needsGetter] and [needsSetter] represent if a getter or a setter
27 * respectively is needed. There are many factors in this, for example, if the
28 * accessor can be inlined.
29 *
30 * [needsCheckedSetter] indicates that a checked getter is needed, and in this
31 * case, [needsSetter] is always false. [needsCheckedSetter] is only true when
32 * type assertions are enabled (checked mode).
33 */
34 typedef void AcceptField(VariableElement member,
35 jsAst.Name name,
36 jsAst.Name accessorName,
37 bool needsGetter,
38 bool needsSetter,
39 bool needsCheckedSetter);
40
41 // Function signatures used in the generation of runtime type information. 16 // Function signatures used in the generation of runtime type information.
42 typedef void FunctionTypeSignatureEmitter(Element method, 17 typedef void FunctionTypeSignatureEmitter(Element method,
43 FunctionType methodType); 18 FunctionType methodType);
44 19
45 typedef void SubstitutionEmitter(Element element, {bool emitNull}); 20 typedef void SubstitutionEmitter(Element element, {bool emitNull});
46 21
47 const String GENERATED_BY = """ 22 const String GENERATED_BY = """
48 // Generated by dart2js, the Dart to JavaScript compiler. 23 // Generated by dart2js, the Dart to JavaScript compiler.
49 """; 24 """;
50 25
(...skipping 30 matching lines...) Expand all
81 // characters. 56 // characters.
82 const FIELD_CODE_CHARACTERS = r"<=>?@{|}~%&'()*"; 57 const FIELD_CODE_CHARACTERS = r"<=>?@{|}~%&'()*";
83 const NO_FIELD_CODE = 0; 58 const NO_FIELD_CODE = 0;
84 const FIRST_FIELD_CODE = 1; 59 const FIRST_FIELD_CODE = 1;
85 const RANGE1_FIRST = 0x3c; // <=>?@ encodes 1..5 60 const RANGE1_FIRST = 0x3c; // <=>?@ encodes 1..5
86 const RANGE1_LAST = 0x40; 61 const RANGE1_LAST = 0x40;
87 const RANGE2_FIRST = 0x7b; // {|}~ encodes 6..9 62 const RANGE2_FIRST = 0x7b; // {|}~ encodes 6..9
88 const RANGE2_LAST = 0x7e; 63 const RANGE2_LAST = 0x7e;
89 const RANGE3_FIRST = 0x25; // %&'()*+ encodes 10..16 64 const RANGE3_FIRST = 0x25; // %&'()*+ encodes 10..16
90 const RANGE3_LAST = 0x2b; 65 const RANGE3_LAST = 0x2b;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698