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

Side by Side Diff: lib/compiler/implementation/native_handler.dart

Issue 10854066: Start moving the JavaScript backend related code into a separate library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add missing import Created 8 years, 4 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 #library('native'); 5 #library('native');
6 #import('dart:uri'); 6 #import('dart:uri');
7 #import('leg.dart'); 7 #import('leg.dart');
8 #import('elements/elements.dart'); 8 #import('elements/elements.dart');
9 #import('js_backend/js_backend.dart');
9 #import('scanner/scannerlib.dart'); 10 #import('scanner/scannerlib.dart');
10 #import('ssa/ssa.dart'); 11 #import('ssa/ssa.dart');
11 #import('tree/tree.dart'); 12 #import('tree/tree.dart');
12 #import('util/util.dart'); 13 #import('util/util.dart');
13 14
14 void processNativeClasses(Enqueuer world, 15 void processNativeClasses(Enqueuer world,
15 CodeEmitterTask emitter, 16 CodeEmitterTask emitter,
16 Collection<LibraryElement> libraries) { 17 Collection<LibraryElement> libraries) {
17 for (LibraryElement library in libraries) { 18 for (LibraryElement library in libraries) {
18 processNativeClassesInLibrary(world, emitter, library); 19 processNativeClassesInLibrary(world, emitter, library);
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 String parameters) { 330 String parameters) {
330 buffer.add(" if (Object.getPrototypeOf(this).hasOwnProperty"); 331 buffer.add(" if (Object.getPrototypeOf(this).hasOwnProperty");
331 buffer.add("('$methodName')) {\n"); 332 buffer.add("('$methodName')) {\n");
332 buffer.add(" $code"); 333 buffer.add(" $code");
333 buffer.add(" } else {\n"); 334 buffer.add(" } else {\n");
334 buffer.add(" return Object.prototype.$methodName.call(this"); 335 buffer.add(" return Object.prototype.$methodName.call(this");
335 buffer.add(parameters == '' ? '' : ', $parameters'); 336 buffer.add(parameters == '' ? '' : ', $parameters');
336 buffer.add(");\n"); 337 buffer.add(");\n");
337 buffer.add(" }\n"); 338 buffer.add(" }\n");
338 } 339 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/native_emitter.dart ('k') | lib/compiler/implementation/ssa/ssa.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698