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

Side by Side Diff: frog/leg/ssa/codegen.dart

Issue 9750003: Write our JS blobs for handling native classes in Dart. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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
« frog/leg/lib/native_helper.dart ('K') | « frog/leg/ssa/builder.dart ('k') | no next file » | 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 class SsaCodeGeneratorTask extends CompilerTask { 5 class SsaCodeGeneratorTask extends CompilerTask {
6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); 6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler);
7 String get name() => 'SSA code generator'; 7 String get name() => 'SSA code generator';
8 8
9 String generate(WorkItem work, HGraph graph) { 9 String generate(WorkItem work, HGraph graph) {
10 return measure(() { 10 return measure(() {
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 if (element.computeType(compiler) is FunctionType) return false; 1229 if (element.computeType(compiler) is FunctionType) return false;
1230 1230
1231 if (!element.isClass()) { 1231 if (!element.isClass()) {
1232 compiler.cancel("Is check does not handle element", element: element); 1232 compiler.cancel("Is check does not handle element", element: element);
1233 return false; 1233 return false;
1234 } 1234 }
1235 1235
1236 List<ClassElement> subtypes = 1236 List<ClassElement> subtypes =
1237 compiler.emitter.nativeEmitter.subtypes[element]; 1237 compiler.emitter.nativeEmitter.subtypes[element];
1238 if (subtypes === null) return false; 1238 if (subtypes === null) return false;
1239 compiler.registerStaticUse(compiler.findHelper(
1240 const SourceString('dynamicIsCheck')));
1239 return true; 1241 return true;
1240 } 1242 }
1241 } 1243 }
1242 1244
1243 class SsaOptimizedCodeGenerator extends SsaCodeGenerator { 1245 class SsaOptimizedCodeGenerator extends SsaCodeGenerator {
1244 final List<HTypeGuard> guards; 1246 final List<HTypeGuard> guards;
1245 int state = 0; 1247 int state = 0;
1246 1248
1247 SsaOptimizedCodeGenerator(compiler, work, parameters, parameterNames) 1249 SsaOptimizedCodeGenerator(compiler, work, parameters, parameterNames)
1248 : super(compiler, work, parameters, parameterNames), 1250 : super(compiler, work, parameters, parameterNames),
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 startBailoutSwitch(); 1587 startBailoutSwitch();
1586 } 1588 }
1587 } 1589 }
1588 1590
1589 void endElse(HIf node) { 1591 void endElse(HIf node) {
1590 if (node.elseBlock.hasBailouts()) { 1592 if (node.elseBlock.hasBailouts()) {
1591 endBailoutSwitch(); 1593 endBailoutSwitch();
1592 } 1594 }
1593 } 1595 }
1594 } 1596 }
OLDNEW
« frog/leg/lib/native_helper.dart ('K') | « frog/leg/ssa/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698