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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 923113002: dart2js: fix dart2js crash when getRuntimeTypeArgument was not registered. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | tests/language/function_type3_test.dart » ('j') | 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 part of js_backend; 5 part of js_backend;
6 6
7 const VERBOSE_OPTIMIZER_HINTS = false; 7 const VERBOSE_OPTIMIZER_HINTS = false;
8 8
9 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR"); 9 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR");
10 10
(...skipping 2556 matching lines...) Expand 10 before | Expand all | Expand 10 after
2567 assert(registry.isForResolution); 2567 assert(registry.isForResolution);
2568 type = type.unalias(backend.compiler); 2568 type = type.unalias(backend.compiler);
2569 registerBackendInstantiation(backend.compiler.boolClass, registry); 2569 registerBackendInstantiation(backend.compiler.boolClass, registry);
2570 bool inCheckedMode = backend.compiler.enableTypeAssertions; 2570 bool inCheckedMode = backend.compiler.enableTypeAssertions;
2571 if (inCheckedMode) { 2571 if (inCheckedMode) {
2572 registerBackendStaticInvocation(backend.getThrowRuntimeError(), registry); 2572 registerBackendStaticInvocation(backend.getThrowRuntimeError(), registry);
2573 } 2573 }
2574 if (type.isMalformed) { 2574 if (type.isMalformed) {
2575 registerBackendStaticInvocation(backend.getThrowTypeError(), registry); 2575 registerBackendStaticInvocation(backend.getThrowTypeError(), registry);
2576 } 2576 }
2577 if (!type.treatAsRaw || type.containsTypeVariables) { 2577 if (!type.treatAsRaw || type.containsTypeVariables || type.isFunctionType) {
2578 // TODO(johnniwinther): Investigate why this is needed. 2578 // TODO(johnniwinther): Investigate why this is needed.
2579 registerBackendStaticInvocation( 2579 registerBackendStaticInvocation(
2580 backend.getSetRuntimeTypeInfo(), registry); 2580 backend.getSetRuntimeTypeInfo(), registry);
2581 registerBackendStaticInvocation( 2581 registerBackendStaticInvocation(
2582 backend.getGetRuntimeTypeInfo(), registry); 2582 backend.getGetRuntimeTypeInfo(), registry);
2583 backend.registerGetRuntimeTypeArgument(registry); 2583 backend.registerGetRuntimeTypeArgument(registry);
2584 if (inCheckedMode) { 2584 if (inCheckedMode) {
2585 registerBackendStaticInvocation(backend.getAssertSubtype(), registry); 2585 registerBackendStaticInvocation(backend.getAssertSubtype(), registry);
2586 } 2586 }
2587 registerBackendStaticInvocation(backend.getCheckSubtype(), registry); 2587 registerBackendStaticInvocation(backend.getCheckSubtype(), registry);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
2681 } 2681 }
2682 } 2682 }
2683 2683
2684 /// Records that [constant] is used by the element behind [registry]. 2684 /// Records that [constant] is used by the element behind [registry].
2685 class Dependency { 2685 class Dependency {
2686 final ConstantValue constant; 2686 final ConstantValue constant;
2687 final Element annotatedElement; 2687 final Element annotatedElement;
2688 2688
2689 const Dependency(this.constant, this.annotatedElement); 2689 const Dependency(this.constant, this.annotatedElement);
2690 } 2690 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/function_type3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698