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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 11975049: Allowing inlining of static getters and methods in a different library. Also report an error if a g… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
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 ssa; 5 part of ssa;
6 6
7 class SsaCodeGeneratorTask extends CompilerTask { 7 class SsaCodeGeneratorTask extends CompilerTask {
8 8
9 final JavaScriptBackend backend; 9 final JavaScriptBackend backend;
10 10
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 collectedVariableDeclarations = new OrderedSet<String>(), 217 collectedVariableDeclarations = new OrderedSet<String>(),
218 currentContainer = new js.Block.empty(), 218 currentContainer = new js.Block.empty(),
219 parameters = <js.Parameter>[], 219 parameters = <js.Parameter>[],
220 expressionStack = <js.Expression>[], 220 expressionStack = <js.Expression>[],
221 oldContainerStack = <js.Block>[], 221 oldContainerStack = <js.Block>[],
222 generateAtUseSite = new Set<HInstruction>(), 222 generateAtUseSite = new Set<HInstruction>(),
223 controlFlowOperators = new Set<HInstruction>(), 223 controlFlowOperators = new Set<HInstruction>(),
224 breakAction = new Map<Element, ElementAction>(), 224 breakAction = new Map<Element, ElementAction>(),
225 continueAction = new Map<Element, ElementAction>(); 225 continueAction = new Map<Element, ElementAction>();
226 226
227 LibraryElement get currentLibrary => work.element.getLibrary();
228 Compiler get compiler => backend.compiler; 227 Compiler get compiler => backend.compiler;
229 NativeEmitter get nativeEmitter => backend.emitter.nativeEmitter; 228 NativeEmitter get nativeEmitter => backend.emitter.nativeEmitter;
230 CodegenEnqueuer get world => backend.compiler.enqueuer.codegen; 229 CodegenEnqueuer get world => backend.compiler.enqueuer.codegen;
231 230
232 bool isGenerateAtUseSite(HInstruction instruction) { 231 bool isGenerateAtUseSite(HInstruction instruction) {
233 return generateAtUseSite.contains(instruction); 232 return generateAtUseSite.contains(instruction);
234 } 233 }
235 234
236 bool isNonNegativeInt32Constant(HInstruction instruction) { 235 bool isNonNegativeInt32Constant(HInstruction instruction) {
237 if (instruction.isConstantInteger()) { 236 if (instruction.isConstantInteger()) {
(...skipping 2780 matching lines...) Expand 10 before | Expand all | Expand 10 after
3018 if (leftType.canBeNull() && rightType.canBeNull()) { 3017 if (leftType.canBeNull() && rightType.canBeNull()) {
3019 if (left.isConstantNull() || right.isConstantNull() || 3018 if (left.isConstantNull() || right.isConstantNull() ||
3020 (leftType.isPrimitive() && leftType == rightType)) { 3019 (leftType.isPrimitive() && leftType == rightType)) {
3021 return '=='; 3020 return '==';
3022 } 3021 }
3023 return null; 3022 return null;
3024 } else { 3023 } else {
3025 return '==='; 3024 return '===';
3026 } 3025 }
3027 } 3026 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698