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

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

Issue 1169083004: Support foreigns as external. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/js_lib/foreign_helper.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 const VERBOSE_OPTIMIZER_HINTS = false; 7 const VERBOSE_OPTIMIZER_HINTS = false;
8 8
9 class JavaScriptItemCompilationContext extends ItemCompilationContext { 9 class JavaScriptItemCompilationContext extends ItemCompilationContext {
10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>();
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 635
636 ConstantSystem get constantSystem => constants.constantSystem; 636 ConstantSystem get constantSystem => constants.constantSystem;
637 637
638 /// Returns constant environment for the JavaScript interpretation of the 638 /// Returns constant environment for the JavaScript interpretation of the
639 /// constants. 639 /// constants.
640 JavaScriptConstantCompiler get constants { 640 JavaScriptConstantCompiler get constants {
641 return constantCompilerTask.jsConstantCompiler; 641 return constantCompilerTask.jsConstantCompiler;
642 } 642 }
643 643
644 FunctionElement resolveExternalFunction(FunctionElement element) { 644 FunctionElement resolveExternalFunction(FunctionElement element) {
645 if (isForeign(element)) return element;
645 return patchResolverTask.measure(() { 646 return patchResolverTask.measure(() {
646 return patchResolverTask.resolveExternalFunction(element); 647 return patchResolverTask.resolveExternalFunction(element);
647 }); 648 });
648 } 649 }
649 650
650 // TODO(karlklose): Split into findHelperFunction and findHelperClass and 651 // TODO(karlklose): Split into findHelperFunction and findHelperClass and
651 // add a check that the element has the expected kind. 652 // add a check that the element has the expected kind.
652 Element findHelper(String name) => find(jsHelperLibrary, name); 653 Element findHelper(String name) => find(jsHelperLibrary, name);
653 Element findInterceptor(String name) => find(interceptorsLibrary, name); 654 Element findInterceptor(String name) => find(interceptorsLibrary, name);
654 655
(...skipping 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after
2976 } 2977 }
2977 } 2978 }
2978 2979
2979 /// Records that [constant] is used by the element behind [registry]. 2980 /// Records that [constant] is used by the element behind [registry].
2980 class Dependency { 2981 class Dependency {
2981 final ConstantValue constant; 2982 final ConstantValue constant;
2982 final Element annotatedElement; 2983 final Element annotatedElement;
2983 2984
2984 const Dependency(this.constant, this.annotatedElement); 2985 const Dependency(this.constant, this.annotatedElement);
2985 } 2986 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/js_lib/foreign_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698