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

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

Issue 362243003: Generate mock libraries and assert that helpers are non-null. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 6
7 import 'dart:collection' show Queue; 7 import 'dart:collection' show Queue;
8 import 'dart2jslib.dart'; 8 import 'dart2jslib.dart';
9 import 'dart_types.dart'; 9 import 'dart_types.dart';
10 import 'elements/elements.dart'; 10 import 'elements/elements.dart';
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 Iterable matches = unusedClasses.where(predicate); 518 Iterable matches = unusedClasses.where(predicate);
519 matches.toList().forEach((c) => enqueueClass(c, cause)); 519 matches.toList().forEach((c) => enqueueClass(c, cause));
520 } 520 }
521 521
522 onFirstNativeClass() { 522 onFirstNativeClass() {
523 staticUse(name) { 523 staticUse(name) {
524 backend.enqueue( 524 backend.enqueue(
525 world, backend.findHelper(name), compiler.globalDependencies); 525 world, backend.findHelper(name), compiler.globalDependencies);
526 } 526 }
527 527
528 staticUse('dynamicFunction');
529 staticUse('dynamicSetMetadata');
530 staticUse('defineProperty'); 528 staticUse('defineProperty');
531 staticUse('toStringForNativeObject'); 529 staticUse('toStringForNativeObject');
532 staticUse('hashCodeForNativeObject'); 530 staticUse('hashCodeForNativeObject');
533 staticUse('convertDartClosureToJS'); 531 staticUse('convertDartClosureToJS');
534 addNativeExceptions(); 532 addNativeExceptions();
535 } 533 }
536 534
537 addNativeExceptions() { 535 addNativeExceptions() {
538 enqueueUnusedClassesMatching((classElement) { 536 enqueueUnusedClassesMatching((classElement) {
539 // TODO(sra): Annotate exception classes in dart:html. 537 // TODO(sra): Annotate exception classes in dart:html.
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 LiteralString jsCode = nativeBody.asLiteralString(); 1191 LiteralString jsCode = nativeBody.asLiteralString();
1194 builder.push(new HForeign.statement( 1192 builder.push(new HForeign.statement(
1195 js.js.statementTemplateYielding( 1193 js.js.statementTemplateYielding(
1196 new js.LiteralStatement(jsCode.dartString.slowToString())), 1194 new js.LiteralStatement(jsCode.dartString.slowToString())),
1197 <HInstruction>[], 1195 <HInstruction>[],
1198 new SideEffects(), 1196 new SideEffects(),
1199 null, 1197 null,
1200 backend.dynamicType)); 1198 backend.dynamicType));
1201 } 1199 }
1202 } 1200 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698