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

Side by Side Diff: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart

Issue 1318043005: Support user generated custom native JS classes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: about to land Created 5 years, 2 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
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/js_backend/backend.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 type_graph_inferrer; 5 part of type_graph_inferrer;
6 6
7 /** 7 /**
8 * Common class for all nodes in the graph. The current nodes are: 8 * Common class for all nodes in the graph. The current nodes are:
9 * 9 *
10 * - Concrete types 10 * - Concrete types
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 // Use the type annotation as the type for native elements. We 408 // Use the type annotation as the type for native elements. We
409 // also give up on inferring to make sure this element never 409 // also give up on inferring to make sure this element never
410 // goes in the work queue. 410 // goes in the work queue.
411 giveUp(inferrer); 411 giveUp(inferrer);
412 if (element.isField) { 412 if (element.isField) {
413 return inferrer.typeOfNativeBehavior( 413 return inferrer.typeOfNativeBehavior(
414 native.NativeBehavior.ofFieldLoad(element, inferrer.compiler)).type; 414 native.NativeBehavior.ofFieldLoad(element, inferrer.compiler)).type;
415 } else { 415 } else {
416 assert(element.isFunction || 416 assert(element.isFunction ||
417 element.isGetter || 417 element.isGetter ||
418 element.isSetter); 418 element.isSetter ||
419 element.isConstructor);
419 TypedElement typedElement = element; 420 TypedElement typedElement = element;
420 var elementType = typedElement.type; 421 var elementType = typedElement.type;
421 if (elementType.kind != TypeKind.FUNCTION) { 422 if (elementType.kind != TypeKind.FUNCTION) {
422 return safeType(inferrer); 423 return safeType(inferrer);
423 } else { 424 } else {
424 return inferrer.typeOfNativeBehavior( 425 return inferrer.typeOfNativeBehavior(
425 native.NativeBehavior.ofMethod(element, inferrer.compiler)).type; 426 native.NativeBehavior.ofMethod(element, inferrer.compiler)).type;
426 } 427 }
427 } 428 }
428 } 429 }
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 T visitStringLiteralTypeInformation(StringLiteralTypeInformation info); 1604 T visitStringLiteralTypeInformation(StringLiteralTypeInformation info);
1604 T visitBoolLiteralTypeInformation(BoolLiteralTypeInformation info); 1605 T visitBoolLiteralTypeInformation(BoolLiteralTypeInformation info);
1605 T visitClosureCallSiteTypeInformation(ClosureCallSiteTypeInformation info); 1606 T visitClosureCallSiteTypeInformation(ClosureCallSiteTypeInformation info);
1606 T visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info); 1607 T visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info);
1607 T visitDynamicCallSiteTypeInformation(DynamicCallSiteTypeInformation info); 1608 T visitDynamicCallSiteTypeInformation(DynamicCallSiteTypeInformation info);
1608 T visitMemberTypeInformation(MemberTypeInformation info); 1609 T visitMemberTypeInformation(MemberTypeInformation info);
1609 T visitParameterTypeInformation(ParameterTypeInformation info); 1610 T visitParameterTypeInformation(ParameterTypeInformation info);
1610 T visitClosureTypeInformation(ClosureTypeInformation info); 1611 T visitClosureTypeInformation(ClosureTypeInformation info);
1611 T visitAwaitTypeInformation(AwaitTypeInformation info); 1612 T visitAwaitTypeInformation(AwaitTypeInformation info);
1612 } 1613 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698