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

Side by Side Diff: tests/compiler/dart2js/serialization/model_test_helper.dart

Issue 2125643002: Serialize parameter nodes for local functions. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart ('k') | no next file » | 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) 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 library dart2js.serialization_model_test; 5 library dart2js.serialization_model_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'package:async_helper/async_helper.dart'; 9 import 'package:async_helper/async_helper.dart';
10 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 "$member1.nestedClosures", 191 "$member1.nestedClosures",
192 areElementsEquivalent, 192 areElementsEquivalent,
193 verbose: verbose, 193 verbose: verbose,
194 onSameElement: (a, b) { 194 onSameElement: (a, b) {
195 LocalFunctionElement localFunction1 = a.expression; 195 LocalFunctionElement localFunction1 = a.expression;
196 LocalFunctionElement localFunction2 = b.expression; 196 LocalFunctionElement localFunction2 = b.expression;
197 checkElementIdentities( 197 checkElementIdentities(
198 localFunction1, localFunction2, 198 localFunction1, localFunction2,
199 'enclosingClass', 199 'enclosingClass',
200 localFunction1.enclosingClass, localFunction2.enclosingClass); 200 localFunction1.enclosingClass, localFunction2.enclosingClass);
201 testResolvedAstEquivalence(
202 localFunction1.resolvedAst,
203 localFunction2.resolvedAst,
204 const CheckStrategy());
201 }); 205 });
202 } 206 }
203 } 207 }
204 JavaScriptBackend backend1 = compiler1.backend; 208 JavaScriptBackend backend1 = compiler1.backend;
205 JavaScriptBackend backend2 = compiler2.backend; 209 JavaScriptBackend backend2 = compiler2.backend;
206 Expect.equals( 210 Expect.equals(
207 backend1.inlineCache.getCurrentCacheDecisionForTesting(element1), 211 backend1.inlineCache.getCurrentCacheDecisionForTesting(element1),
208 backend2.inlineCache.getCurrentCacheDecisionForTesting(element2), 212 backend2.inlineCache.getCurrentCacheDecisionForTesting(element2),
209 "Inline cache decision mismatch for $element1 vs $element2"); 213 "Inline cache decision mismatch for $element1 vs $element2");
210 } 214 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 return true; 318 return true;
315 } 319 }
316 320
317 String nodeToString(Node node) { 321 String nodeToString(Node node) {
318 String text = '$node'; 322 String text = '$node';
319 if (text.length > 40) { 323 if (text.length > 40) {
320 return '(${node.runtimeType}) ${text.substring(0, 37)}...'; 324 return '(${node.runtimeType}) ${text.substring(0, 37)}...';
321 } 325 }
322 return '(${node.runtimeType}) $text'; 326 return '(${node.runtimeType}) $text';
323 } 327 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698