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

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

Issue 10413073: Fix type error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 7 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 | 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 #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('scanner/scannerlib.dart'); 9 #import('scanner/scannerlib.dart');
10 #import('ssa/ssa.dart'); 10 #import('ssa/ssa.dart');
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 classElement.ensureResolved(compiler); 53 classElement.ensureResolved(compiler);
54 // Add the information that this class is a subtype of 54 // Add the information that this class is a subtype of
55 // its supertypes. The code emitter and the ssa builder use that 55 // its supertypes. The code emitter and the ssa builder use that
56 // information. 56 // information.
57 addSubtypes(classElement, emitter.nativeEmitter); 57 addSubtypes(classElement, emitter.nativeEmitter);
58 } 58 }
59 } 59 }
60 } 60 }
61 if (hasNativeClass) { 61 if (hasNativeClass) {
62 final worlds = [compiler.enqueuer.resolution, compiler.enqueuer.codegen]; 62 final worlds = [compiler.enqueuer.resolution, compiler.enqueuer.codegen];
63 for (Universe world in worlds) { 63 for (var world in worlds) {
64 world.registerStaticUse(compiler.findHelper( 64 world.registerStaticUse(compiler.findHelper(
65 const SourceString('dynamicFunction'))); 65 const SourceString('dynamicFunction')));
66 world.registerStaticUse(compiler.findHelper( 66 world.registerStaticUse(compiler.findHelper(
67 const SourceString('dynamicSetMetadata'))); 67 const SourceString('dynamicSetMetadata')));
68 world.registerStaticUse(compiler.findHelper( 68 world.registerStaticUse(compiler.findHelper(
69 const SourceString('defineProperty'))); 69 const SourceString('defineProperty')));
70 world.registerStaticUse(compiler.findHelper( 70 world.registerStaticUse(compiler.findHelper(
71 const SourceString('toStringForNativeObject'))); 71 const SourceString('toStringForNativeObject')));
72 } 72 }
73 } 73 }
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 String parameters) { 350 String parameters) {
351 buffer.add(" if (Object.getPrototypeOf(this).hasOwnProperty"); 351 buffer.add(" if (Object.getPrototypeOf(this).hasOwnProperty");
352 buffer.add("('$methodName')) {\n"); 352 buffer.add("('$methodName')) {\n");
353 buffer.add(" $code"); 353 buffer.add(" $code");
354 buffer.add(" } else {\n"); 354 buffer.add(" } else {\n");
355 buffer.add(" return Object.prototype.$methodName.call(this"); 355 buffer.add(" return Object.prototype.$methodName.call(this");
356 buffer.add(parameters == '' ? '' : ', $parameters'); 356 buffer.add(parameters == '' ? '' : ', $parameters');
357 buffer.add(");\n"); 357 buffer.add(");\n");
358 buffer.add(" }\n"); 358 buffer.add(" }\n");
359 } 359 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698