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

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: Fix after rebase. 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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 LiteralString jsCode = nativeBody.asLiteralString(); 1187 LiteralString jsCode = nativeBody.asLiteralString();
1190 builder.push(new HForeign.statement( 1188 builder.push(new HForeign.statement(
1191 js.js.statementTemplateYielding( 1189 js.js.statementTemplateYielding(
1192 new js.LiteralStatement(jsCode.dartString.slowToString())), 1190 new js.LiteralStatement(jsCode.dartString.slowToString())),
1193 <HInstruction>[], 1191 <HInstruction>[],
1194 new SideEffects(), 1192 new SideEffects(),
1195 null, 1193 null,
1196 backend.dynamicType)); 1194 backend.dynamicType));
1197 } 1195 }
1198 } 1196 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js_backend/backend.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698