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

Unified Diff: pkg/compiler/lib/src/native/behavior.dart

Issue 1892183002: Refactor Parsing to remove compiler dependency (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/native/enqueue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/native/behavior.dart
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart
index 004e95712371e652b47d65a20616108e26722b1b..903aecc52ffab31d900843c0b26a431f960f64e3 100644
--- a/pkg/compiler/lib/src/native/behavior.dart
+++ b/pkg/compiler/lib/src/native/behavior.dart
@@ -4,7 +4,7 @@
import '../common.dart';
import '../common/backend_api.dart' show ForeignResolver;
-import '../common/resolution.dart' show Parsing, Resolution;
+import '../common/resolution.dart' show ParsingContext, Resolution;
import '../compiler.dart' show Compiler;
import '../constants/values.dart';
import '../core_types.dart' show CoreTypes;
@@ -460,7 +460,7 @@ class NativeBehavior {
}
static NativeBehavior ofJsCall(Send jsCall, DiagnosticReporter reporter,
- Parsing parsing, CoreTypes coreTypes, ForeignResolver resolver) {
+ ParsingContext parsing, CoreTypes coreTypes, ForeignResolver resolver) {
// The first argument of a JS-call is a string encoding various attributes
// of the code.
//
@@ -551,7 +551,7 @@ class NativeBehavior {
NativeBehavior behavior,
Send jsBuiltinOrEmbeddedGlobalCall,
DiagnosticReporter reporter,
- Parsing parsing,
+ ParsingContext parsing,
CoreTypes coreTypes,
ForeignResolver resolver,
{bool isBuiltin,
@@ -619,7 +619,7 @@ class NativeBehavior {
static NativeBehavior ofJsBuiltinCall(
Send jsBuiltinCall,
DiagnosticReporter reporter,
- Parsing parsing,
+ ParsingContext parsing,
CoreTypes coreTypes,
ForeignResolver resolver) {
NativeBehavior behavior = new NativeBehavior();
@@ -635,7 +635,7 @@ class NativeBehavior {
static NativeBehavior ofJsEmbeddedGlobalCall(
Send jsEmbeddedGlobalCall,
DiagnosticReporter reporter,
- Parsing parsing,
+ ParsingContext parsing,
CoreTypes coreTypes,
ForeignResolver resolver) {
NativeBehavior behavior = new NativeBehavior();
@@ -773,7 +773,8 @@ class NativeBehavior {
StringConstantValue specStringConstant = fields.single;
String specString = specStringConstant.toDartString().slowToString();
for (final typeString in specString.split('|')) {
- var type = _parseType(typeString, compiler.parsing, lookup, annotation);
+ var type =
+ _parseType(typeString, compiler.parsingContext, lookup, annotation);
if (types == null) types = [];
types.add(type);
}
@@ -847,8 +848,8 @@ class NativeBehavior {
}
}
- static dynamic _parseType(
- String typeString, Parsing parsing, lookup(name), locationNodeOrElement) {
+ static dynamic _parseType(String typeString, ParsingContext parsing,
+ lookup(name), locationNodeOrElement) {
DiagnosticReporter reporter = parsing.reporter;
if (typeString == '=Object') return SpecialType.JsObject;
if (typeString == 'dynamic') {
@@ -873,7 +874,7 @@ class NativeBehavior {
return const DynamicType();
}
- static _errorNode(locationNodeOrElement, Parsing parsing) {
+ static _errorNode(locationNodeOrElement, ParsingContext parsing) {
if (locationNodeOrElement is Node) return locationNodeOrElement;
return locationNodeOrElement.parseNode(parsing);
}
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/native/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698