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

Unified Diff: pkg/dev_compiler/lib/src/compiler/code_generator.dart

Issue 2698353003: unfork DDC's copy of most SDK libraries (Closed)
Patch Set: revert core_patch Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/dev_compiler/lib/sdk/ddc_sdk.sum ('k') | pkg/dev_compiler/package.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/src/compiler/code_generator.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/code_generator.dart b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
index 24aac39abbdb4c5e7b1c3bd363f5bee5d8bb218b..f4e61da44422239f4f04ae2fd3e03ef94ba912cf 100644
--- a/pkg/dev_compiler/lib/src/compiler/code_generator.dart
+++ b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
@@ -127,7 +127,7 @@ class CodeGenerator extends GeneralizingAstVisitor
final ClassElement objectClass;
final ClassElement stringClass;
final ClassElement functionClass;
- final ClassElement symbolClass;
+ final ClassElement privateSymbolClass;
ConstFieldVisitor _constants;
@@ -174,7 +174,8 @@ class CodeGenerator extends GeneralizingAstVisitor
objectClass = _getLibrary(c, 'dart:core').getType('Object'),
stringClass = _getLibrary(c, 'dart:core').getType('String'),
functionClass = _getLibrary(c, 'dart:core').getType('Function'),
- symbolClass = _getLibrary(c, 'dart:_internal').getType('Symbol'),
+ privateSymbolClass =
+ _getLibrary(c, 'dart:_internal').getType('PrivateSymbol'),
dartJSLibrary = _getLibrary(c, 'dart:js');
LibraryElement get currentLibrary => _loader.currentElement.library;
@@ -2272,8 +2273,8 @@ class CodeGenerator extends GeneralizingAstVisitor
// Run constructor field initializers such as `: foo = bar.baz`
for (var init in ctor.initializers) {
if (init is ConstructorFieldInitializer) {
- fields[init.fieldName.staticElement as FieldElement] =
- _visit(init.expression);
+ var element = init.fieldName.staticElement as FieldElement;
+ fields[element] = _visit(init.expression);
}
}
}
@@ -5367,8 +5368,11 @@ class CodeGenerator extends GeneralizingAstVisitor
var name = js.string(node.components.join('.'), "'");
if (last.startsWith('_')) {
var nativeSymbol = _emitPrivateNameSymbol(currentLibrary, last);
- return js.call('new #.es6(#, #)',
- [_emitConstructorAccess(symbolClass.type), name, nativeSymbol]);
+ return js.call('new #(#, #)', [
+ _emitConstructorAccess(privateSymbolClass.type),
+ name,
+ nativeSymbol
+ ]);
} else {
return js
.call('#.new(#)', [_emitConstructorAccess(types.symbolType), name]);
« no previous file with comments | « pkg/dev_compiler/lib/sdk/ddc_sdk.sum ('k') | pkg/dev_compiler/package.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698