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

Side by Side Diff: pkg/compiler/lib/src/world.dart

Issue 1408043002: Move native and js interop properties from the element model to the JS backend (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 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
« no previous file with comments | « pkg/compiler/lib/src/universe/universe.dart ('k') | tests/compiler/dart2js/parser_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 library dart2js.world; 5 library dart2js.world;
6 6
7 import 'closure.dart' show 7 import 'closure.dart' show
8 SynthesizedCallMethodElementX; 8 SynthesizedCallMethodElementX;
9 import 'common.dart'; 9 import 'common.dart';
10 import 'common/backend_api.dart' show 10 import 'common/backend_api.dart' show
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 void addFunctionCalledInLoop(Element element) { 603 void addFunctionCalledInLoop(Element element) {
604 functionsCalledInLoop.add(element.declaration); 604 functionsCalledInLoop.add(element.declaration);
605 } 605 }
606 606
607 bool isCalledInLoop(Element element) { 607 bool isCalledInLoop(Element element) {
608 return functionsCalledInLoop.contains(element.declaration); 608 return functionsCalledInLoop.contains(element.declaration);
609 } 609 }
610 610
611 bool fieldNeverChanges(Element element) { 611 bool fieldNeverChanges(Element element) {
612 if (!element.isField) return false; 612 if (!element.isField) return false;
613 if (element.isNative) { 613 if (backend.isNative(element)) {
614 // Some native fields are views of data that may be changed by operations. 614 // Some native fields are views of data that may be changed by operations.
615 // E.g. node.firstChild depends on parentNode.removeBefore(n1, n2). 615 // E.g. node.firstChild depends on parentNode.removeBefore(n1, n2).
616 // TODO(sra): Refine the effect classification so that native effects are 616 // TODO(sra): Refine the effect classification so that native effects are
617 // distinct from ordinary Dart effects. 617 // distinct from ordinary Dart effects.
618 return false; 618 return false;
619 } 619 }
620 620
621 return element.isFinal 621 return element.isFinal
622 || element.isConst 622 || element.isConst
623 || (element.isInstanceMember 623 || (element.isInstanceMember
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 // function expressions's element. 692 // function expressions's element.
693 // TODO(herhut): Generate classes for function expressions earlier. 693 // TODO(herhut): Generate classes for function expressions earlier.
694 if (element is SynthesizedCallMethodElementX) { 694 if (element is SynthesizedCallMethodElementX) {
695 return getMightBePassedToApply(element.expression); 695 return getMightBePassedToApply(element.expression);
696 } 696 }
697 return functionsThatMightBePassedToApply.contains(element); 697 return functionsThatMightBePassedToApply.contains(element);
698 } 698 }
699 699
700 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; 700 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport;
701 } 701 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/universe/universe.dart ('k') | tests/compiler/dart2js/parser_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698