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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart

Issue 132063005: Add option to disable IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/site/try/Makefile » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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.ir_builder; 5 library dart2js.ir_builder;
6 6
7 import 'ir_nodes.dart'; 7 import 'ir_nodes.dart';
8 import '../elements/elements.dart'; 8 import '../elements/elements.dart';
9 import '../elements/modelx.dart' show FunctionElementX; 9 import '../elements/modelx.dart' show FunctionElementX;
10 import '../dart2jslib.dart'; 10 import '../dart2jslib.dart';
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 }); 88 });
89 } 89 }
90 90
91 bool irEnabled() { 91 bool irEnabled() {
92 // TODO(lry): support checked-mode checks. 92 // TODO(lry): support checked-mode checks.
93 if (compiler.enableTypeAssertions || 93 if (compiler.enableTypeAssertions ||
94 compiler.backend is !JavaScriptBackend || 94 compiler.backend is !JavaScriptBackend ||
95 compiler.enableConcreteTypeInference) { 95 compiler.enableConcreteTypeInference) {
96 return false; 96 return false;
97 } 97 }
98 return true; 98 return const bool.fromEnvironment('enable_ir', defaultValue: true);
99 } 99 }
100 100
101 bool canBuild(Element element) { 101 bool canBuild(Element element) {
102 // TODO(lry): support lazy initializers. 102 // TODO(lry): support lazy initializers.
103 FunctionElement function = element.asFunctionElement(); 103 FunctionElement function = element.asFunctionElement();
104 if (function == null) return false; 104 if (function == null) return false;
105 105
106 // TODO(lry): support functions with parameters. 106 // TODO(lry): support functions with parameters.
107 FunctionSignature signature = function.computeSignature(compiler); 107 FunctionSignature signature = function.computeSignature(compiler);
108 if (signature.parameterCount > 0) return false; 108 if (signature.parameterCount > 0) return false;
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 415
416 void exitBlock() { 416 void exitBlock() {
417 blockBuilders.removeLast(); 417 blockBuilders.removeLast();
418 } 418 }
419 } 419 }
420 420
421 class BlockBuilder { 421 class BlockBuilder {
422 List<IrNode> statements = <IrNode>[]; 422 List<IrNode> statements = <IrNode>[];
423 bool hasReturn = false; 423 bool hasReturn = false;
424 } 424 }
OLDNEW
« no previous file with comments | « no previous file | dart/site/try/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698