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

Side by Side Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1888803002: Support serialization of all resolved asts from dart:core (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix unittests. Created 4 years, 8 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) 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 import 'dart:collection'; 5 import 'dart:collection';
6 6
7 import 'package:js_runtime/shared/embedded_names.dart'; 7 import 'package:js_runtime/shared/embedded_names.dart';
8 8
9 import '../closure.dart'; 9 import '../closure.dart';
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 4866 matching lines...) Expand 10 before | Expand all | Expand 10 after
4877 ConstructorElement constructorDeclaration = constructor; 4877 ConstructorElement constructorDeclaration = constructor;
4878 ConstructorElement constructorImplementation = constructor.implementation; 4878 ConstructorElement constructorImplementation = constructor.implementation;
4879 constructor = constructorImplementation.effectiveTarget; 4879 constructor = constructorImplementation.effectiveTarget;
4880 4880
4881 final bool isSymbolConstructor = 4881 final bool isSymbolConstructor =
4882 constructorDeclaration == compiler.symbolConstructor; 4882 constructorDeclaration == compiler.symbolConstructor;
4883 final bool isJSArrayTypedConstructor = 4883 final bool isJSArrayTypedConstructor =
4884 constructorDeclaration == helpers.jsArrayTypedConstructor; 4884 constructorDeclaration == helpers.jsArrayTypedConstructor;
4885 4885
4886 if (isSymbolConstructor) { 4886 if (isSymbolConstructor) {
4887 constructor = compiler.symbolValidatedConstructor; 4887 constructor = helpers.symbolValidatedConstructor;
4888 assert(invariant(send, constructor != null, 4888 assert(invariant(send, constructor != null,
4889 message: 'Constructor Symbol.validated is missing')); 4889 message: 'Constructor Symbol.validated is missing'));
4890 callStructure = compiler.symbolValidatedConstructorSelector.callStructure; 4890 callStructure = helpers.symbolValidatedConstructorSelector.callStructure;
4891 assert(invariant(send, callStructure != null, 4891 assert(invariant(send, callStructure != null,
4892 message: 'Constructor Symbol.validated is missing')); 4892 message: 'Constructor Symbol.validated is missing'));
4893 } 4893 }
4894 4894
4895 bool isRedirected = constructorDeclaration.isRedirectingFactory; 4895 bool isRedirected = constructorDeclaration.isRedirectingFactory;
4896 if (!constructorDeclaration.isCyclicRedirection) { 4896 if (!constructorDeclaration.isCyclicRedirection) {
4897 // Insert a check for every deferred redirection on the path to the 4897 // Insert a check for every deferred redirection on the path to the
4898 // final target. 4898 // final target.
4899 ConstructorElement target = constructorDeclaration; 4899 ConstructorElement target = constructorDeclaration;
4900 while (target.isRedirectingFactory) { 4900 while (target.isRedirectingFactory) {
(...skipping 3668 matching lines...) Expand 10 before | Expand all | Expand 10 after
8569 const _LoopTypeVisitor(); 8569 const _LoopTypeVisitor();
8570 int visitNode(ast.Node node) => HLoopBlockInformation.NOT_A_LOOP; 8570 int visitNode(ast.Node node) => HLoopBlockInformation.NOT_A_LOOP;
8571 int visitWhile(ast.While node) => HLoopBlockInformation.WHILE_LOOP; 8571 int visitWhile(ast.While node) => HLoopBlockInformation.WHILE_LOOP;
8572 int visitFor(ast.For node) => HLoopBlockInformation.FOR_LOOP; 8572 int visitFor(ast.For node) => HLoopBlockInformation.FOR_LOOP;
8573 int visitDoWhile(ast.DoWhile node) => HLoopBlockInformation.DO_WHILE_LOOP; 8573 int visitDoWhile(ast.DoWhile node) => HLoopBlockInformation.DO_WHILE_LOOP;
8574 int visitAsyncForIn(ast.AsyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP; 8574 int visitAsyncForIn(ast.AsyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP;
8575 int visitSyncForIn(ast.SyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP; 8575 int visitSyncForIn(ast.SyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP;
8576 int visitSwitchStatement(ast.SwitchStatement node) => 8576 int visitSwitchStatement(ast.SwitchStatement node) =>
8577 HLoopBlockInformation.SWITCH_CONTINUE_LOOP; 8577 HLoopBlockInformation.SWITCH_CONTINUE_LOOP;
8578 } 8578 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/serialization/equivalence.dart ('k') | tests/compiler/dart2js/memory_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698