[dart2js] Fix some compilation errors in dart2js/native.

Change-Id: Idb614189a31ceaeb53a9acb1f23f0ff3f46eb9c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150666
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
This commit is contained in:
Joshua Litt 2020-06-16 01:20:18 +00:00 committed by commit-bot@chromium.org
parent 0d3e77d28e
commit 3798e5c2f0
14 changed files with 22 additions and 22 deletions

View file

@ -9,7 +9,7 @@ import 'native_testing.dart';
@Native("Node")
class Node {
final parentNode;
get parentNode native;
}
makeNode(parent) native;

View file

@ -10,7 +10,7 @@ import "native_testing.dart";
@Native("Node")
class Node {
final Node parentNode;
Node get parentNode native;
ModelSource _modelSource; // If null, inherited from parent.

View file

@ -20,7 +20,7 @@ import 'native_testing.dart';
class E {
E._used() native; // Bogus native constructor, called only from fake body.
final int code;
int get code native;
}
// Type with exception-throwing methods.

View file

@ -9,7 +9,7 @@ import "native_testing.dart";
@Native("A")
class A {
final String aa;
String get aa native;
foo() => "A-foo $aa";
baz() => "A-baz $aa";
}

View file

@ -5,14 +5,14 @@
import "native_testing.dart";
abstract class Window {
final int document;
int get document native;
}
// Defining this global object makes Frog eager on optimizing
// call sites where the receiver is typed 'Window'.
@Native("@*DOMWindow")
class _DOMWindowJs implements Window {
final int document;
int get document native;
}
class Win implements Window {

View file

@ -5,14 +5,14 @@
import "native_testing.dart";
abstract class Window {
final int document;
int get document native;
}
// Defining this global object makes Frog eager on optimizing
// call sites where the receiver is typed 'Window'.
@Native("@*DOMWindow")
class _DOMWindowJs implements Window {
final int document;
int get document native;
}
class Win implements Window {

View file

@ -17,8 +17,8 @@ var log;
@Native("A")
class A {
final a1 = log(101); // Only initialized IF named constructor called.
final a2; // Initialized by native constructor.
final a3; // Initialized only by A.two.
get a2 native; // Initialized by native constructor.
var a3; // Initialized only by A.two.
var a4 = log(104);
A.one();
@ -37,7 +37,7 @@ class A {
}
class B extends A {
final b1;
var b1;
final b2 = log(202);
var b3;

View file

@ -11,7 +11,7 @@ import 'native_testing.dart';
@Native("Node")
class Node {
final parentNode;
get parentNode native;
}
makeNode(parent) native;

View file

@ -12,7 +12,7 @@ import "native_testing.dart";
@Native("Node")
class Node {
final Node parentNode;
Node get parentNode native;
ModelSource _modelSource; // If null, inherited from parent.

View file

@ -22,7 +22,7 @@ import 'native_testing.dart';
class E {
E._used() native; // Bogus native constructor, called only from fake body.
final int code;
int get code native;
}
// Type with exception-throwing methods.

View file

@ -11,7 +11,7 @@ import "native_testing.dart";
@Native("A")
class A {
final String aa;
String get aa native;
foo() => "A-foo $aa";
baz() => "A-baz $aa";
}

View file

@ -7,14 +7,14 @@
import "native_testing.dart";
abstract class Window {
final int document;
int get document native;
}
// Defining this global object makes Frog eager on optimizing
// call sites where the receiver is typed 'Window'.
@Native("@*DOMWindow")
class _DOMWindowJs implements Window {
final int document;
int get document native;
}
class Win implements Window {

View file

@ -7,14 +7,14 @@
import "native_testing.dart";
abstract class Window {
final int document;
int get document native;
}
// Defining this global object makes Frog eager on optimizing
// call sites where the receiver is typed 'Window'.
@Native("@*DOMWindow")
class _DOMWindowJs implements Window {
final int document;
int get document native;
}
class Win implements Window {

View file

@ -19,8 +19,8 @@ var log;
@Native("A")
class A {
final a1 = log(101); // Only initialized IF named constructor called.
final a2; // Initialized by native constructor.
final a3; // Initialized only by A.two.
get a2 native; // Initialized by native constructor.
var a3; // Initialized only by A.two.
var a4 = log(104);
A.one();
@ -39,7 +39,7 @@ class A {
}
class B extends A {
final b1;
var b1;
final b2 = log(202);
var b3;