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

Side by Side Diff: tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart

Issue 1161823004: Handle .fromEnvironment and incompatible constructor invocations (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Change handling of incompatible redirecting factories. Created 5 years, 6 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 dart2js.semantics_visitor_test; 5 part of dart2js.semantics_visitor_test;
6 6
7 class SemanticSendTestVisitor extends SemanticTestVisitor { 7 class SemanticSendTestVisitor extends SemanticTestVisitor {
8 8
9 SemanticSendTestVisitor(TreeElements elements) : super(elements); 9 SemanticSendTestVisitor(TreeElements elements) : super(elements);
10 10
(...skipping 2320 matching lines...) Expand 10 before | Expand all | Expand 10 after
2331 apply(arguments, arg); 2331 apply(arguments, arg);
2332 } 2332 }
2333 2333
2334 @override 2334 @override
2335 visitConstConstructorInvoke( 2335 visitConstConstructorInvoke(
2336 NewExpression node, 2336 NewExpression node,
2337 ConstructedConstantExpression constant, 2337 ConstructedConstantExpression constant,
2338 arg) { 2338 arg) {
2339 visits.add(new Visit(VisitKind.VISIT_CONST_CONSTRUCTOR_INVOKE, 2339 visits.add(new Visit(VisitKind.VISIT_CONST_CONSTRUCTOR_INVOKE,
2340 constant: constant.getText())); 2340 constant: constant.getText()));
2341 super.visitConstConstructorInvoke(node, constant, arg);
2341 } 2342 }
2342 2343
2343 @override 2344 @override
2345 visitBoolFromEnvironmentConstructorInvoke(
2346 NewExpression node,
2347 BoolFromEnvironmentConstantExpression constant,
2348 arg) {
2349 visits.add(new Visit(
2350 VisitKind.VISIT_BOOL_FROM_ENVIRONMENT_CONSTRUCTOR_INVOKE,
2351 constant: constant.getText()));
2352 super.visitBoolFromEnvironmentConstructorInvoke(node, constant, arg);
2353 }
2354
2355 @override
2356 visitIntFromEnvironmentConstructorInvoke(
2357 NewExpression node,
2358 IntFromEnvironmentConstantExpression constant,
2359 arg) {
2360 visits.add(new Visit(
2361 VisitKind.VISIT_INT_FROM_ENVIRONMENT_CONSTRUCTOR_INVOKE,
2362 constant: constant.getText()));
2363 super.visitIntFromEnvironmentConstructorInvoke(node, constant, arg);
2364 }
2365
2366 @override
2367 visitStringFromEnvironmentConstructorInvoke(
2368 NewExpression node,
2369 StringFromEnvironmentConstantExpression constant,
2370 arg) {
2371 visits.add(new Visit(
2372 VisitKind.VISIT_STRING_FROM_ENVIRONMENT_CONSTRUCTOR_INVOKE,
2373 constant: constant.getText()));
2374 super.visitStringFromEnvironmentConstructorInvoke(node, constant, arg);
2375 }
2376
2377 @override
2378 errorNonConstantConstructorInvoke(
2379 NewExpression node,
2380 Element element,
2381 DartType type,
2382 NodeList arguments,
2383 CallStructure callStructure,
2384 arg) {
2385 visits.add(new Visit(VisitKind.ERROR_NON_CONSTANT_CONSTRUCTOR_INVOKE,
2386 element: element, type: type,
2387 arguments: arguments, selector: callStructure));
2388 super.errorNonConstantConstructorInvoke(
2389 node, element, type, arguments, callStructure, arg);
2390 }
2391
2392 @override
2393 visitConstructorIncompatibleInvoke(
2394 NewExpression node,
2395 ConstructorElement constructor,
2396 InterfaceType type,
2397 NodeList arguments,
2398 CallStructure callStructure,
2399 arg) {
2400 visits.add(new Visit(VisitKind.VISIT_CONSTRUCTOR_INCOMPATIBLE_INVOKE,
2401 element: constructor, type: type,
2402 arguments: arguments, selector: callStructure));
2403 super.visitConstructorIncompatibleInvoke(
2404 node, constructor, type, arguments, callStructure, arg);
2405 }
2406
2407 @override
2344 visitFactoryConstructorInvoke( 2408 visitFactoryConstructorInvoke(
2345 NewExpression node, 2409 NewExpression node,
2346 ConstructorElement constructor, 2410 ConstructorElement constructor,
2347 InterfaceType type, 2411 InterfaceType type,
2348 NodeList arguments, 2412 NodeList arguments,
2349 CallStructure callStructure, 2413 CallStructure callStructure,
2350 arg) { 2414 arg) {
2351 visits.add(new Visit( 2415 visits.add(new Visit(
2352 VisitKind.VISIT_FACTORY_CONSTRUCTOR_INVOKE, 2416 VisitKind.VISIT_FACTORY_CONSTRUCTOR_INVOKE,
2353 element: constructor, 2417 element: constructor,
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
2711 visitUnresolvedSuperSetterPrefix( 2775 visitUnresolvedSuperSetterPrefix(
2712 Send node, 2776 Send node,
2713 MethodElement getter, 2777 MethodElement getter,
2714 Element element, 2778 Element element,
2715 IncDecOperator operator, 2779 IncDecOperator operator,
2716 arg) { 2780 arg) {
2717 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_PREFIX, 2781 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_PREFIX,
2718 getter: getter, operator: operator)); 2782 getter: getter, operator: operator));
2719 } 2783 }
2720 } 2784 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/semantic_visitor_test_send_data.dart ('k') | tests/corelib/corelib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698