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

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

Issue 27524003: Generate tear-off closures dynamically. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
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; 8 final Set<HInstruction> boundsChecked;
9 9
10 JavaScriptItemCompilationContext() 10 JavaScriptItemCompilationContext()
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 // of the map. 835 // of the map.
836 enqueueClass(enqueuer, compiler.listClass, elements); 836 enqueueClass(enqueuer, compiler.listClass, elements);
837 enqueueClass(enqueuer, mapLiteralClass, elements); 837 enqueueClass(enqueuer, mapLiteralClass, elements);
838 enqueueInResolution(getMapMaker(), elements); 838 enqueueInResolution(getMapMaker(), elements);
839 } else if (cls == compiler.boundClosureClass) { 839 } else if (cls == compiler.boundClosureClass) {
840 // TODO(ngeoffray): Move the bound closure class in the 840 // TODO(ngeoffray): Move the bound closure class in the
841 // backend. 841 // backend.
842 enqueueClass(enqueuer, compiler.boundClosureClass, elements); 842 enqueueClass(enqueuer, compiler.boundClosureClass, elements);
843 } 843 }
844 } 844 }
845 if (cls == compiler.closureClass) {
846 enqueue(enqueuer,
847 compiler.findHelper(const SourceString('closureFromTearOff')),
848 elements);
849 }
845 ClassElement result = null; 850 ClassElement result = null;
846 if (cls == compiler.stringClass || cls == jsStringClass) { 851 if (cls == compiler.stringClass || cls == jsStringClass) {
847 addInterceptors(jsStringClass, enqueuer, elements); 852 addInterceptors(jsStringClass, enqueuer, elements);
848 } else if (cls == compiler.listClass 853 } else if (cls == compiler.listClass
849 || cls == jsArrayClass 854 || cls == jsArrayClass
850 || cls == jsFixedArrayClass 855 || cls == jsFixedArrayClass
851 || cls == jsExtendableArrayClass) { 856 || cls == jsExtendableArrayClass) {
852 addInterceptors(jsArrayClass, enqueuer, elements); 857 addInterceptors(jsArrayClass, enqueuer, elements);
853 addInterceptors(jsMutableArrayClass, enqueuer, elements); 858 addInterceptors(jsMutableArrayClass, enqueuer, elements);
854 addInterceptors(jsFixedArrayClass, enqueuer, elements); 859 addInterceptors(jsFixedArrayClass, enqueuer, elements);
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 copy(constant.values); 1904 copy(constant.values);
1900 copy(constant.protoValue); 1905 copy(constant.protoValue);
1901 copy(constant); 1906 copy(constant);
1902 } 1907 }
1903 1908
1904 void visitConstructed(ConstructedConstant constant) { 1909 void visitConstructed(ConstructedConstant constant) {
1905 copy(constant.fields); 1910 copy(constant.fields);
1906 copy(constant); 1911 copy(constant);
1907 } 1912 }
1908 } 1913 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698