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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 59693006: Register generic type of instantiated Map literal. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Also register rti dependency. Created 7 years, 1 month 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/resolution/members.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 js_backend; 5 part of js_backend;
6 6
7 class JavaScriptItemCompilationContext extends ItemCompilationContext { 7 class JavaScriptItemCompilationContext extends ItemCompilationContext {
8 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); 8 final Set<HInstruction> boundsChecked = new Set<HInstruction>();
9 final Set<HInstruction> allocatedFixedLists = new Set<HInstruction>(); 9 final Set<HInstruction> allocatedFixedLists = new Set<HInstruction>();
10 } 10 }
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 enqueue(enqueuer, 789 enqueue(enqueuer,
790 compiler.findHelper('iae'), 790 compiler.findHelper('iae'),
791 elements); 791 elements);
792 } else if (cls == compiler.functionClass) { 792 } else if (cls == compiler.functionClass) {
793 enqueueClass(enqueuer, compiler.closureClass, elements); 793 enqueueClass(enqueuer, compiler.closureClass, elements);
794 } else if (cls == compiler.mapClass) { 794 } else if (cls == compiler.mapClass) {
795 // The backend will use a literal list to initialize the entries 795 // The backend will use a literal list to initialize the entries
796 // of the map. 796 // of the map.
797 enqueueClass(enqueuer, compiler.listClass, elements); 797 enqueueClass(enqueuer, compiler.listClass, elements);
798 enqueueClass(enqueuer, mapLiteralClass, elements); 798 enqueueClass(enqueuer, mapLiteralClass, elements);
799 // For map literals, the dependency between the implementation class
800 // and [Map] is not visible, so we have to add it manually.
801 rti.registerRtiDependency(mapLiteralClass, cls);
799 enqueueInResolution(getMapMaker(), elements); 802 enqueueInResolution(getMapMaker(), elements);
800 } else if (cls == compiler.boundClosureClass) { 803 } else if (cls == compiler.boundClosureClass) {
801 // TODO(ngeoffray): Move the bound closure class in the 804 // TODO(ngeoffray): Move the bound closure class in the
802 // backend. 805 // backend.
803 enqueueClass(enqueuer, compiler.boundClosureClass, elements); 806 enqueueClass(enqueuer, compiler.boundClosureClass, elements);
804 } else if (Elements.isNativeOrExtendsNative(cls)) { 807 } else if (Elements.isNativeOrExtendsNative(cls)) {
805 enqueue(enqueuer, getNativeInterceptorMethod, elements); 808 enqueue(enqueuer, getNativeInterceptorMethod, elements);
806 enqueueClass(enqueuer, jsInterceptorClass, compiler.globalDependencies); 809 enqueueClass(enqueuer, jsInterceptorClass, compiler.globalDependencies);
807 enqueueClass(enqueuer, jsPlainJavaScriptObjectClass, elements); 810 enqueueClass(enqueuer, jsPlainJavaScriptObjectClass, elements);
808 } 811 }
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1889 copy(constant.values); 1892 copy(constant.values);
1890 copy(constant.protoValue); 1893 copy(constant.protoValue);
1891 copy(constant); 1894 copy(constant);
1892 } 1895 }
1893 1896
1894 void visitConstructed(ConstructedConstant constant) { 1897 void visitConstructed(ConstructedConstant constant) {
1895 copy(constant.fields); 1898 copy(constant.fields);
1896 copy(constant); 1899 copy(constant);
1897 } 1900 }
1898 } 1901 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698