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

Side by Side Diff: frog/gen.dart

Issue 9233028: Frog dart:dom using interfaces and native implementation classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 8 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 | « client/dom/templates/dom/frog/frog_dom.darttemplate ('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 /** 5 /**
6 * Top level generator object for writing code and keeping track of 6 * Top level generator object for writing code and keeping track of
7 * dependencies. 7 * dependencies.
8 * 8 *
9 * Should have two compilation models, but only one implemented so far. 9 * Should have two compilation models, but only one implemented so far.
10 * 10 *
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 325 }
326 } 326 }
327 327
328 writeType(Type type) { 328 writeType(Type type) {
329 if (type.isWritten) return; 329 if (type.isWritten) return;
330 330
331 type.isWritten = true; 331 type.isWritten = true;
332 writeType(type.genericType); 332 writeType(type.genericType);
333 // Ensure parent has been written before the child. Important ordering for 333 // Ensure parent has been written before the child. Important ordering for
334 // IE when we're using $inherits, since we don't have __proto__ available. 334 // IE when we're using $inherits, since we don't have __proto__ available.
335 if (type.parent != null && !type.isNative) { 335 if (type.parent != null) {
336 writeType(type.parent); 336 writeType(type.parent);
337 } 337 }
338 338
339 var typeName = type.jsname != null ? type.jsname : 'top level'; 339 var typeName = type.jsname != null ? type.jsname : 'top level';
340 writer.comment('// ********** Code for ${typeName} **************'); 340 writer.comment('// ********** Code for ${typeName} **************');
341 if (type.isNative && !type.isTop && !type.isConcreteGeneric) { 341 if (type.isNative && !type.isTop && !type.isConcreteGeneric) {
342 var nativeName = type.definition.nativeType.name; 342 var nativeName = type.definition.nativeType.name;
343 if (nativeName == '') { 343 if (nativeName == '') {
344 writer.writeln('function ${type.jsname}() {}'); 344 writer.writeln('function ${type.jsname}() {}');
345 } else if (type.jsname != nativeName) { 345 } else if (type.jsname != nativeName) {
(...skipping 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after
2430 return true; 2430 return true;
2431 } 2431 }
2432 2432
2433 } 2433 }
2434 2434
2435 class ReturnKind { 2435 class ReturnKind {
2436 static final int IGNORE = 1; 2436 static final int IGNORE = 1;
2437 static final int POST = 2; 2437 static final int POST = 2;
2438 static final int PRE = 3; 2438 static final int PRE = 3;
2439 } 2439 }
OLDNEW
« no previous file with comments | « client/dom/templates/dom/frog/frog_dom.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698