mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:58:29 +00:00
Update third_party/pkg/kernel version
This CL also updates the use of kernel in dart2js, and updates the VM/kernel status files. This is a preliminary step to moving kernel into the SDK repository. BUG= R=het@google.com, johnniwinther@google.com, kmillikin@google.com, sigmund@google.com, vegorov@google.com Committed:5d66d0e5dc
Review URL: https://codereview.chromium.org/2518023002 . Reverted:d69e048d60
This commit is contained in:
parent
d69e048d60
commit
fbb698393d
2
DEPS
2
DEPS
|
@ -73,7 +73,7 @@ vars = {
|
|||
"isolate_tag": "@0.2.3",
|
||||
"jinja2_rev": "@2222b31554f03e62600cd7e383376a7c187967a1",
|
||||
"json_rpc_2_tag": "@2.0.2",
|
||||
"kernel_rev": "@11edd6208940d227dc0b2cf87a6518d2508c0858",
|
||||
"kernel_rev": "@8e2b2c03c2a22d9fdf581a8e3ce798f189531081",
|
||||
"linter_tag": "@0.1.29",
|
||||
"logging_tag": "@0.11.3+1",
|
||||
"markdown_tag": "@0.11.0",
|
||||
|
|
|
@ -192,11 +192,11 @@ class Kernel {
|
|||
fields: null);
|
||||
addWork(cls, () {
|
||||
if (cls.supertype != null) {
|
||||
classNode.supertype = interfaceTypeToIr(cls.supertype);
|
||||
classNode.supertype = supertypeToIr(cls.supertype);
|
||||
}
|
||||
if (cls.isMixinApplication) {
|
||||
MixinApplicationElement mixinApplication = cls;
|
||||
classNode.mixedInType = interfaceTypeToIr(mixinApplication.mixinType);
|
||||
classNode.mixedInType = supertypeToIr(mixinApplication.mixinType);
|
||||
}
|
||||
classNode.parent = libraryToIr(cls.library);
|
||||
if (cls.isUnnamedMixinApplication) {
|
||||
|
@ -222,10 +222,10 @@ class Kernel {
|
|||
}
|
||||
});
|
||||
classNode.typeParameters.addAll(typeVariablesToIr(cls.typeVariables));
|
||||
for (ir.InterfaceType interface
|
||||
in typesToIr(cls.interfaces.reverse().toList())) {
|
||||
if (interface != classNode.mixedInType) {
|
||||
classNode.implementedTypes.add(interface);
|
||||
for (ir.Supertype supertype
|
||||
in supertypesToIr(cls.interfaces.reverse().toList())) {
|
||||
if (supertype != classNode.mixedInType) {
|
||||
classNode.implementedTypes.add(supertype);
|
||||
}
|
||||
}
|
||||
addWork(cls, () {
|
||||
|
@ -284,6 +284,15 @@ class Kernel {
|
|||
}
|
||||
}
|
||||
|
||||
ir.Supertype supertypeToIr(InterfaceType type) {
|
||||
ir.Class cls = classToIr(type.element);
|
||||
if (type.typeArguments.isEmpty) {
|
||||
return cls.asRawSupertype;
|
||||
} else {
|
||||
return new ir.Supertype(cls, typesToIr(type.typeArguments));
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(ahe): Remove this method when dart2js support generic type arguments.
|
||||
List<ir.TypeParameter> typeParametersNotImplemented() {
|
||||
return const <ir.TypeParameter>[];
|
||||
|
@ -295,11 +304,10 @@ class Kernel {
|
|||
List<ir.DartType> positionalParameters =
|
||||
new List<ir.DartType>.from(typesToIr(type.parameterTypes))
|
||||
..addAll(typesToIr(type.optionalParameterTypes));
|
||||
Map<String, ir.DartType> namedParameters = <String, ir.DartType>{};
|
||||
for (int i = 0; i < type.namedParameters.length; i++) {
|
||||
namedParameters[type.namedParameters[i]] =
|
||||
typeToIr(type.namedParameterTypes[i]);
|
||||
}
|
||||
List<ir.NamedType> namedParameters = new List<ir.NamedType>.generate(
|
||||
type.namedParameters.length,
|
||||
(i) => new ir.NamedType(
|
||||
type.namedParameters[i], typeToIr(type.namedParameterTypes[i])));
|
||||
ir.DartType returnType = typeToIr(type.returnType);
|
||||
|
||||
return new ir.FunctionType(positionalParameters, returnType,
|
||||
|
@ -320,6 +328,14 @@ class Kernel {
|
|||
return result;
|
||||
}
|
||||
|
||||
List<ir.Supertype> supertypesToIr(List<DartType> types) {
|
||||
List<ir.Supertype> result = new List<ir.Supertype>(types.length);
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
result[i] = supertypeToIr(types[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ir.DartType typeToIr(DartType type) {
|
||||
switch (type.kind) {
|
||||
case TypeKind.FUNCTION:
|
||||
|
|
|
@ -710,7 +710,8 @@ class KernelVisitor extends Object
|
|||
return new ir.ConditionalExpression(
|
||||
visitForValue(node.condition),
|
||||
visitWithCurrentContext(node.thenExpression),
|
||||
visitWithCurrentContext(node.elseExpression));
|
||||
visitWithCurrentContext(node.elseExpression),
|
||||
null);
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -1312,7 +1313,7 @@ class KernelVisitor extends Object
|
|||
Accessor accessor = (receiver == null)
|
||||
? new ThisPropertyAccessor(irName, null, null)
|
||||
: PropertyAccessor.make(visitForValue(receiver), irName, null, null);
|
||||
return accessor.buildNullAwareAssignment(visitForValue(rhs),
|
||||
return accessor.buildNullAwareAssignment(visitForValue(rhs), null,
|
||||
voidContext: isVoidContext);
|
||||
}
|
||||
|
||||
|
@ -1504,7 +1505,7 @@ class KernelVisitor extends Object
|
|||
|
||||
Accessor buildNullAwarePropertyAccessor(Node receiver, Name name) {
|
||||
return new NullAwarePropertyAccessor(
|
||||
visitForValue(receiver), nameToIrName(name), null, null);
|
||||
visitForValue(receiver), nameToIrName(name), null, null, null);
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -1524,7 +1525,8 @@ class KernelVisitor extends Object
|
|||
buildIsNull(new ir.VariableGet(receiver)),
|
||||
new ir.NullLiteral(),
|
||||
buildInvokeSelector(new ir.VariableGet(receiver), selector,
|
||||
buildArguments(arguments))));
|
||||
buildArguments(arguments)),
|
||||
null));
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -1538,7 +1540,7 @@ class KernelVisitor extends Object
|
|||
ir.Expression visitIfNotNullDynamicPropertySetIfNull(
|
||||
Send node, Node receiver, Name name, Node rhs, _) {
|
||||
return buildNullAwarePropertyAccessor(receiver, name)
|
||||
.buildNullAwareAssignment(visitForValue(rhs),
|
||||
.buildNullAwareAssignment(visitForValue(rhs), null,
|
||||
voidContext: isVoidContext);
|
||||
}
|
||||
|
||||
|
@ -1549,8 +1551,12 @@ class KernelVisitor extends Object
|
|||
}
|
||||
|
||||
@override
|
||||
ir.LogicalExpression visitIfNull(Send node, Node left, Node right, _) {
|
||||
return buildLogicalExpression(left, node.selector, right);
|
||||
ir.Expression visitIfNull(Send node, Node left, Node right, _) {
|
||||
var leftValue = new ir.VariableDeclaration.forValue(visitForValue(left));
|
||||
return new ir.Let(
|
||||
leftValue,
|
||||
new ir.ConditionalExpression(buildIsNull(new ir.VariableGet(leftValue)),
|
||||
visitForValue(right), new ir.VariableGet(leftValue), null));
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -1837,7 +1843,7 @@ class KernelVisitor extends Object
|
|||
SendSet node, LocalElement local, Node rhs, _,
|
||||
{bool isSetterValid}) {
|
||||
return new VariableAccessor(getLocal(local)).buildNullAwareAssignment(
|
||||
visitForValue(rhs),
|
||||
visitForValue(rhs), null,
|
||||
voidContext: isVoidContext);
|
||||
}
|
||||
|
||||
|
@ -1954,7 +1960,7 @@ class KernelVisitor extends Object
|
|||
setter = null;
|
||||
}
|
||||
return buildStaticAccessor(getter, setter).buildNullAwareAssignment(
|
||||
visitForValue(rhs),
|
||||
visitForValue(rhs), null,
|
||||
voidContext: isVoidContext);
|
||||
}
|
||||
|
||||
|
@ -1991,6 +1997,7 @@ class KernelVisitor extends Object
|
|||
positionalParameters.add(variable);
|
||||
}
|
||||
});
|
||||
namedParameters.sort();
|
||||
signature.forEachParameter((ParameterElement parameter) {
|
||||
if (!parameter.isOptional) return;
|
||||
ir.Expression initializer = visitForValue(parameter.initializer);
|
||||
|
@ -2395,7 +2402,7 @@ class KernelVisitor extends Object
|
|||
setter = null;
|
||||
}
|
||||
return buildSuperPropertyAccessor(getter, setter).buildNullAwareAssignment(
|
||||
visitForValue(rhs),
|
||||
visitForValue(rhs), null,
|
||||
voidContext: isVoidContext);
|
||||
}
|
||||
|
||||
|
@ -2624,7 +2631,7 @@ class KernelVisitor extends Object
|
|||
ir.Expression visitTypeVariableTypeLiteralSetIfNull(
|
||||
Send node, TypeVariableElement element, Node rhs, _) {
|
||||
return new ReadOnlyAccessor(buildTypeVariable(element))
|
||||
.buildNullAwareAssignment(visitForValue(rhs),
|
||||
.buildNullAwareAssignment(visitForValue(rhs), null,
|
||||
voidContext: isVoidContext);
|
||||
}
|
||||
|
||||
|
@ -2690,7 +2697,7 @@ class KernelVisitor extends Object
|
|||
ir.Expression visitIndexSetIfNull(
|
||||
SendSet node, Node receiver, Node index, Node rhs, _) {
|
||||
return buildIndexAccessor(receiver, index).buildNullAwareAssignment(
|
||||
visitForValue(rhs),
|
||||
visitForValue(rhs), null,
|
||||
voidContext: isVoidContext);
|
||||
}
|
||||
|
||||
|
@ -2698,7 +2705,7 @@ class KernelVisitor extends Object
|
|||
ir.Expression visitSuperIndexSetIfNull(SendSet node, MethodElement getter,
|
||||
MethodElement setter, Node index, Node rhs, _) {
|
||||
return buildSuperIndexAccessor(index, getter, setter)
|
||||
.buildNullAwareAssignment(visitForValue(rhs),
|
||||
.buildNullAwareAssignment(visitForValue(rhs), null,
|
||||
voidContext: isVoidContext);
|
||||
}
|
||||
|
||||
|
|
|
@ -272,7 +272,7 @@ abstract class UnresolvedVisitor {
|
|||
Send node, MethodElement getter, Element element, Node rhs, _) {
|
||||
var accessor = new ClassStaticAccessor(
|
||||
this, getter.name, possiblyErroneousFunctionToIr(getter), null);
|
||||
return accessor.buildNullAwareAssignment(visitForValue(rhs),
|
||||
return accessor.buildNullAwareAssignment(visitForValue(rhs), null,
|
||||
voidContext: isVoidContext);
|
||||
}
|
||||
|
||||
|
@ -457,7 +457,7 @@ abstract class UnresolvedVisitor {
|
|||
ir.Expression visitUnresolvedSuperSetterSetIfNull(
|
||||
Send node, MethodElement getter, Element element, Node rhs, _) {
|
||||
return buildUnresolvedSuperPropertyAccessor('${node.selector}', getter)
|
||||
.buildNullAwareAssignment(visitForValue(rhs));
|
||||
.buildNullAwareAssignment(visitForValue(rhs), null);
|
||||
}
|
||||
|
||||
ir.Expression visitUnresolvedSuperUnary(
|
||||
|
@ -533,26 +533,26 @@ abstract class UnresolvedVisitor {
|
|||
Send node, MethodElement getter, Element element, Node rhs, _) {
|
||||
var accessor = new TopLevelStaticAccessor(
|
||||
this, getter.name, possiblyErroneousFunctionToIr(getter), null);
|
||||
return accessor.buildNullAwareAssignment(visitForValue(rhs),
|
||||
return accessor.buildNullAwareAssignment(visitForValue(rhs), null,
|
||||
voidContext: isVoidContext);
|
||||
}
|
||||
|
||||
ir.Expression visitUnresolvedSuperGetterIndexSetIfNull(Send node,
|
||||
Element element, MethodElement setter, Node index, Node rhs, _) {
|
||||
return buildUnresolvedSuperIndexAccessor(index, element)
|
||||
.buildNullAwareAssignment(visitForValue(rhs));
|
||||
.buildNullAwareAssignment(visitForValue(rhs), null);
|
||||
}
|
||||
|
||||
ir.Expression visitUnresolvedSuperSetterIndexSetIfNull(Send node,
|
||||
MethodElement getter, Element element, Node index, Node rhs, _) {
|
||||
return buildUnresolvedSuperIndexAccessor(index, element)
|
||||
.buildNullAwareAssignment(visitForValue(rhs));
|
||||
.buildNullAwareAssignment(visitForValue(rhs), null);
|
||||
}
|
||||
|
||||
ir.Expression visitUnresolvedSuperIndexSetIfNull(
|
||||
Send node, Element element, Node index, Node rhs, _) {
|
||||
return buildUnresolvedSuperIndexAccessor(index, element)
|
||||
.buildNullAwareAssignment(visitForValue(rhs));
|
||||
.buildNullAwareAssignment(visitForValue(rhs), null);
|
||||
}
|
||||
|
||||
ir.Expression visitUnresolvedSuperSet(
|
||||
|
|
|
@ -649,8 +649,8 @@ class DartTypeConverter extends ir.DartTypeVisitor<DartType> {
|
|||
visitTypes(node.positionalParameters
|
||||
.skip(node.requiredParameterCount)
|
||||
.toList()),
|
||||
node.namedParameters.keys.toList(),
|
||||
visitTypes(node.namedParameters.values.toList()));
|
||||
node.namedParameters.map((n) => n.name).toList(),
|
||||
node.namedParameters.map((n) => visitType(n.type)).toList());
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -11,6 +11,7 @@ LibTest/isolate/*: Skip # No support for isolates ATM.
|
|||
# Override tests marked as failing elsewhere.
|
||||
[ $compiler == dartk || $compiler == dartkp ]
|
||||
Language/Libraries_and_Scripts/Exports/reexport_t01: Pass
|
||||
Language/Functions/Formal_Parameters/Optional_Formals/syntax_t14: Pass
|
||||
|
||||
# dartk: JIT failures
|
||||
[ $compiler == dartk && $runtime == vm ]
|
||||
|
@ -36,9 +37,6 @@ Language/Classes/definition_t23: Crash
|
|||
Language/Enums/declaration_equivalent_t01: RuntimeError
|
||||
Language/Enums/syntax_t08: MissingCompileTimeError
|
||||
Language/Enums/syntax_t09: MissingCompileTimeError
|
||||
Language/Expressions/Await_Expressions/syntax_t01: RuntimeError
|
||||
Language/Expressions/Await_Expressions/syntax_t02: RuntimeError
|
||||
Language/Expressions/Await_Expressions/syntax_t10: RuntimeError
|
||||
Language/Expressions/Constants/exception_t01: MissingCompileTimeError
|
||||
Language/Expressions/Constants/exception_t02: MissingCompileTimeError
|
||||
Language/Expressions/Constants/string_length_t01: Crash
|
||||
|
@ -49,15 +47,11 @@ Language/Expressions/Function_Invocation/Unqualified_Invocation/function_expr_in
|
|||
Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t03: MissingCompileTimeError
|
||||
Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t04: MissingCompileTimeError
|
||||
Language/Expressions/Function_Invocation/Unqualified_Invocation/static_method_invocation_t02: RuntimeError
|
||||
Language/Expressions/Function_Invocation/async_cleanup_t01: RuntimeError
|
||||
Language/Expressions/Function_Invocation/async_cleanup_t02: RuntimeError
|
||||
Language/Expressions/Function_Invocation/async_cleanup_t04: Crash
|
||||
Language/Expressions/Function_Invocation/async_cleanup_t07: Fail
|
||||
Language/Expressions/Function_Invocation/async_cleanup_t08: Fail
|
||||
Language/Expressions/Function_Invocation/async_generator_invokation_t05: RuntimeError
|
||||
Language/Expressions/Function_Invocation/async_generator_invokation_t06: RuntimeError
|
||||
Language/Expressions/Function_Invocation/async_generator_invokation_t09: RuntimeError
|
||||
Language/Expressions/Function_Invocation/async_invokation_t05: RuntimeError
|
||||
Language/Expressions/Identifier_Reference/built_in_identifier_t35: Pass
|
||||
Language/Expressions/Identifier_Reference/built_in_identifier_t36: Pass
|
||||
Language/Expressions/Identifier_Reference/built_in_identifier_t37: Pass
|
||||
|
@ -327,6 +321,19 @@ Language/Libraries_and_Scripts/Imports/static_type_t01/05: Pass
|
|||
Language/Libraries_and_Scripts/Imports/static_type_t01/03: Pass
|
||||
Language/Libraries_and_Scripts/Imports/static_type_t01/07: Pass
|
||||
Language/Libraries_and_Scripts/Imports/static_type_t01/02: Pass
|
||||
LibTest/core/Match/operator_subscript_A01_t01: RuntimeError
|
||||
LibTest/core/RegExp/Pattern_semantics/firstMatch_Assertion_A01_t01: RuntimeError
|
||||
LibTest/core/RegExp/Pattern_semantics/firstMatch_Assertion_A02_t01: RuntimeError
|
||||
LibTest/core/RegExp/Pattern_semantics/firstMatch_Assertion_A03_t01: RuntimeError
|
||||
LibTest/core/RegExp/Pattern_semantics/firstMatch_Atom_A03_t01: RuntimeError
|
||||
LibTest/core/RegExp/Pattern_semantics/firstMatch_Atom_A06_t01: RuntimeError
|
||||
LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterClass_A02_t01: RuntimeError
|
||||
LibTest/core/RegExp/Pattern_semantics/firstMatch_Disjunction_A01_t01: RuntimeError
|
||||
LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t02: RuntimeError
|
||||
LibTest/core/RegExp/Pattern_semantics/firstMatch_Quantifier_A03_t01: RuntimeError
|
||||
LibTest/core/RegExp/firstMatch_A02_t01: RuntimeError
|
||||
LibTest/core/RegExp/hasMatch_A01_t02: RuntimeError
|
||||
LibTest/core/RegExp/stringMatch_A01_t01: RuntimeError
|
||||
|
||||
# dartk: JIT failures (debug)
|
||||
[ $compiler == dartk && $runtime == vm && $mode == debug ]
|
||||
|
@ -638,4 +645,4 @@ LibTest/core/Invocation/isSetter_A01_t01: RuntimeError
|
|||
LibTest/core/Invocation/isSetter_A01_t02: Crash
|
||||
LibTest/core/Invocation/memberName_A01_t01: RuntimeError
|
||||
LibTest/core/Invocation/namedArguments_A01_t01: Crash
|
||||
LibTest/core/Invocation/positionalArguments_A01_t01: Crash
|
||||
LibTest/core/Invocation/positionalArguments_A01_t01: Crash
|
|
@ -7,6 +7,7 @@ packages/*: Skip # Skip packages folder
|
|||
compile_with_empty_libraries_test: Fail # Issue 24223
|
||||
|
||||
kernel/*: Slow, Pass
|
||||
kernel/impact_test: RuntimeError
|
||||
|
||||
boolified_operator_test: Fail # Issue 8001
|
||||
|
||||
|
|
|
@ -17,24 +17,17 @@ accessor_conflict_import_prefixed2_test: RuntimeError
|
|||
accessor_conflict_import_prefixed_test: RuntimeError
|
||||
accessor_conflict_import_test: RuntimeError
|
||||
assertion_test: RuntimeError
|
||||
async_await_test: Crash
|
||||
async_break_in_finally_test: RuntimeError
|
||||
async_control_structures_test: RuntimeError
|
||||
async_await_test: RuntimeError
|
||||
async_star_cancel_and_throw_in_finally_test: RuntimeError
|
||||
async_star_cancel_while_paused_test: RuntimeError
|
||||
async_star_pause_test: RuntimeError
|
||||
async_star_regression_fisk_test: RuntimeError
|
||||
async_star_regression_fisk_test: Timeout
|
||||
async_star_stream_take_test: Timeout
|
||||
async_star_take_reyield_test: Timeout
|
||||
async_star_test: Timeout
|
||||
async_throw_in_catch_test/forceAwait: RuntimeError
|
||||
async_throw_in_catch_test/none: RuntimeError
|
||||
asyncstar_throw_in_catch_test: Timeout
|
||||
asyncstar_yield_test: Timeout
|
||||
asyncstar_yieldstar_test: Timeout
|
||||
await_exceptions_test: RuntimeError
|
||||
await_future_test: RuntimeError
|
||||
await_regression_test: RuntimeError
|
||||
bad_constructor_test/05: CompileTimeError
|
||||
bad_raw_string_negative_test: Fail
|
||||
cha_deopt1_test: RuntimeError
|
||||
|
@ -702,4 +695,4 @@ vm/debug_break_enabled_vm_test/01: CompileTimeError
|
|||
vm/debug_break_enabled_vm_test/none: CompileTimeError
|
||||
vm/reflect_core_vm_test: CompileTimeError
|
||||
vm/type_cast_vm_test: RuntimeError
|
||||
vm/type_vm_test: RuntimeError
|
||||
vm/type_vm_test: RuntimeError
|
Loading…
Reference in a new issue