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

Side by Side Diff: pkg/compiler/lib/src/js_backend/namer.dart

Issue 2625713002: Rename Enqueuer.universe to worldBuilder. (Closed)
Patch Set: Updated cf. comments Created 3 years, 11 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 library js_backend.namer; 5 library js_backend.namer;
6 6
7 import 'dart:collection' show HashMap; 7 import 'dart:collection' show HashMap;
8 8
9 import 'package:js_runtime/shared/embedded_names.dart' show JsGetName; 9 import 'package:js_runtime/shared/embedded_names.dart' show JsGetName;
10 10
(...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 } else { 1780 } else {
1781 // Using some bits from the keys hash tag groups the names Maps with the 1781 // Using some bits from the keys hash tag groups the names Maps with the
1782 // same structure. 1782 // same structure.
1783 add(getHashTag(constant.keyList, 2) + getHashTag(constant, 3)); 1783 add(getHashTag(constant.keyList, 2) + getHashTag(constant, 3));
1784 } 1784 }
1785 } 1785 }
1786 1786
1787 @override 1787 @override
1788 void visitConstructed(ConstructedConstantValue constant, [_]) { 1788 void visitConstructed(ConstructedConstantValue constant, [_]) {
1789 addRoot(constant.type.element.name); 1789 addRoot(constant.type.element.name);
1790 // TODO(johnniwinther): This should be accessed from a codegen closed world.
1790 codegenWorldBuilder.forEachInstanceField(constant.type.element, 1791 codegenWorldBuilder.forEachInstanceField(constant.type.element,
1791 (_, FieldElement field) { 1792 (_, FieldElement field) {
1792 if (failed) return; 1793 if (failed) return;
1793 _visit(constant.fields[field]); 1794 _visit(constant.fields[field]);
1794 }); 1795 });
1795 } 1796 }
1796 1797
1797 @override 1798 @override
1798 void visitType(TypeConstantValue constant, [_]) { 1799 void visitType(TypeConstantValue constant, [_]) {
1799 // Generates something like 'Type_String_k8F', using the simple name of the 1800 // Generates something like 'Type_String_k8F', using the simple name of the
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
2105 void addSuggestion(String original, String suggestion) { 2106 void addSuggestion(String original, String suggestion) {
2106 assert(!_suggestedNames.containsKey(original)); 2107 assert(!_suggestedNames.containsKey(original));
2107 _suggestedNames[original] = suggestion; 2108 _suggestedNames[original] = suggestion;
2108 } 2109 }
2109 2110
2110 bool hasSuggestion(String original) => _suggestedNames.containsKey(original); 2111 bool hasSuggestion(String original) => _suggestedNames.containsKey(original);
2111 bool isSuggestion(String candidate) { 2112 bool isSuggestion(String candidate) {
2112 return _suggestedNames.containsValue(candidate); 2113 return _suggestedNames.containsValue(candidate);
2113 } 2114 }
2114 } 2115 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/js_interop_analysis.dart ('k') | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698