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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart

Issue 1189983004: Fix in-test (missing parenthesis). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
« no previous file with comments | « no previous file | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 7
8 class OldEmitter implements Emitter { 8 class OldEmitter implements Emitter {
9 final Compiler compiler; 9 final Compiler compiler;
10 final CodeEmitterTask task; 10 final CodeEmitterTask task;
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 new jsAst.VariableDeclaration(constructorName), constructorAst)); 1032 new jsAst.VariableDeclaration(constructorName), constructorAst));
1033 1033
1034 String fieldNamesProperty = FIELD_NAMES_PROPERTY_NAME; 1034 String fieldNamesProperty = FIELD_NAMES_PROPERTY_NAME;
1035 bool hasIsolateSupport = compiler.hasIsolateSupport; 1035 bool hasIsolateSupport = compiler.hasIsolateSupport;
1036 jsAst.Node fieldNamesArray = 1036 jsAst.Node fieldNamesArray =
1037 hasIsolateSupport ? js.stringArray(fields) : new jsAst.LiteralNull(); 1037 hasIsolateSupport ? js.stringArray(fields) : new jsAst.LiteralNull();
1038 1038
1039 cspPrecompiledFunctionFor(outputUnit).add(js.statement(r''' 1039 cspPrecompiledFunctionFor(outputUnit).add(js.statement(r'''
1040 { 1040 {
1041 #constructorName.#typeNameProperty = #constructorNameString; 1041 #constructorName.#typeNameProperty = #constructorNameString;
1042 if (!"name" in #constructorName) 1042 // IE does not have a name property.
1043 if (!("name" in #constructorName))
1043 #constructorName.name = #constructorNameString; 1044 #constructorName.name = #constructorNameString;
1044 $desc = $collectedClasses$.#constructorName[1]; 1045 $desc = $collectedClasses$.#constructorName[1];
1045 #constructorName.prototype = $desc; 1046 #constructorName.prototype = $desc;
1046 ''' /* next string is not a raw string */ ''' 1047 ''' /* next string is not a raw string */ '''
1047 if (#hasIsolateSupport) { 1048 if (#hasIsolateSupport) {
1048 #constructorName.$fieldNamesProperty = #fieldNamesArray; 1049 #constructorName.$fieldNamesProperty = #fieldNamesArray;
1049 } 1050 }
1050 }''', 1051 }''',
1051 {"constructorName": constructorName, 1052 {"constructorName": constructorName,
1052 "typeNameProperty": typeNameProperty, 1053 "typeNameProperty": typeNameProperty,
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
2001 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { 2002 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) {
2002 if (element.isInstanceMember) { 2003 if (element.isInstanceMember) {
2003 cachedClassBuilders.remove(element.enclosingClass); 2004 cachedClassBuilders.remove(element.enclosingClass);
2004 2005
2005 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 2006 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
2006 2007
2007 } 2008 }
2008 } 2009 }
2009 } 2010 }
2010 } 2011 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698