mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 00:29:50 +00:00
Remove support for dart:isolate in dart2js.
Change-Id: I1216a0ac91d8a1d13b441809596e1a8b5e51bb34 Reviewed-on: https://dart-review.googlesource.com/54526 Commit-Queue: Sigmund Cherem <sigmund@google.com> Reviewed-by: Stephen Adams <sra@google.com>
This commit is contained in:
parent
2998c32951
commit
c25a9fd46b
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -2,6 +2,16 @@
|
|||
(Add new changes here, and they will be copied to the
|
||||
change section for the next dev version)
|
||||
|
||||
### Tool Changes
|
||||
|
||||
#### dart2js
|
||||
|
||||
* Several fixes to improve support for running output of dart2js as a webworker.
|
||||
|
||||
* `dart:isolate` implementation removed. To launch background tasks,
|
||||
please use webworkers instead. APIs for webworkers can be accessed from
|
||||
`dart:html` or JS-interop.
|
||||
|
||||
### Language
|
||||
|
||||
* Changed the `cast` method to always change the type. Deprecated the
|
||||
|
|
|
@ -1210,17 +1210,6 @@ class CommonElements {
|
|||
_env.lookupLibrary(Uris.dart__js_embedded_names, required: true),
|
||||
'JsBuiltin');
|
||||
|
||||
// From dart:_isolate_helper
|
||||
|
||||
FunctionEntity get startRootIsolate =>
|
||||
_findLibraryMember(isolateHelperLibrary, 'startRootIsolate');
|
||||
|
||||
FunctionEntity get currentIsolate =>
|
||||
_findLibraryMember(isolateHelperLibrary, '_currentIsolate');
|
||||
|
||||
FunctionEntity get callInIsolate =>
|
||||
_findLibraryMember(isolateHelperLibrary, '_callInIsolate');
|
||||
|
||||
static final Uri PACKAGE_EXPECT =
|
||||
new Uri(scheme: 'package', path: 'expect/expect.dart');
|
||||
|
||||
|
|
|
@ -687,8 +687,8 @@ abstract class DeferredLoadTask extends CompilerTask {
|
|||
|
||||
// Also add "global" dependencies to the main output unit. These are
|
||||
// things that the backend needs but cannot associate with a particular
|
||||
// element, for example, startRootIsolate. This set also contains
|
||||
// elements for which we lack precise information.
|
||||
// element. This set also contains elements for which we lack precise
|
||||
// information.
|
||||
for (MemberEntity element
|
||||
in closedWorld.backendUsage.globalFunctionDependencies) {
|
||||
element = element is MethodElement ? element.implementation : element;
|
||||
|
|
|
@ -637,7 +637,7 @@ class DumpInfoTask extends CompilerTask implements InfoReporter {
|
|||
dumpInfoDuration: new Duration(milliseconds: this.timing),
|
||||
noSuchMethodEnabled: closedWorld.backendUsage.isNoSuchMethodUsed,
|
||||
isRuntimeTypeUsed: closedWorld.backendUsage.isRuntimeTypeUsed,
|
||||
isIsolateInUse: closedWorld.backendUsage.isIsolateInUse,
|
||||
isIsolateInUse: false,
|
||||
isFunctionApplyUsed: closedWorld.backendUsage.isFunctionApplyUsed,
|
||||
isMirrorsUsed: closedWorld.backendUsage.isMirrorsUsed,
|
||||
minified: compiler.options.enableMinification);
|
||||
|
|
|
@ -725,24 +725,6 @@ class BackendImpacts {
|
|||
dynamicUses: [Selectors.noSuchMethod_]);
|
||||
}
|
||||
|
||||
BackendImpact _isolateSupport;
|
||||
|
||||
/// Backend impact for isolate support.
|
||||
BackendImpact get isolateSupport {
|
||||
return _isolateSupport ??=
|
||||
new BackendImpact(globalUses: [_commonElements.startRootIsolate]);
|
||||
}
|
||||
|
||||
BackendImpact _isolateSupportForResolution;
|
||||
|
||||
/// Additional backend impact for isolate support in resolution.
|
||||
BackendImpact get isolateSupportForResolution {
|
||||
return _isolateSupportForResolution ??= new BackendImpact(globalUses: [
|
||||
_commonElements.currentIsolate,
|
||||
_commonElements.callInIsolate
|
||||
]);
|
||||
}
|
||||
|
||||
BackendImpact _loadLibrary;
|
||||
|
||||
/// Backend impact for accessing a `loadLibrary` function on a deferred
|
||||
|
|
|
@ -36,9 +36,6 @@ abstract class BackendUsage {
|
|||
/// `true` of `Object.runtimeType` is used.
|
||||
bool get isRuntimeTypeUsed;
|
||||
|
||||
/// `true` if the `dart:isolate` library is in use.
|
||||
bool get isIsolateInUse;
|
||||
|
||||
/// `true` if `Function.apply` is used.
|
||||
bool get isFunctionApplyUsed;
|
||||
|
||||
|
@ -81,9 +78,6 @@ abstract class BackendUsageBuilder {
|
|||
/// `true` of `Object.runtimeType` is used.
|
||||
bool isRuntimeTypeUsed;
|
||||
|
||||
/// `true` if the `dart:isolate` library is in use.
|
||||
bool isIsolateInUse;
|
||||
|
||||
/// `true` if `Function.apply` is used.
|
||||
bool isFunctionApplyUsed;
|
||||
|
||||
|
@ -120,9 +114,6 @@ class BackendUsageBuilderImpl implements BackendUsageBuilder {
|
|||
/// `true` of `Object.runtimeType` is used.
|
||||
bool isRuntimeTypeUsed = false;
|
||||
|
||||
/// `true` if the `dart:isolate` library is in use.
|
||||
bool isIsolateInUse = false;
|
||||
|
||||
/// `true` if `Function.apply` is used.
|
||||
bool isFunctionApplyUsed = false;
|
||||
|
||||
|
@ -289,7 +280,6 @@ class BackendUsageBuilderImpl implements BackendUsageBuilder {
|
|||
requiresPreamble: requiresPreamble,
|
||||
isInvokeOnUsed: isInvokeOnUsed,
|
||||
isRuntimeTypeUsed: isRuntimeTypeUsed,
|
||||
isIsolateInUse: isIsolateInUse,
|
||||
isFunctionApplyUsed: isFunctionApplyUsed,
|
||||
isMirrorsUsed: isMirrorsUsed,
|
||||
isNoSuchMethodUsed: isNoSuchMethodUsed,
|
||||
|
@ -320,9 +310,6 @@ class BackendUsageImpl implements BackendUsage {
|
|||
/// `true` of `Object.runtimeType` is used.
|
||||
final bool isRuntimeTypeUsed;
|
||||
|
||||
/// `true` if the `dart:isolate` library is in use.
|
||||
final bool isIsolateInUse;
|
||||
|
||||
/// `true` if `Function.apply` is used.
|
||||
final bool isFunctionApplyUsed;
|
||||
|
||||
|
@ -345,7 +332,6 @@ class BackendUsageImpl implements BackendUsage {
|
|||
this.requiresPreamble,
|
||||
this.isInvokeOnUsed,
|
||||
this.isRuntimeTypeUsed,
|
||||
this.isIsolateInUse,
|
||||
this.isFunctionApplyUsed,
|
||||
this.isMirrorsUsed,
|
||||
this.isNoSuchMethodUsed,
|
||||
|
|
|
@ -78,26 +78,6 @@ class CodegenEnqueuerListener extends EnqueuerListener {
|
|||
}
|
||||
}
|
||||
|
||||
/// Called to enable support for isolates. Any backend specific [WorldImpact]
|
||||
/// of this is returned.
|
||||
WorldImpact _enableIsolateSupport(FunctionEntity mainMethod) {
|
||||
WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
|
||||
// TODO(floitsch): We should also ensure that the class IsolateMessage is
|
||||
// instantiated. Currently, just enabling isolate support works.
|
||||
if (mainMethod != null) {
|
||||
// The JavaScript backend implements [Isolate.spawn] by looking up
|
||||
// top-level functions by name. So all top-level function tear-off
|
||||
// closures have a private name field.
|
||||
//
|
||||
// The JavaScript backend of [Isolate.spawnUri] uses the same internal
|
||||
// implementation as [Isolate.spawn], and fails if it cannot look main up
|
||||
// by name.
|
||||
impactBuilder.registerStaticUse(new StaticUse.staticTearOff(mainMethod));
|
||||
}
|
||||
_impacts.isolateSupport.registerImpact(impactBuilder, _elementEnvironment);
|
||||
return impactBuilder;
|
||||
}
|
||||
|
||||
/// Computes the [WorldImpact] of calling [mainMethod] as the entry point.
|
||||
WorldImpact _computeMainImpact(FunctionEntity mainMethod) {
|
||||
WorldImpactBuilderImpl mainImpact = new WorldImpactBuilderImpl();
|
||||
|
@ -107,11 +87,6 @@ class CodegenEnqueuerListener extends EnqueuerListener {
|
|||
.registerImpact(mainImpact, _elementEnvironment);
|
||||
mainImpact.registerStaticUse(
|
||||
new StaticUse.staticInvoke(mainMethod, callStructure));
|
||||
// If the main method takes arguments, this compilation could be the
|
||||
// target of Isolate.spawnUri. Strictly speaking, that can happen also if
|
||||
// main takes no arguments, but in this case the spawned isolate can't
|
||||
// communicate with the spawning isolate.
|
||||
mainImpact.addImpact(_enableIsolateSupport(mainMethod));
|
||||
}
|
||||
mainImpact.registerStaticUse(
|
||||
new StaticUse.staticInvoke(mainMethod, CallStructure.NO_ARGS));
|
||||
|
@ -125,9 +100,6 @@ class CodegenEnqueuerListener extends EnqueuerListener {
|
|||
if (mainMethod != null) {
|
||||
enqueuer.applyImpact(_computeMainImpact(mainMethod));
|
||||
}
|
||||
if (_backendUsage.isIsolateInUse) {
|
||||
enqueuer.applyImpact(_enableIsolateSupport(mainMethod));
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
library js_backend.backend.resolution_listener;
|
||||
|
||||
import '../common/names.dart' show Identifiers, Uris;
|
||||
import '../common/names.dart' show Identifiers;
|
||||
import '../common_elements.dart' show CommonElements, ElementEnvironment;
|
||||
import '../constants/values.dart';
|
||||
import '../deferred_load.dart';
|
||||
|
@ -117,30 +117,6 @@ class ResolutionEnqueuerListener extends EnqueuerListener {
|
|||
}
|
||||
}
|
||||
|
||||
/// Called to enable support for isolates. Any backend specific [WorldImpact]
|
||||
/// of this is returned.
|
||||
WorldImpact _enableIsolateSupport(FunctionEntity mainMethod) {
|
||||
WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
|
||||
// TODO(floitsch): We should also ensure that the class IsolateMessage is
|
||||
// instantiated. Currently, just enabling isolate support works.
|
||||
if (mainMethod != null) {
|
||||
// The JavaScript backend implements [Isolate.spawn] by looking up
|
||||
// top-level functions by name. So all top-level function tear-off
|
||||
// closures have a private name field.
|
||||
//
|
||||
// The JavaScript backend of [Isolate.spawnUri] uses the same internal
|
||||
// implementation as [Isolate.spawn], and fails if it cannot look main up
|
||||
// by name.
|
||||
impactBuilder.registerStaticUse(new StaticUse.staticTearOff(mainMethod));
|
||||
}
|
||||
_impacts.isolateSupport.registerImpact(impactBuilder, _elementEnvironment);
|
||||
_backendUsage.processBackendImpact(_impacts.isolateSupport);
|
||||
_impacts.isolateSupportForResolution
|
||||
.registerImpact(impactBuilder, _elementEnvironment);
|
||||
_backendUsage.processBackendImpact(_impacts.isolateSupportForResolution);
|
||||
return impactBuilder;
|
||||
}
|
||||
|
||||
/// Computes the [WorldImpact] of calling [mainMethod] as the entry point.
|
||||
WorldImpact _computeMainImpact(FunctionEntity mainMethod) {
|
||||
WorldImpactBuilderImpl mainImpact = new WorldImpactBuilderImpl();
|
||||
|
@ -151,11 +127,6 @@ class ResolutionEnqueuerListener extends EnqueuerListener {
|
|||
_backendUsage.processBackendImpact(_impacts.mainWithArguments);
|
||||
mainImpact.registerStaticUse(
|
||||
new StaticUse.staticInvoke(mainMethod, callStructure));
|
||||
// If the main method takes arguments, this compilation could be the
|
||||
// target of Isolate.spawnUri. Strictly speaking, that can happen also if
|
||||
// main takes no arguments, but in this case the spawned isolate can't
|
||||
// communicate with the spawning isolate.
|
||||
mainImpact.addImpact(_enableIsolateSupport(mainMethod));
|
||||
}
|
||||
mainImpact.registerStaticUse(
|
||||
new StaticUse.staticInvoke(mainMethod, CallStructure.NO_ARGS));
|
||||
|
@ -311,17 +282,6 @@ class ResolutionEnqueuerListener extends EnqueuerListener {
|
|||
}
|
||||
}
|
||||
|
||||
// Enable isolate support if we start using something from the isolate
|
||||
// library. We exclude constant fields, which are ending here because their
|
||||
// initializing expression is compiled.
|
||||
if (!_backendUsage.isIsolateInUse &&
|
||||
!(member.isField && member.isConst) &&
|
||||
member.library.canonicalUri == Uris.dart_isolate) {
|
||||
_backendUsage.isIsolateInUse = true;
|
||||
worldImpact
|
||||
.addImpact(_enableIsolateSupport(_elementEnvironment.mainFunction));
|
||||
}
|
||||
|
||||
if (member.isGetter && member.name == Identifiers.runtimeType_) {
|
||||
// Enable runtime type support if we discover a getter called
|
||||
// runtimeType. We have to enable runtime type before hitting the
|
||||
|
@ -425,10 +385,6 @@ class ResolutionEnqueuerListener extends EnqueuerListener {
|
|||
_interceptorData.addInterceptorsForNativeClassMembers(cls);
|
||||
} else if (cls == _commonElements.jsIndexingBehaviorInterface) {
|
||||
_registerBackendImpact(impactBuilder, _impacts.jsIndexingBehavior);
|
||||
} else if (cls.library.canonicalUri == Uris.dart_isolate) {
|
||||
_backendUsage.isIsolateInUse = true;
|
||||
impactBuilder
|
||||
.addImpact(_enableIsolateSupport(_elementEnvironment.mainFunction));
|
||||
}
|
||||
|
||||
_customElementsAnalysis.registerInstantiatedClass(cls);
|
||||
|
|
|
@ -278,11 +278,6 @@ class Emitter extends js_emitter.EmitterBase {
|
|||
jsAst.Name get makeConstListProperty =>
|
||||
namer.internalGlobal('makeConstantList');
|
||||
|
||||
/// The name of the property that contains all field names.
|
||||
///
|
||||
/// This property is added to constructors when isolate support is enabled.
|
||||
static const String FIELD_NAMES_PROPERTY_NAME = r"$__fields__";
|
||||
|
||||
/// For deferred loading we communicate the initializers via this global var.
|
||||
final String deferredInitializers = r"$dart_deferred_initializers$";
|
||||
|
||||
|
@ -374,13 +369,6 @@ class Emitter extends js_emitter.EmitterBase {
|
|||
generateEmbeddedGlobalAccessString(embeddedNames.TYPES);
|
||||
return jsAst.js.expressionTemplateFor("$typesAccess[#]");
|
||||
|
||||
case JsBuiltin.createDartClosureFromNameOfStaticFunction:
|
||||
// The global-functions map contains a map from name to tear-off
|
||||
// getters.
|
||||
String functionGettersMap =
|
||||
generateEmbeddedGlobalAccessString(embeddedNames.GLOBAL_FUNCTIONS);
|
||||
return jsAst.js.expressionTemplateFor("$functionGettersMap[#]()");
|
||||
|
||||
default:
|
||||
reporter.internalError(
|
||||
NO_LOCATION_SPANNABLE, "Unhandled Builtin: $builtin");
|
||||
|
@ -1115,18 +1103,7 @@ class Emitter extends js_emitter.EmitterBase {
|
|||
cspPrecompiledFunctionFor(outputUnit)
|
||||
.add(new jsAst.FunctionDeclaration(constructorName, constructorAst));
|
||||
|
||||
String fieldNamesProperty = FIELD_NAMES_PROPERTY_NAME;
|
||||
bool hasIsolateSupport = _closedWorld.backendUsage.isIsolateInUse;
|
||||
jsAst.Node fieldNamesArray;
|
||||
if (hasIsolateSupport) {
|
||||
fieldNamesArray =
|
||||
new jsAst.ArrayInitializer(fields.map(js.quoteName).toList());
|
||||
} else {
|
||||
fieldNamesArray = new jsAst.LiteralNull();
|
||||
}
|
||||
|
||||
cspPrecompiledFunctionFor(outputUnit).add(js.statement(
|
||||
r'''
|
||||
cspPrecompiledFunctionFor(outputUnit).add(js.statement(r'''
|
||||
{
|
||||
#constructorName.#typeNameProperty = #constructorNameString;
|
||||
// IE does not have a name property.
|
||||
|
@ -1134,18 +1111,11 @@ class Emitter extends js_emitter.EmitterBase {
|
|||
#constructorName.name = #constructorNameString;
|
||||
$desc = $collectedClasses$.#constructorName[1];
|
||||
#constructorName.prototype = $desc;
|
||||
''' /* next string is not a raw string */ '''
|
||||
if (#hasIsolateSupport) {
|
||||
#constructorName.$fieldNamesProperty = #fieldNamesArray;
|
||||
}
|
||||
}''',
|
||||
{
|
||||
"constructorName": constructorName,
|
||||
"typeNameProperty": typeNameProperty,
|
||||
"constructorNameString": js.quoteName(constructorName),
|
||||
"hasIsolateSupport": hasIsolateSupport,
|
||||
"fieldNamesArray": fieldNamesArray
|
||||
}));
|
||||
}''', {
|
||||
"constructorName": constructorName,
|
||||
"typeNameProperty": typeNameProperty,
|
||||
"constructorNameString": js.quoteName(constructorName),
|
||||
}));
|
||||
|
||||
cspPrecompiledConstructorNamesFor(outputUnit).add(js('#', constructorName));
|
||||
}
|
||||
|
|
|
@ -35,8 +35,6 @@ jsAst.Statement buildSetupProgram(
|
|||
ClosedWorld closedWorld) {
|
||||
jsAst.Expression typeInformationAccess =
|
||||
emitter.generateEmbeddedGlobalAccess(embeddedNames.TYPE_INFORMATION);
|
||||
jsAst.Expression globalFunctionsAccess =
|
||||
emitter.generateEmbeddedGlobalAccess(embeddedNames.GLOBAL_FUNCTIONS);
|
||||
jsAst.Expression staticsAccess =
|
||||
emitter.generateEmbeddedGlobalAccess(embeddedNames.STATICS);
|
||||
jsAst.Expression interceptedNamesAccess =
|
||||
|
@ -49,10 +47,6 @@ jsAst.Statement buildSetupProgram(
|
|||
emitter.generateEmbeddedGlobalAccess(embeddedNames.LIBRARIES);
|
||||
jsAst.Expression typesAccess =
|
||||
emitter.generateEmbeddedGlobalAccess(embeddedNames.TYPES);
|
||||
jsAst.Expression createNewIsolateFunctionAccess =
|
||||
emitter.generateEmbeddedGlobalAccess(embeddedNames.CREATE_NEW_ISOLATE);
|
||||
jsAst.Expression classIdExtractorAccess =
|
||||
emitter.generateEmbeddedGlobalAccess(embeddedNames.CLASS_ID_EXTRACTOR);
|
||||
jsAst.Expression allClassesAccess =
|
||||
emitter.generateEmbeddedGlobalAccess(embeddedNames.ALL_CLASSES);
|
||||
jsAst.Expression precompiledAccess =
|
||||
|
@ -63,12 +57,6 @@ jsAst.Statement buildSetupProgram(
|
|||
emitter.generateEmbeddedGlobalAccess(embeddedNames.INTERCEPTORS_BY_TAG);
|
||||
jsAst.Expression leafTagsAccess =
|
||||
emitter.generateEmbeddedGlobalAccess(embeddedNames.LEAF_TAGS);
|
||||
jsAst.Expression initializeEmptyInstanceAccess = emitter
|
||||
.generateEmbeddedGlobalAccess(embeddedNames.INITIALIZE_EMPTY_INSTANCE);
|
||||
jsAst.Expression classFieldsExtractorAccess = emitter
|
||||
.generateEmbeddedGlobalAccess(embeddedNames.CLASS_FIELDS_EXTRACTOR);
|
||||
jsAst.Expression instanceFromClassIdAccess = emitter
|
||||
.generateEmbeddedGlobalAccess(embeddedNames.INSTANCE_FROM_CLASS_ID);
|
||||
|
||||
String reflectableField = namer.reflectableField;
|
||||
String reflectionInfoField = namer.reflectionInfoField;
|
||||
|
@ -108,21 +96,12 @@ jsAst.Statement buildSetupProgram(
|
|||
'staticsPropertyName': namer.staticsPropertyName,
|
||||
'staticsPropertyNameString': js.quoteName(namer.staticsPropertyName),
|
||||
'typeInformation': typeInformationAccess,
|
||||
'globalFunctions': globalFunctionsAccess,
|
||||
'enabledInvokeOn': closedWorld.backendUsage.isInvokeOnUsed,
|
||||
'interceptedNames': interceptedNamesAccess,
|
||||
'interceptedNamesSet': emitter.generateInterceptedNamesSet(),
|
||||
'notInCspMode': !compiler.options.useContentSecurityPolicy,
|
||||
'inCspMode': compiler.options.useContentSecurityPolicy,
|
||||
'deferredAction': namer.deferredAction,
|
||||
'hasIsolateSupport': program.hasIsolateSupport,
|
||||
'fieldNamesProperty': js.string(Emitter.FIELD_NAMES_PROPERTY_NAME),
|
||||
'createNewIsolateFunction': createNewIsolateFunctionAccess,
|
||||
'isolateName': namer.isolateName,
|
||||
'classIdExtractor': classIdExtractorAccess,
|
||||
'classFieldsExtractor': classFieldsExtractorAccess,
|
||||
'instanceFromClassId': instanceFromClassIdAccess,
|
||||
'initializeEmptyInstance': initializeEmptyInstanceAccess,
|
||||
'allClasses': allClassesAccess,
|
||||
'debugFastObjects': DEBUG_FAST_OBJECTS,
|
||||
'isTreeShakingDisabled': backend.mirrorsData.isTreeShakingDisabled,
|
||||
|
@ -232,13 +211,11 @@ function $setupProgramName(programData, metadataOffset, typesOffset) {
|
|||
|
||||
var str = "function " + name + "(";
|
||||
var body = "";
|
||||
if (#hasIsolateSupport) { var fieldNames = ""; }
|
||||
|
||||
for (var i = 0; i < fields.length; i++) {
|
||||
if(i != 0) str += ", ";
|
||||
|
||||
var field = generateAccessor(fields[i], accessors, name);
|
||||
if (#hasIsolateSupport) { fieldNames += "'" + field + "',"; }
|
||||
var parameter = "p_" + field;
|
||||
str += parameter;
|
||||
body += ("this." + field + " = " + parameter + ";\\n");
|
||||
|
@ -253,39 +230,11 @@ function $setupProgramName(programData, metadataOffset, typesOffset) {
|
|||
if (typeof defineClass.name != "string") {
|
||||
str += name + ".name=\\"" + name + "\\";\\n";
|
||||
}
|
||||
if (#hasIsolateSupport) {
|
||||
str += name + "." + #fieldNamesProperty + "=[" + fieldNames
|
||||
+ "];\\n";
|
||||
}
|
||||
str += accessors.join("");
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
if (#hasIsolateSupport) {
|
||||
#createNewIsolateFunction = function() { return new #isolateName(); };
|
||||
|
||||
#classIdExtractor = function(o) { return o.constructor.name; };
|
||||
|
||||
#classFieldsExtractor = function(o) {
|
||||
var fieldNames = o.constructor.#fieldNamesProperty;
|
||||
if (!fieldNames) return []; // TODO(floitsch): do something else here.
|
||||
var result = [];
|
||||
result.length = fieldNames.length;
|
||||
for (var i = 0; i < fieldNames.length; i++) {
|
||||
result[i] = o[fieldNames[i]];
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
#instanceFromClassId = function(name) { return new #allClasses[name](); };
|
||||
|
||||
#initializeEmptyInstance = function(name, o, fields) {
|
||||
#allClasses[name].apply(o, fields);
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
// If the browser supports changing the prototype via __proto__, we make
|
||||
// use of that feature. Otherwise, we copy the properties into a new
|
||||
// constructor.
|
||||
|
@ -629,7 +578,6 @@ function $setupProgramName(programData, metadataOffset, typesOffset) {
|
|||
} else if (typeof element === "function") {
|
||||
globalObject[previousProperty = property] = element;
|
||||
functions.push(property);
|
||||
#globalFunctions[property] = element;
|
||||
} else if (element.constructor === Array) {
|
||||
if (#needsStructuredMemberInfo) {
|
||||
addStubs(globalObject, element, property, true, functions);
|
||||
|
@ -732,9 +680,7 @@ function $setupProgramName(programData, metadataOffset, typesOffset) {
|
|||
f = tearOff(funcs, array, isStatic, name, isIntercepted);
|
||||
prototype[name].\$getter = f;
|
||||
f.\$getterStub = true;
|
||||
// Used to create an isolate using spawnFunction.
|
||||
if (isStatic) {
|
||||
#globalFunctions[name] = f;
|
||||
functions.push(getterStubName);
|
||||
}
|
||||
prototype[getterStubName] = f;
|
||||
|
@ -795,7 +741,6 @@ function $setupProgramName(programData, metadataOffset, typesOffset) {
|
|||
if (!#mangledGlobalNames) #mangledGlobalNames = map();
|
||||
if (!#statics) #statics = map();
|
||||
if (!#typeInformation) #typeInformation = map();
|
||||
if (!#globalFunctions) #globalFunctions = map();
|
||||
if (#enabledInvokeOn)
|
||||
if (!#interceptedNames) #interceptedNames = #interceptedNamesSet;
|
||||
var libraries = #libraries;
|
||||
|
|
|
@ -6,44 +6,18 @@ library dart2js.js_emitter.main_call_stub_generator;
|
|||
|
||||
import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
|
||||
|
||||
import '../common_elements.dart';
|
||||
import '../elements/entities.dart';
|
||||
import '../js/js.dart' as jsAst;
|
||||
import '../js/js.dart' show js;
|
||||
import '../js_backend/backend_usage.dart' show BackendUsage;
|
||||
|
||||
import 'code_emitter_task.dart' show Emitter;
|
||||
|
||||
class MainCallStubGenerator {
|
||||
final CommonElements _commonElements;
|
||||
final Emitter _emitter;
|
||||
final BackendUsage _backendUsage;
|
||||
|
||||
MainCallStubGenerator(
|
||||
this._commonElements, this._emitter, this._backendUsage);
|
||||
|
||||
/// Returns the code equivalent to:
|
||||
/// `function(args) { $.startRootIsolate(X.main$closure(), args); }`
|
||||
jsAst.Expression _buildIsolateSetupClosure(
|
||||
FunctionEntity appMain, FunctionEntity isolateMain) {
|
||||
jsAst.Expression mainAccess = _emitter.isolateStaticClosureAccess(appMain);
|
||||
// Since we pass the closurized version of the main method to
|
||||
// the isolate method, we must make sure that it exists.
|
||||
return js('function(a){ #(#, a); }',
|
||||
[_emitter.staticFunctionAccess(isolateMain), mainAccess]);
|
||||
}
|
||||
|
||||
jsAst.Statement generateInvokeMain(FunctionEntity main) {
|
||||
jsAst.Expression mainCallClosure = null;
|
||||
if (_backendUsage.isIsolateInUse) {
|
||||
FunctionEntity isolateMain = _commonElements.startRootIsolate;
|
||||
mainCallClosure = _buildIsolateSetupClosure(main, isolateMain);
|
||||
} else {
|
||||
mainCallClosure = _emitter.staticFunctionAccess(main);
|
||||
}
|
||||
|
||||
static jsAst.Statement generateInvokeMain(
|
||||
Emitter emitter, FunctionEntity main) {
|
||||
jsAst.Expression mainCallClosure = emitter.staticFunctionAccess(main);
|
||||
jsAst.Expression currentScriptAccess =
|
||||
_emitter.generateEmbeddedGlobalAccess(embeddedNames.CURRENT_SCRIPT);
|
||||
emitter.generateEmbeddedGlobalAccess(embeddedNames.CURRENT_SCRIPT);
|
||||
|
||||
// This code finds the currently executing script by listening to the
|
||||
// onload event of all script tags and getting the first script which
|
||||
|
|
|
@ -16,7 +16,6 @@ class Program {
|
|||
final List<Holder> holders;
|
||||
final bool outputContainsConstantList;
|
||||
final bool needsNativeSupport;
|
||||
final bool hasIsolateSupport;
|
||||
final bool hasSoftDeferredClasses;
|
||||
|
||||
/// A map from load id to the list of fragments that need to be loaded.
|
||||
|
@ -40,11 +39,9 @@ class Program {
|
|||
this.typeToInterceptorMap, this._metadataCollector, this.finalizers,
|
||||
{this.needsNativeSupport,
|
||||
this.outputContainsConstantList,
|
||||
this.hasIsolateSupport,
|
||||
this.hasSoftDeferredClasses}) {
|
||||
assert(needsNativeSupport != null);
|
||||
assert(outputContainsConstantList != null);
|
||||
assert(hasIsolateSupport != null);
|
||||
}
|
||||
|
||||
/// Accessor for the list of metadata entries for a given [OutputUnit].
|
||||
|
|
|
@ -277,7 +277,6 @@ class ProgramBuilder {
|
|||
_buildTypeToInterceptorMap(), _task.metadataCollector, finalizers,
|
||||
needsNativeSupport: needsNativeSupport,
|
||||
outputContainsConstantList: collector.outputContainsConstantList,
|
||||
hasIsolateSupport: _backendUsage.isIsolateInUse,
|
||||
hasSoftDeferredClasses: _notSoftDeferred != null);
|
||||
}
|
||||
|
||||
|
@ -391,10 +390,8 @@ class ProgramBuilder {
|
|||
|
||||
js.Statement _buildInvokeMain() {
|
||||
if (_isMockCompilation) return js.js.comment("Mock compilation");
|
||||
|
||||
MainCallStubGenerator generator = new MainCallStubGenerator(
|
||||
_commonElements, _task.emitter, _backendUsage);
|
||||
return generator.generateInvokeMain(_mainFunction);
|
||||
return MainCallStubGenerator.generateInvokeMain(
|
||||
_task.emitter, _mainFunction);
|
||||
}
|
||||
|
||||
DeferredFragment _buildDeferredFragment(LibrariesMap librariesMap) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
library dart2js.js_emitter.startup_emitter;
|
||||
|
||||
import 'package:js_runtime/shared/embedded_names.dart'
|
||||
show JsBuiltin, METADATA, STATIC_FUNCTION_NAME_TO_CLOSURE, TYPES;
|
||||
show JsBuiltin, METADATA, TYPES;
|
||||
|
||||
import '../../common.dart';
|
||||
import '../../compiler.dart' show Compiler;
|
||||
|
@ -162,11 +162,6 @@ class Emitter extends emitterTask.EmitterBase {
|
|||
String typesAccess = _emitter.generateEmbeddedGlobalAccessString(TYPES);
|
||||
return js.js.expressionTemplateFor("$typesAccess[#]");
|
||||
|
||||
case JsBuiltin.createDartClosureFromNameOfStaticFunction:
|
||||
String functionAccess = _emitter.generateEmbeddedGlobalAccessString(
|
||||
STATIC_FUNCTION_NAME_TO_CLOSURE);
|
||||
return js.js.expressionTemplateFor("$functionAccess(#)");
|
||||
|
||||
default:
|
||||
reporter.internalError(
|
||||
NO_LOCATION_SPANNABLE, "Unhandled Builtin: $builtin");
|
||||
|
|
|
@ -1399,75 +1399,6 @@ class FragmentEmitter {
|
|||
js.string(TYPE_TO_INTERCEPTOR_MAP), program.typeToInterceptorMap));
|
||||
}
|
||||
|
||||
if (program.hasIsolateSupport) {
|
||||
String staticStateName = namer.staticStateHolder;
|
||||
// TODO(floitsch): this doesn't create a new isolate, but just reuses
|
||||
// the current static state. Since we don't run multiple isolates in the
|
||||
// same JavaScript context (except for testing) this shouldn't have any
|
||||
// impact on real-world programs, though.
|
||||
globals.add(new js.Property(js.string(CREATE_NEW_ISOLATE),
|
||||
js.js('function () { return $staticStateName; }')));
|
||||
|
||||
js.Expression nameToClosureFunction = js.js('''
|
||||
// First fetch the static function. From there we can execute its
|
||||
// getter function which builds a Dart closure.
|
||||
function(name) {
|
||||
var staticFunction = getGlobalFromName(name);
|
||||
var getterFunction = staticFunction.$tearOffPropertyName;
|
||||
return getterFunction();
|
||||
}''');
|
||||
globals.add(new js.Property(
|
||||
js.string(STATIC_FUNCTION_NAME_TO_CLOSURE), nameToClosureFunction));
|
||||
|
||||
globals.add(new js.Property(js.string(CLASS_ID_EXTRACTOR),
|
||||
js.js('function(o) { return o.constructor.name; }')));
|
||||
|
||||
js.Expression extractFieldsFunction = js.js('''
|
||||
function(o) {
|
||||
var constructor = o.constructor;
|
||||
var fieldNames = constructor.$cachedClassFieldNames;
|
||||
if (!fieldNames) {
|
||||
// Extract the fields from an empty unmodified object.
|
||||
var empty = new constructor();
|
||||
// This gives us the keys that the constructor sets.
|
||||
fieldNames = constructor.$cachedClassFieldNames = Object.keys(empty);
|
||||
}
|
||||
var result = new Array(fieldNames.length);
|
||||
for (var i = 0; i < fieldNames.length; i++) {
|
||||
result[i] = o[fieldNames[i]];
|
||||
}
|
||||
return result;
|
||||
}''');
|
||||
globals.add(new js.Property(
|
||||
js.string(CLASS_FIELDS_EXTRACTOR), extractFieldsFunction));
|
||||
|
||||
js.Expression createInstanceFromClassIdFunction = js.js('''
|
||||
function(name) {
|
||||
var constructor = getGlobalFromName(name);
|
||||
return new constructor();
|
||||
}
|
||||
''');
|
||||
globals.add(new js.Property(js.string(INSTANCE_FROM_CLASS_ID),
|
||||
createInstanceFromClassIdFunction));
|
||||
|
||||
js.Expression initializeEmptyInstanceFunction = js.js('''
|
||||
function(name, o, fields) {
|
||||
var constructor = o.constructor;
|
||||
// By construction the object `o` is an empty object with the same
|
||||
// keys as the one we used in the extract-fields function.
|
||||
var fieldNames = Object.keys(o);
|
||||
if (fieldNames.length != fields.length) {
|
||||
throw new Error("Mismatch during deserialization.");
|
||||
}
|
||||
for (var i = 0; i < fields.length; i++) {
|
||||
o[fieldNames[i]] = fields[i];
|
||||
}
|
||||
return o;
|
||||
}''');
|
||||
globals.add(new js.Property(js.string(INITIALIZE_EMPTY_INSTANCE),
|
||||
initializeEmptyInstanceFunction));
|
||||
}
|
||||
|
||||
globals.add(emitMangledGlobalNames());
|
||||
|
||||
// The [MANGLED_NAMES] table must contain the mapping for const symbols.
|
||||
|
|
|
@ -9,17 +9,12 @@ import 'dart:math' show Random;
|
|||
|
||||
import 'package:js_runtime/shared/embedded_names.dart'
|
||||
show
|
||||
CLASS_FIELDS_EXTRACTOR,
|
||||
CLASS_ID_EXTRACTOR,
|
||||
CREATE_NEW_ISOLATE,
|
||||
DEFERRED_INITIALIZED,
|
||||
DEFERRED_LIBRARY_PARTS,
|
||||
DEFERRED_PART_URIS,
|
||||
DEFERRED_PART_HASHES,
|
||||
GET_TYPE_FROM_NAME,
|
||||
INITIALIZE_EMPTY_INSTANCE,
|
||||
INITIALIZE_LOADED_HUNK,
|
||||
INSTANCE_FROM_CLASS_ID,
|
||||
INTERCEPTORS_BY_TAG,
|
||||
IS_HUNK_INITIALIZED,
|
||||
IS_HUNK_LOADED,
|
||||
|
@ -28,7 +23,6 @@ import 'package:js_runtime/shared/embedded_names.dart'
|
|||
MANGLED_NAMES,
|
||||
METADATA,
|
||||
NATIVE_SUPERCLASS_TAG_NAME,
|
||||
STATIC_FUNCTION_NAME_TO_CLOSURE,
|
||||
TYPE_TO_INTERCEPTOR_MAP,
|
||||
TYPES;
|
||||
|
||||
|
|
|
@ -391,7 +391,6 @@ class JsClosedWorldBuilder {
|
|||
requiresPreamble: backendUsage.requiresPreamble,
|
||||
isInvokeOnUsed: backendUsage.isInvokeOnUsed,
|
||||
isRuntimeTypeUsed: backendUsage.isRuntimeTypeUsed,
|
||||
isIsolateInUse: backendUsage.isIsolateInUse,
|
||||
isFunctionApplyUsed: backendUsage.isFunctionApplyUsed,
|
||||
isMirrorsUsed: backendUsage.isMirrorsUsed,
|
||||
isNoSuchMethodUsed: backendUsage.isNoSuchMethodUsed);
|
||||
|
|
|
@ -2837,23 +2837,10 @@ class SsaAstGraphBuilder extends ast.Visitor
|
|||
node, 'Too many arguments to JS_CURRENT_ISOLATE_CONTEXT.');
|
||||
}
|
||||
|
||||
if (!backendUsage.isIsolateInUse) {
|
||||
// If the isolate library is not used, we just generate code
|
||||
// to fetch the static state.
|
||||
String name = namer.staticStateHolder;
|
||||
push(new HForeignCode(
|
||||
js.js.parseForeignJS(name), commonMasks.dynamicType, <HInstruction>[],
|
||||
nativeBehavior: native.NativeBehavior.DEPENDS_OTHER));
|
||||
} else {
|
||||
// Call a helper method from the isolate library. The isolate
|
||||
// library uses its own isolate structure, that encapsulates
|
||||
// Leg's isolate.
|
||||
MethodElement element = commonElements.currentIsolate;
|
||||
if (element == null) {
|
||||
reporter.internalError(node, 'Isolate library and compiler mismatch.');
|
||||
}
|
||||
pushInvokeStatic(null, element, [], typeMask: commonMasks.dynamicType);
|
||||
}
|
||||
String name = namer.staticStateHolder;
|
||||
push(new HForeignCode(
|
||||
js.js.parseForeignJS(name), commonMasks.dynamicType, <HInstruction>[],
|
||||
nativeBehavior: native.NativeBehavior.DEPENDS_OTHER));
|
||||
}
|
||||
|
||||
void handleForeignJsGetFlag(ast.Send node) {
|
||||
|
@ -3025,27 +3012,6 @@ class SsaAstGraphBuilder extends ast.Visitor
|
|||
stack.add(graph.addConstantNull(closedWorld));
|
||||
}
|
||||
|
||||
void handleForeignJsCallInIsolate(ast.Send node) {
|
||||
Link<ast.Node> link = node.arguments;
|
||||
if (!backendUsage.isIsolateInUse) {
|
||||
// If the isolate library is not used, we just invoke the
|
||||
// closure.
|
||||
visit(link.tail.head);
|
||||
push(new HInvokeClosure(new Selector.callClosure(0),
|
||||
<HInstruction>[pop()], commonMasks.dynamicType, const <DartType>[]));
|
||||
} else {
|
||||
// Call a helper method from the isolate library.
|
||||
MethodElement element = commonElements.callInIsolate;
|
||||
if (element == null) {
|
||||
reporter.internalError(node, 'Isolate library and compiler mismatch.');
|
||||
}
|
||||
List<HInstruction> inputs = <HInstruction>[];
|
||||
addGenericSendArgumentsToList(link, inputs);
|
||||
pushInvokeStatic(node, element, inputs,
|
||||
typeMask: commonMasks.dynamicType);
|
||||
}
|
||||
}
|
||||
|
||||
FunctionSignature handleForeignRawFunctionRef(ast.Send node, String name) {
|
||||
if (node.arguments.isEmpty || !node.arguments.tail.isEmpty) {
|
||||
reporter.internalError(
|
||||
|
@ -3115,8 +3081,6 @@ class SsaAstGraphBuilder extends ast.Visitor
|
|||
handleForeignJs(node);
|
||||
} else if (name == 'JS_CURRENT_ISOLATE_CONTEXT') {
|
||||
handleForeignJsCurrentIsolateContext(node);
|
||||
} else if (name == 'JS_CALL_IN_ISOLATE') {
|
||||
handleForeignJsCallInIsolate(node);
|
||||
} else if (name == 'DART_CLOSURE_TO_JS') {
|
||||
handleForeignDartClosureToJs(node, 'DART_CLOSURE_TO_JS');
|
||||
} else if (name == 'RAW_DART_FUNCTION_REF') {
|
||||
|
|
|
@ -3410,9 +3410,9 @@ class KernelSsaGraphBuilder extends ir.Visitor
|
|||
if (name == 'JS') {
|
||||
handleForeignJs(invocation);
|
||||
} else if (name == 'JS_CURRENT_ISOLATE_CONTEXT') {
|
||||
// TODO(sigmund): delete. The only reference left to this foreign function
|
||||
// is from the deprecated dart:mirrors code.
|
||||
handleForeignJsCurrentIsolateContext(invocation);
|
||||
} else if (name == 'JS_CALL_IN_ISOLATE') {
|
||||
handleForeignJsCallInIsolate(invocation);
|
||||
} else if (name == 'DART_CLOSURE_TO_JS') {
|
||||
handleForeignDartClosureToJs(invocation, 'DART_CLOSURE_TO_JS');
|
||||
} else if (name == 'RAW_DART_FUNCTION_REF') {
|
||||
|
@ -3525,57 +3525,12 @@ class KernelSsaGraphBuilder extends ir.Visitor
|
|||
return;
|
||||
}
|
||||
|
||||
if (!backendUsage.isIsolateInUse) {
|
||||
// If the isolate library is not used, we just generate code
|
||||
// to fetch the static state.
|
||||
String name = namer.staticStateHolder;
|
||||
push(new HForeignCode(
|
||||
js.js.parseForeignJS(name), commonMasks.dynamicType, <HInstruction>[],
|
||||
nativeBehavior: native.NativeBehavior.DEPENDS_OTHER));
|
||||
} else {
|
||||
// Call a helper method from the isolate library. The isolate library uses
|
||||
// its own isolate structure that encapsulates the isolate structure used
|
||||
// for binding to methods.
|
||||
FunctionEntity target = _commonElements.currentIsolate;
|
||||
if (target == null) {
|
||||
reporter.internalError(
|
||||
_elementMap.getSpannable(targetElement, invocation),
|
||||
'Isolate library and compiler mismatch.');
|
||||
}
|
||||
_pushStaticInvocation(target, <HInstruction>[], commonMasks.dynamicType,
|
||||
const <DartType>[]);
|
||||
}
|
||||
}
|
||||
|
||||
void handleForeignJsCallInIsolate(ir.StaticInvocation invocation) {
|
||||
if (_unexpectedForeignArguments(invocation,
|
||||
minPositional: 2, maxPositional: 2)) {
|
||||
// Result expected on stack.
|
||||
stack.add(graph.addConstantNull(closedWorld));
|
||||
return;
|
||||
}
|
||||
|
||||
List<HInstruction> inputs = _visitPositionalArguments(invocation.arguments);
|
||||
|
||||
if (!backendUsage.isIsolateInUse) {
|
||||
// If the isolate library is not used, we ignore the isolate argument and
|
||||
// just invoke the closure.
|
||||
push(new HInvokeClosure(
|
||||
new Selector.callClosure(0),
|
||||
<HInstruction>[inputs[1]],
|
||||
commonMasks.dynamicType,
|
||||
const <DartType>[]));
|
||||
} else {
|
||||
// Call a helper method from the isolate library.
|
||||
FunctionEntity callInIsolate = _commonElements.callInIsolate;
|
||||
if (callInIsolate == null) {
|
||||
reporter.internalError(
|
||||
_elementMap.getSpannable(targetElement, invocation),
|
||||
'Isolate library and compiler mismatch.');
|
||||
}
|
||||
_pushStaticInvocation(
|
||||
callInIsolate, inputs, commonMasks.dynamicType, const <DartType>[]);
|
||||
}
|
||||
// Isolates cannot be spawned, so we just generate code to fetch the static
|
||||
// state.
|
||||
String name = namer.staticStateHolder;
|
||||
push(new HForeignCode(
|
||||
js.js.parseForeignJS(name), commonMasks.dynamicType, <HInstruction>[],
|
||||
nativeBehavior: native.NativeBehavior.DEPENDS_OTHER));
|
||||
}
|
||||
|
||||
void handleForeignDartClosureToJs(
|
||||
|
|
|
@ -378,7 +378,6 @@ abstract class ResolutionWorldBuilderBase extends WorldBuilderBase
|
|||
final ClassQueries classQueries;
|
||||
|
||||
bool hasRuntimeTypeSupport = false;
|
||||
bool hasIsolateSupport = false;
|
||||
bool hasFunctionApplySupport = false;
|
||||
|
||||
bool _closed = false;
|
||||
|
|
|
@ -8,14 +8,13 @@ import 'dart:_js_helper'
|
|||
show
|
||||
patch,
|
||||
ExceptionAndStackTrace,
|
||||
Primitives,
|
||||
convertDartClosureToJS,
|
||||
getTraceFromException,
|
||||
requiresPreamble,
|
||||
wrapException,
|
||||
unwrapException;
|
||||
import 'dart:_isolate_helper'
|
||||
show IsolateNatives, TimerImpl, leaveJsAsync, enterJsAsync, isWorker;
|
||||
|
||||
import 'dart:_isolate_helper' show TimerImpl;
|
||||
|
||||
import 'dart:_foreign_helper' show JS, JS_GET_FLAG;
|
||||
|
||||
|
@ -47,7 +46,6 @@ class _AsyncRun {
|
|||
var storedCallback;
|
||||
|
||||
internalCallback(_) {
|
||||
leaveJsAsync();
|
||||
var f = storedCallback;
|
||||
storedCallback = null;
|
||||
f();
|
||||
|
@ -59,7 +57,6 @@ class _AsyncRun {
|
|||
|
||||
return (void callback()) {
|
||||
assert(storedCallback == null);
|
||||
enterJsAsync();
|
||||
storedCallback = callback;
|
||||
// Because of a broken shadow-dom polyfill we have to change the
|
||||
// children instead a cheap property.
|
||||
|
@ -76,24 +73,20 @@ class _AsyncRun {
|
|||
|
||||
static void _scheduleImmediateJsOverride(void callback()) {
|
||||
internalCallback() {
|
||||
leaveJsAsync();
|
||||
callback();
|
||||
}
|
||||
|
||||
;
|
||||
enterJsAsync();
|
||||
JS('void', 'self.scheduleImmediate(#)',
|
||||
convertDartClosureToJS(internalCallback, 0));
|
||||
}
|
||||
|
||||
static void _scheduleImmediateWithSetImmediate(void callback()) {
|
||||
internalCallback() {
|
||||
leaveJsAsync();
|
||||
callback();
|
||||
}
|
||||
|
||||
;
|
||||
enterJsAsync();
|
||||
JS('void', 'self.setImmediate(#)',
|
||||
convertDartClosureToJS(internalCallback, 0));
|
||||
}
|
||||
|
|
|
@ -189,11 +189,6 @@ abstract class IsolateContext {
|
|||
get isolateStatics;
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes [function] in the context of [isolate].
|
||||
*/
|
||||
external JS_CALL_IN_ISOLATE(isolate, Function function);
|
||||
|
||||
/**
|
||||
* Converts the Dart closure [function] into a JavaScript closure.
|
||||
*
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5,20 +5,16 @@
|
|||
// Patch file for the dart:isolate library.
|
||||
|
||||
import "dart:async";
|
||||
import 'dart:_foreign_helper' show JS;
|
||||
import 'dart:_js_helper' show patch;
|
||||
import 'dart:_isolate_helper'
|
||||
show CapabilityImpl, IsolateNatives, ReceivePortImpl, RawReceivePortImpl;
|
||||
|
||||
typedef _UnaryFunction(Null arg);
|
||||
import 'dart:_isolate_helper' show ReceivePortImpl;
|
||||
|
||||
@patch
|
||||
class Isolate {
|
||||
static final _currentIsolateCache = IsolateNatives.currentIsolate;
|
||||
|
||||
// `current` must be a getter, not just a final field,
|
||||
// to match the external declaration.
|
||||
@patch
|
||||
static Isolate get current => _currentIsolateCache;
|
||||
static Isolate get current {
|
||||
throw new UnsupportedError("Isolate.current");
|
||||
}
|
||||
|
||||
@patch
|
||||
static Future<Uri> get packageRoot {
|
||||
|
@ -30,15 +26,13 @@ class Isolate {
|
|||
throw new UnsupportedError("Isolate.packageConfig");
|
||||
}
|
||||
|
||||
static Uri _packageBase = Uri.base.resolve(IsolateNatives.packagesBase);
|
||||
|
||||
@patch
|
||||
static Future<Uri> resolvePackageUri(Uri packageUri) {
|
||||
if (packageUri.scheme != 'package') {
|
||||
return new Future<Uri>.value(packageUri);
|
||||
}
|
||||
return new Future<Uri>.value(
|
||||
_packageBase.resolveUri(packageUri.replace(scheme: '')));
|
||||
_packagesBase.resolveUri(packageUri.replace(scheme: '')));
|
||||
}
|
||||
|
||||
@patch
|
||||
|
@ -47,41 +41,7 @@ class Isolate {
|
|||
bool errorsAreFatal,
|
||||
SendPort onExit,
|
||||
SendPort onError}) {
|
||||
bool forcePause =
|
||||
(errorsAreFatal != null) || (onExit != null) || (onError != null);
|
||||
try {
|
||||
// Check for the type of `entryPoint` on the spawning isolate to make
|
||||
// error-handling easier.
|
||||
if (entryPoint is! _UnaryFunction) {
|
||||
throw new ArgumentError(entryPoint);
|
||||
}
|
||||
// TODO: Consider passing the errorsAreFatal/onExit/onError values
|
||||
// as arguments to the internal spawnUri instead of setting
|
||||
// them after the isolate has been created.
|
||||
return IsolateNatives
|
||||
.spawnFunction(entryPoint, message, paused || forcePause)
|
||||
.then((msg) {
|
||||
var isolate = new Isolate(msg[1],
|
||||
pauseCapability: msg[2], terminateCapability: msg[3]);
|
||||
if (forcePause) {
|
||||
if (errorsAreFatal != null) {
|
||||
isolate.setErrorsFatal(errorsAreFatal);
|
||||
}
|
||||
if (onExit != null) {
|
||||
isolate.addOnExitListener(onExit);
|
||||
}
|
||||
if (onError != null) {
|
||||
isolate.addErrorListener(onError);
|
||||
}
|
||||
if (!paused) {
|
||||
isolate.resume(isolate.pauseCapability);
|
||||
}
|
||||
}
|
||||
return isolate;
|
||||
});
|
||||
} catch (e, st) {
|
||||
return new Future<Isolate>.error(e, st);
|
||||
}
|
||||
throw new UnsupportedError("Isolate.spawn");
|
||||
}
|
||||
|
||||
@patch
|
||||
|
@ -95,131 +55,55 @@ class Isolate {
|
|||
Uri packageRoot,
|
||||
Uri packageConfig,
|
||||
bool automaticPackageResolution: false}) {
|
||||
if (environment != null) throw new UnimplementedError("environment");
|
||||
if (packageRoot != null) throw new UnimplementedError("packageRoot");
|
||||
if (packageConfig != null) throw new UnimplementedError("packageConfig");
|
||||
// TODO(lrn): Figure out how to handle the automaticPackageResolution
|
||||
// parameter.
|
||||
bool forcePause =
|
||||
(errorsAreFatal != null) || (onExit != null) || (onError != null);
|
||||
try {
|
||||
if (args is List<String>) {
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
if (args[i] is! String) {
|
||||
throw new ArgumentError("Args must be a list of Strings $args");
|
||||
}
|
||||
}
|
||||
} else if (args != null) {
|
||||
throw new ArgumentError("Args must be a list of Strings $args");
|
||||
}
|
||||
// TODO: Handle [packageRoot] somehow, possibly by throwing.
|
||||
// TODO: Consider passing the errorsAreFatal/onExit/onError values
|
||||
// as arguments to the internal spawnUri instead of setting
|
||||
// them after the isolate has been created.
|
||||
return IsolateNatives
|
||||
.spawnUri(uri, args, message, paused || forcePause)
|
||||
.then((msg) {
|
||||
var isolate = new Isolate(msg[1],
|
||||
pauseCapability: msg[2], terminateCapability: msg[3]);
|
||||
if (forcePause) {
|
||||
if (errorsAreFatal != null) {
|
||||
isolate.setErrorsFatal(errorsAreFatal);
|
||||
}
|
||||
if (onExit != null) {
|
||||
isolate.addOnExitListener(onExit);
|
||||
}
|
||||
if (onError != null) {
|
||||
isolate.addErrorListener(onError);
|
||||
}
|
||||
if (!paused) {
|
||||
isolate.resume(isolate.pauseCapability);
|
||||
}
|
||||
}
|
||||
return isolate;
|
||||
});
|
||||
} catch (e, st) {
|
||||
return new Future<Isolate>.error(e, st);
|
||||
}
|
||||
throw new UnsupportedError("Isolate.spawnUri");
|
||||
}
|
||||
|
||||
@patch
|
||||
void _pause(Capability resumeCapability) {
|
||||
var message = new List(3)
|
||||
..[0] = "pause"
|
||||
..[1] = pauseCapability
|
||||
..[2] = resumeCapability;
|
||||
controlPort.send(message);
|
||||
throw new UnsupportedError("Isolate._pause");
|
||||
}
|
||||
|
||||
@patch
|
||||
void resume(Capability resumeCapability) {
|
||||
var message = new List(2)
|
||||
..[0] = "resume"
|
||||
..[1] = resumeCapability;
|
||||
controlPort.send(message);
|
||||
throw new UnsupportedError("Isolate.resume");
|
||||
}
|
||||
|
||||
@patch
|
||||
void addOnExitListener(SendPort responsePort, {Object response}) {
|
||||
// TODO(lrn): Can we have an internal method that checks if the receiving
|
||||
// isolate of a SendPort is still alive?
|
||||
var message = new List(3)
|
||||
..[0] = "add-ondone"
|
||||
..[1] = responsePort
|
||||
..[2] = response;
|
||||
controlPort.send(message);
|
||||
throw new UnsupportedError("Isolate.addOnExitListener");
|
||||
}
|
||||
|
||||
@patch
|
||||
void removeOnExitListener(SendPort responsePort) {
|
||||
var message = new List(2)
|
||||
..[0] = "remove-ondone"
|
||||
..[1] = responsePort;
|
||||
controlPort.send(message);
|
||||
throw new UnsupportedError("Isolate.removeOnExitListener");
|
||||
}
|
||||
|
||||
@patch
|
||||
void setErrorsFatal(bool errorsAreFatal) {
|
||||
var message = new List(3)
|
||||
..[0] = "set-errors-fatal"
|
||||
..[1] = terminateCapability
|
||||
..[2] = errorsAreFatal;
|
||||
controlPort.send(message);
|
||||
throw new UnsupportedError("Isolate.setErrorsFatal");
|
||||
}
|
||||
|
||||
@patch
|
||||
void kill({int priority: beforeNextEvent}) {
|
||||
controlPort.send(["kill", terminateCapability, priority]);
|
||||
throw new UnsupportedError("Isolate.kill");
|
||||
}
|
||||
|
||||
@patch
|
||||
void ping(SendPort responsePort, {Object response, int priority: immediate}) {
|
||||
var message = new List(4)
|
||||
..[0] = "ping"
|
||||
..[1] = responsePort
|
||||
..[2] = priority
|
||||
..[3] = response;
|
||||
controlPort.send(message);
|
||||
throw new UnsupportedError("Isolate.ping");
|
||||
}
|
||||
|
||||
@patch
|
||||
void addErrorListener(SendPort port) {
|
||||
var message = new List(2)
|
||||
..[0] = "getErrors"
|
||||
..[1] = port;
|
||||
controlPort.send(message);
|
||||
throw new UnsupportedError("Isolate.addErrorListener");
|
||||
}
|
||||
|
||||
@patch
|
||||
void removeErrorListener(SendPort port) {
|
||||
var message = new List(2)
|
||||
..[0] = "stopErrors"
|
||||
..[1] = port;
|
||||
controlPort.send(message);
|
||||
throw new UnsupportedError("Isolate.removeErrorListener");
|
||||
}
|
||||
}
|
||||
|
||||
/** Default factory for receive ports. */
|
||||
@patch
|
||||
class ReceivePort {
|
||||
@patch
|
||||
|
@ -227,7 +111,7 @@ class ReceivePort {
|
|||
|
||||
@patch
|
||||
factory ReceivePort.fromRawReceivePort(RawReceivePort rawPort) {
|
||||
return new ReceivePortImpl.fromRawReceivePort(rawPort);
|
||||
throw new UnsupportedError('new ReceivePort.fromRawReceivePort');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -235,12 +119,22 @@ class ReceivePort {
|
|||
class RawReceivePort {
|
||||
@patch
|
||||
factory RawReceivePort([Function handler]) {
|
||||
return new RawReceivePortImpl(handler);
|
||||
throw new UnsupportedError('new RawReceivePort');
|
||||
}
|
||||
}
|
||||
|
||||
@patch
|
||||
class Capability {
|
||||
@patch
|
||||
factory Capability() = CapabilityImpl;
|
||||
factory Capability() {
|
||||
throw new UnsupportedError('new Capability');
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the base path added to Uri.base to resolve `package:` Uris.
|
||||
///
|
||||
/// This is used by `Isolate.resolvePackageUri` to load resources. The default
|
||||
/// value is `packages/` but users can override this by using the
|
||||
/// `defaultPackagesBase` hook.
|
||||
Uri _packagesBase =
|
||||
Uri.base.resolve(JS('String', r'self.defaultPackagesBase || "packages/"'));
|
||||
|
|
|
@ -1,412 +0,0 @@
|
|||
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
part of _isolate_helper;
|
||||
|
||||
/// Serialize [message].
|
||||
_serializeMessage(message) {
|
||||
return new _Serializer().serialize(message);
|
||||
}
|
||||
|
||||
/// Deserialize [message].
|
||||
_deserializeMessage(message) {
|
||||
return new _Deserializer().deserialize(message);
|
||||
}
|
||||
|
||||
bool _isIsolateMessage(message) {
|
||||
if (_isPrimitive(message)) return true;
|
||||
if (message is! JSArray) return false;
|
||||
if (message.isEmpty) return false;
|
||||
switch (message.first) {
|
||||
case "ref":
|
||||
case "buffer":
|
||||
case "typed":
|
||||
case "fixed":
|
||||
case "extendable":
|
||||
case "mutable":
|
||||
case "const":
|
||||
case "map":
|
||||
case "sendport":
|
||||
case "raw sendport":
|
||||
case "js-object":
|
||||
case "function":
|
||||
case "capability":
|
||||
case "dart":
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// Clones the message.
|
||||
///
|
||||
/// Contrary to a `_deserializeMessage(_serializeMessage(x))` the `_clone`
|
||||
/// function will not try to adjust SendPort values and pass them through.
|
||||
_clone(message) {
|
||||
_Serializer serializer = new _Serializer(serializeSendPorts: false);
|
||||
_Deserializer deserializer = new _Deserializer();
|
||||
return deserializer.deserialize(serializer.serialize(message));
|
||||
}
|
||||
|
||||
class _Serializer {
|
||||
final bool _serializeSendPorts;
|
||||
Map<dynamic, int> serializedObjectIds = new Map<dynamic, int>.identity();
|
||||
|
||||
_Serializer({serializeSendPorts: true})
|
||||
: _serializeSendPorts = serializeSendPorts;
|
||||
|
||||
/// Returns a message that can be transmitted through web-worker channels.
|
||||
serialize(x) {
|
||||
if (_isPrimitive(x)) return serializePrimitive(x);
|
||||
|
||||
int serializationId = serializedObjectIds[x];
|
||||
if (serializationId != null) return makeRef(serializationId);
|
||||
|
||||
serializationId = serializedObjectIds.length;
|
||||
serializedObjectIds[x] = serializationId;
|
||||
|
||||
if (x is NativeByteBuffer) return serializeByteBuffer(x);
|
||||
if (x is NativeTypedData) return serializeTypedData(x);
|
||||
if (x is JSIndexable) return serializeJSIndexable(x);
|
||||
if (x is InternalMap) return serializeMap(x as dynamic);
|
||||
|
||||
if (x is JSObject) return serializeJSObject(x);
|
||||
|
||||
// We should not have any interceptors any more.
|
||||
if (x is Interceptor) unsupported(x);
|
||||
|
||||
if (x is RawReceivePort) {
|
||||
unsupported(x, "RawReceivePorts can't be transmitted:");
|
||||
}
|
||||
|
||||
// SendPorts need their workerIds adjusted (either during serialization or
|
||||
// deserialization).
|
||||
if (x is _NativeJsSendPort) return serializeJsSendPort(x);
|
||||
if (x is _WorkerSendPort) return serializeWorkerSendPort(x);
|
||||
|
||||
if (x is Closure) return serializeClosure(x);
|
||||
if (x is CapabilityImpl) return serializeCapability(x);
|
||||
|
||||
return serializeDartObject(x);
|
||||
}
|
||||
|
||||
void unsupported(x, [String message]) {
|
||||
if (message == null) message = "Can't transmit:";
|
||||
throw new UnsupportedError("$message $x");
|
||||
}
|
||||
|
||||
makeRef(int serializationId) => ["ref", serializationId];
|
||||
|
||||
serializePrimitive(primitive) => primitive;
|
||||
|
||||
serializeByteBuffer(NativeByteBuffer buffer) {
|
||||
return ["buffer", buffer];
|
||||
}
|
||||
|
||||
serializeTypedData(NativeTypedData data) {
|
||||
return ["typed", data];
|
||||
}
|
||||
|
||||
serializeJSIndexable(JSIndexable indexable) {
|
||||
// Strings are JSIndexable but should have been treated earlier.
|
||||
assert(indexable is! String);
|
||||
List serialized = serializeArray(indexable);
|
||||
if (indexable is JSFixedArray) return ["fixed", serialized];
|
||||
if (indexable is JSExtendableArray) return ["extendable", serialized];
|
||||
// MutableArray check must be last, since JSFixedArray and JSExtendableArray
|
||||
// extend JSMutableArray.
|
||||
if (indexable is JSMutableArray) return ["mutable", serialized];
|
||||
// The only JSArrays left are the const Lists (as in `const [1, 2]`).
|
||||
if (indexable is JSArray) return ["const", serialized];
|
||||
unsupported(indexable, "Can't serialize indexable: ");
|
||||
return null;
|
||||
}
|
||||
|
||||
serializeArray(JSArray x) {
|
||||
List serialized = [];
|
||||
serialized.length = x.length;
|
||||
for (int i = 0; i < x.length; i++) {
|
||||
serialized[i] = serialize(x[i]);
|
||||
}
|
||||
return serialized;
|
||||
}
|
||||
|
||||
serializeArrayInPlace(JSArray x) {
|
||||
for (int i = 0; i < x.length; i++) {
|
||||
x[i] = serialize(x[i]);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
serializeMap(Map x) {
|
||||
Function serializeTearOff = serialize;
|
||||
return [
|
||||
'map',
|
||||
x.keys.map(serializeTearOff).toList(),
|
||||
x.values.map(serializeTearOff).toList()
|
||||
];
|
||||
}
|
||||
|
||||
serializeJSObject(JSObject x) {
|
||||
// Don't serialize objects if their `constructor` property isn't `Object`
|
||||
// or undefined/null.
|
||||
// A different constructor is taken as a sign that the object has complex
|
||||
// internal state, or that it is a function, and won't be serialized.
|
||||
if (JS('bool', '!!(#.constructor)', x) &&
|
||||
JS('bool', 'x.constructor !== Object')) {
|
||||
unsupported(x, "Only plain JS Objects are supported:");
|
||||
}
|
||||
List keys = JS('JSArray', 'Object.keys(#)', x);
|
||||
List values = [];
|
||||
values.length = keys.length;
|
||||
for (int i = 0; i < keys.length; i++) {
|
||||
values[i] = serialize(JS('', '#[#]', x, keys[i]));
|
||||
}
|
||||
return ['js-object', keys, values];
|
||||
}
|
||||
|
||||
serializeWorkerSendPort(_WorkerSendPort x) {
|
||||
if (_serializeSendPorts) {
|
||||
return ['sendport', x._workerId, x._isolateId, x._receivePortId];
|
||||
}
|
||||
return ['raw sendport', x];
|
||||
}
|
||||
|
||||
serializeJsSendPort(_NativeJsSendPort x) {
|
||||
if (_serializeSendPorts) {
|
||||
int workerId = _globalState.currentManagerId;
|
||||
return ['sendport', workerId, x._isolateId, x._receivePort._id];
|
||||
}
|
||||
return ['raw sendport', x];
|
||||
}
|
||||
|
||||
serializeCapability(CapabilityImpl x) => ['capability', x._id];
|
||||
|
||||
serializeClosure(Closure x) {
|
||||
final name = IsolateNatives._getJSFunctionName(x);
|
||||
if (name == null) {
|
||||
unsupported(x, "Closures can't be transmitted:");
|
||||
}
|
||||
return ['function', name];
|
||||
}
|
||||
|
||||
serializeDartObject(x) {
|
||||
if (!isDartObject(x)) unsupported(x);
|
||||
var classExtractor = JS_EMBEDDED_GLOBAL('', CLASS_ID_EXTRACTOR);
|
||||
var fieldsExtractor = JS_EMBEDDED_GLOBAL('', CLASS_FIELDS_EXTRACTOR);
|
||||
String classId = JS('String', '#(#)', classExtractor, x);
|
||||
List fields = JS('JSArray', '#(#)', fieldsExtractor, x);
|
||||
return ['dart', classId, serializeArrayInPlace(fields)];
|
||||
}
|
||||
}
|
||||
|
||||
class _Deserializer {
|
||||
/// When `true`, encodes sendports specially so that they can be adjusted on
|
||||
/// the receiving end.
|
||||
///
|
||||
/// When `false`, sendports are cloned like any other object.
|
||||
final bool _adjustSendPorts;
|
||||
|
||||
List<dynamic> deserializedObjects = new List<dynamic>();
|
||||
|
||||
_Deserializer({adjustSendPorts: true}) : _adjustSendPorts = adjustSendPorts;
|
||||
|
||||
/// Returns a message that can be transmitted through web-worker channels.
|
||||
deserialize(x) {
|
||||
if (_isPrimitive(x)) return deserializePrimitive(x);
|
||||
|
||||
if (x is! JSArray) throw new ArgumentError("Bad serialized message: $x");
|
||||
|
||||
switch (x.first) {
|
||||
case "ref":
|
||||
return deserializeRef(x);
|
||||
case "buffer":
|
||||
return deserializeByteBuffer(x);
|
||||
case "typed":
|
||||
return deserializeTypedData(x);
|
||||
case "fixed":
|
||||
return deserializeFixed(x);
|
||||
case "extendable":
|
||||
return deserializeExtendable(x);
|
||||
case "mutable":
|
||||
return deserializeMutable(x);
|
||||
case "const":
|
||||
return deserializeConst(x);
|
||||
case "map":
|
||||
return deserializeMap(x);
|
||||
case "sendport":
|
||||
return deserializeSendPort(x);
|
||||
case "raw sendport":
|
||||
return deserializeRawSendPort(x);
|
||||
case "js-object":
|
||||
return deserializeJSObject(x);
|
||||
case "function":
|
||||
return deserializeClosure(x);
|
||||
case "capability":
|
||||
return deserializeCapability(x);
|
||||
case "dart":
|
||||
return deserializeDartObject(x);
|
||||
default:
|
||||
throw "couldn't deserialize: $x";
|
||||
}
|
||||
}
|
||||
|
||||
deserializePrimitive(x) => x;
|
||||
|
||||
// ['ref', id].
|
||||
deserializeRef(x) {
|
||||
assert(x[0] == 'ref');
|
||||
int serializationId = x[1];
|
||||
return deserializedObjects[serializationId];
|
||||
}
|
||||
|
||||
// ['buffer', <byte buffer>].
|
||||
NativeByteBuffer deserializeByteBuffer(x) {
|
||||
assert(x[0] == 'buffer');
|
||||
NativeByteBuffer result = x[1];
|
||||
deserializedObjects.add(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
// ['typed', <typed array>].
|
||||
NativeTypedData deserializeTypedData(x) {
|
||||
assert(x[0] == 'typed');
|
||||
NativeTypedData result = x[1];
|
||||
deserializedObjects.add(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
// Updates the given array in place with its deserialized content.
|
||||
List deserializeArrayInPlace(JSArray x) {
|
||||
for (int i = 0; i < x.length; i++) {
|
||||
x[i] = deserialize(x[i]);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
// ['fixed', <array>].
|
||||
List deserializeFixed(x) {
|
||||
assert(x[0] == 'fixed');
|
||||
List result = x[1];
|
||||
deserializedObjects.add(result);
|
||||
return new JSArray.markFixed(deserializeArrayInPlace(result));
|
||||
}
|
||||
|
||||
// ['extendable', <array>].
|
||||
List deserializeExtendable(x) {
|
||||
assert(x[0] == 'extendable');
|
||||
List result = x[1];
|
||||
deserializedObjects.add(result);
|
||||
return new JSArray.markGrowable(deserializeArrayInPlace(result));
|
||||
}
|
||||
|
||||
// ['mutable', <array>].
|
||||
List deserializeMutable(x) {
|
||||
assert(x[0] == 'mutable');
|
||||
List result = x[1];
|
||||
deserializedObjects.add(result);
|
||||
return deserializeArrayInPlace(result);
|
||||
}
|
||||
|
||||
// ['const', <array>].
|
||||
List deserializeConst(x) {
|
||||
assert(x[0] == 'const');
|
||||
List result = x[1];
|
||||
deserializedObjects.add(result);
|
||||
// TODO(floitsch): need to mark list as non-changeable.
|
||||
return new JSArray.markFixed(deserializeArrayInPlace(result));
|
||||
}
|
||||
|
||||
// ['map', <key-list>, <value-list>].
|
||||
Map deserializeMap(x) {
|
||||
assert(x[0] == 'map');
|
||||
List keys = x[1];
|
||||
List values = x[2];
|
||||
Map result = {};
|
||||
deserializedObjects.add(result);
|
||||
// We need to keep the order of how objects were serialized.
|
||||
// First deserialize all keys, and then only deserialize the values.
|
||||
keys = keys.map(deserialize).toList();
|
||||
|
||||
for (int i = 0; i < keys.length; i++) {
|
||||
result[keys[i]] = deserialize(values[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// ['sendport', <managerId>, <isolateId>, <receivePortId>].
|
||||
SendPort deserializeSendPort(x) {
|
||||
assert(x[0] == 'sendport');
|
||||
int managerId = x[1];
|
||||
int isolateId = x[2];
|
||||
int receivePortId = x[3];
|
||||
SendPort result;
|
||||
// If two isolates are in the same manager, we use NativeJsSendPorts to
|
||||
// deliver messages directly without using postMessage.
|
||||
if (managerId == _globalState.currentManagerId) {
|
||||
var isolate = _globalState.isolates[isolateId];
|
||||
if (isolate == null) return null; // Isolate has been closed.
|
||||
var receivePort = isolate.lookup(receivePortId);
|
||||
if (receivePort == null) return null; // Port has been closed.
|
||||
result = new _NativeJsSendPort(receivePort, isolateId);
|
||||
} else {
|
||||
result = new _WorkerSendPort(managerId, isolateId, receivePortId);
|
||||
}
|
||||
deserializedObjects.add(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
// ['raw sendport', <sendport>].
|
||||
SendPort deserializeRawSendPort(x) {
|
||||
assert(x[0] == 'raw sendport');
|
||||
SendPort result = x[1];
|
||||
deserializedObjects.add(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
// ['js-object', <key-list>, <value-list>].
|
||||
deserializeJSObject(x) {
|
||||
assert(x[0] == 'js-object');
|
||||
List keys = x[1];
|
||||
List values = x[2];
|
||||
var o = JS('', '{}');
|
||||
deserializedObjects.add(o);
|
||||
for (int i = 0; i < keys.length; i++) {
|
||||
JS('', '#[#]=#', o, keys[i], deserialize(values[i]));
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
// ['function', <name>].
|
||||
Function deserializeClosure(x) {
|
||||
assert(x[0] == 'function');
|
||||
String name = x[1];
|
||||
Function result = IsolateNatives._getJSFunctionFromName(name);
|
||||
deserializedObjects.add(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
// ['capability', <id>].
|
||||
Capability deserializeCapability(x) {
|
||||
assert(x[0] == 'capability');
|
||||
return new CapabilityImpl._internal(x[1]);
|
||||
}
|
||||
|
||||
// ['dart', <class-id>, <field-list>].
|
||||
deserializeDartObject(x) {
|
||||
assert(x[0] == 'dart');
|
||||
String classId = x[1];
|
||||
List fields = x[2];
|
||||
var instanceFromClassId = JS_EMBEDDED_GLOBAL('', INSTANCE_FROM_CLASS_ID);
|
||||
var initializeObject = JS_EMBEDDED_GLOBAL('', INITIALIZE_EMPTY_INSTANCE);
|
||||
|
||||
var emptyInstance = JS('', '#(#)', instanceFromClassId, classId);
|
||||
deserializedObjects.add(emptyInstance);
|
||||
deserializeArrayInPlace(fields);
|
||||
return JS(
|
||||
'', '#(#, #, #)', initializeObject, classId, emptyInstance, fields);
|
||||
}
|
||||
}
|
||||
|
||||
bool _isPrimitive(x) => x == null || x is String || x is num || x is bool;
|
|
@ -24,28 +24,16 @@ import 'dart:_js_embedded_names'
|
|||
|
||||
import 'dart:collection';
|
||||
|
||||
import 'dart:_isolate_helper'
|
||||
show IsolateNatives, enterJsAsync, isWorker, leaveJsAsync;
|
||||
import 'dart:_isolate_helper' show thisScript, isWorker;
|
||||
|
||||
import 'dart:async'
|
||||
show
|
||||
Completer,
|
||||
DeferredLoadException,
|
||||
Future,
|
||||
StreamController,
|
||||
Stream,
|
||||
StreamSubscription,
|
||||
scheduleMicrotask,
|
||||
Zone;
|
||||
import 'dart:async' show Completer, DeferredLoadException, Future;
|
||||
|
||||
import 'dart:_foreign_helper'
|
||||
show
|
||||
DART_CLOSURE_TO_JS,
|
||||
JS,
|
||||
JS_BUILTIN,
|
||||
JS_CALL_IN_ISOLATE,
|
||||
JS_CONST,
|
||||
JS_CURRENT_ISOLATE_CONTEXT,
|
||||
JS_EFFECT,
|
||||
JS_EMBEDDED_GLOBAL,
|
||||
JS_GET_FLAG,
|
||||
|
@ -62,11 +50,7 @@ import 'dart:_internal'
|
|||
import 'dart:_native_typed_data';
|
||||
|
||||
import 'dart:_js_names'
|
||||
show
|
||||
extractKeys,
|
||||
mangledNames,
|
||||
unmangleGlobalNameIfPreservedAnyways,
|
||||
unmangleAllIdentifiersIfPreservedAnyways;
|
||||
show extractKeys, mangledNames, unmangleAllIdentifiersIfPreservedAnyways;
|
||||
|
||||
part 'annotations.dart';
|
||||
part 'constant_map.dart';
|
||||
|
@ -226,16 +210,6 @@ getType(int index) {
|
|||
'returns:var;effects:none;depends:none', JsBuiltin.getType, index);
|
||||
}
|
||||
|
||||
/// Returns a Dart closure for the global function with the given [name].
|
||||
///
|
||||
/// The [name] is the globally unique (minified) JavaScript name of the
|
||||
/// function. The name must be in correspondence with the propertyName that is
|
||||
/// used when creating a tear-off (see [fromTearOff]).
|
||||
Function createDartClosureFromNameOfStaticFunction(String name) {
|
||||
return JS_BUILTIN('returns:Function',
|
||||
JsBuiltin.createDartClosureFromNameOfStaticFunction, name);
|
||||
}
|
||||
|
||||
/// No-op method that is called to inform the compiler that preambles might
|
||||
/// be needed when executing the resulting JS file in a command-line
|
||||
/// JS engine.
|
||||
|
@ -2471,19 +2445,19 @@ fillLiteralMap(keyValuePairs, Map result) {
|
|||
return result;
|
||||
}
|
||||
|
||||
invokeClosure(Function closure, var isolate, int numberOfArguments, var arg1,
|
||||
var arg2, var arg3, var arg4) {
|
||||
invokeClosure(Function closure, int numberOfArguments, var arg1, var arg2,
|
||||
var arg3, var arg4) {
|
||||
switch (numberOfArguments) {
|
||||
case 0:
|
||||
return JS_CALL_IN_ISOLATE(isolate, () => closure());
|
||||
return closure();
|
||||
case 1:
|
||||
return JS_CALL_IN_ISOLATE(isolate, () => closure(arg1));
|
||||
return closure(arg1);
|
||||
case 2:
|
||||
return JS_CALL_IN_ISOLATE(isolate, () => closure(arg1, arg2));
|
||||
return closure(arg1, arg2);
|
||||
case 3:
|
||||
return JS_CALL_IN_ISOLATE(isolate, () => closure(arg1, arg2, arg3));
|
||||
return closure(arg1, arg2, arg3);
|
||||
case 4:
|
||||
return JS_CALL_IN_ISOLATE(isolate, () => closure(arg1, arg2, arg3, arg4));
|
||||
return closure(arg1, arg2, arg3, arg4);
|
||||
}
|
||||
throw new Exception('Unsupported number of arguments for wrapped closure');
|
||||
}
|
||||
|
@ -2500,14 +2474,13 @@ convertDartClosureToJS(closure, int arity) {
|
|||
function = JS(
|
||||
'var',
|
||||
r'''
|
||||
(function(closure, arity, context, invoke) {
|
||||
(function(closure, arity, invoke) {
|
||||
return function(a1, a2, a3, a4) {
|
||||
return invoke(closure, context, arity, a1, a2, a3, a4);
|
||||
return invoke(closure, arity, a1, a2, a3, a4);
|
||||
};
|
||||
})(#,#,#,#)''',
|
||||
})(#,#,#)''',
|
||||
closure,
|
||||
arity,
|
||||
JS_CURRENT_ISOLATE_CONTEXT(),
|
||||
DART_CLOSURE_TO_JS(invokeClosure));
|
||||
|
||||
JS('void', r'#.$identity = #', closure, function);
|
||||
|
@ -2548,9 +2521,6 @@ abstract class Closure implements Function {
|
|||
*
|
||||
* In other words, creates a tear-off closure.
|
||||
*
|
||||
* The [propertyName] argument is used by
|
||||
* [JsBuiltin.createDartClosureFromNameOfStaticFunction].
|
||||
*
|
||||
* Called from [closureFromTearOff] as well as from reflection when tearing
|
||||
* of a method via `getField`.
|
||||
*
|
||||
|
@ -3826,7 +3796,7 @@ Future<Null> _loadHunk(String hunkName) {
|
|||
return future.then((_) => null);
|
||||
}
|
||||
|
||||
String uri = IsolateNatives.thisScript;
|
||||
String uri = thisScript;
|
||||
|
||||
int index = uri.lastIndexOf('/');
|
||||
uri = '${uri.substring(0, index + 1)}$hunkName';
|
||||
|
@ -3865,11 +3835,6 @@ Future<Null> _loadHunk(String hunkName) {
|
|||
}
|
||||
} else if (isWorker()) {
|
||||
// We are in a web worker. Load the code with an XMLHttpRequest.
|
||||
enterJsAsync();
|
||||
Future<Null> leavingFuture = completer.future.whenComplete(() {
|
||||
leaveJsAsync();
|
||||
});
|
||||
|
||||
int index = uri.lastIndexOf('/');
|
||||
uri = '${uri.substring(0, index + 1)}$hunkName';
|
||||
var xhr = JS('var', 'new XMLHttpRequest()');
|
||||
|
|
|
@ -138,43 +138,6 @@ const TYPE_TO_INTERCEPTOR_MAP = "typeToInterceptorMap";
|
|||
/// This embedded global is set at startup, just before invoking `main`.
|
||||
const CURRENT_SCRIPT = 'currentScript';
|
||||
|
||||
/// Returns a function that creates a new Isolate (its static state).
|
||||
///
|
||||
/// (floitsch): Note that this embedded global will probably go away, since one
|
||||
/// JS heap will only contain one Dart isolate.
|
||||
const CREATE_NEW_ISOLATE = 'createNewIsolate';
|
||||
|
||||
/// Returns a class-id of the given instance.
|
||||
///
|
||||
/// The extracted id can be used to built a new instance of the same type
|
||||
/// (see [INSTANCE_FROM_CLASS_ID].
|
||||
///
|
||||
/// This embedded global is used for serialization in the isolate-library.
|
||||
const CLASS_ID_EXTRACTOR = 'classIdExtractor';
|
||||
|
||||
/// Returns an empty instance of the given class-id.
|
||||
///
|
||||
/// Given a class-id (see [CLASS_ID_EXTRACTOR]) returns an empty instance.
|
||||
///
|
||||
/// This embedded global is used for deserialization in the isolate-library.
|
||||
const INSTANCE_FROM_CLASS_ID = "instanceFromClassId";
|
||||
|
||||
/// Returns a list of (mangled) field names for the given instance.
|
||||
///
|
||||
/// The list of fields can be used to extract the instance's values and then
|
||||
/// initialize an empty instance (see [INITIALIZE_EMPTY_INSTANCE].
|
||||
///
|
||||
/// This embedded global is used for serialization in the isolate-library.
|
||||
const CLASS_FIELDS_EXTRACTOR = 'classFieldsExtractor';
|
||||
|
||||
/// Initializes the given empty instance with the given fields.
|
||||
///
|
||||
/// The given fields are in an array and must be in the same order as the
|
||||
/// field-names obtained by [CLASS_FIELDS_EXTRACTOR].
|
||||
///
|
||||
/// This embedded global is used for deserialization in the isolate-library.
|
||||
const INITIALIZE_EMPTY_INSTANCE = "initializeEmptyInstance";
|
||||
|
||||
/// Contains a map from load-ids to lists of part indexes.
|
||||
///
|
||||
/// To load the deferred library that is represented by the load-id, the runtime
|
||||
|
@ -250,29 +213,6 @@ const PRECOMPILED = 'precompiled';
|
|||
/// An emitter-internal embedded global. This global is not used by the runtime.
|
||||
const FINISHED_CLASSES = 'finishedClasses';
|
||||
|
||||
/// An emitter-internal embedded global. This global is not used by the runtime.
|
||||
///
|
||||
/// The constant remains in this file to make sure that other embedded globals
|
||||
/// don't clash with it.
|
||||
///
|
||||
/// It can be used by the compiler to store a mapping from static function names
|
||||
/// to dart-closure getters (which can be useful for
|
||||
/// [JsBuiltin.createDartClosureFromNameOfStaticFunction].
|
||||
const GLOBAL_FUNCTIONS = 'globalFunctions';
|
||||
|
||||
/// An emitter-internal embedded global. This global is not used by the runtime.
|
||||
///
|
||||
/// The constant remains in this file to make sure that other embedded globals
|
||||
/// don't clash with it.
|
||||
///
|
||||
/// This embedded global stores a function that returns a dart-closure getter
|
||||
/// for a given static function name.
|
||||
///
|
||||
/// This embedded global is used to implement
|
||||
/// [JsBuiltin.createDartClosureFromNameOfStaticFunction], and is only
|
||||
/// used with isolates.
|
||||
const STATIC_FUNCTION_NAME_TO_CLOSURE = 'staticFunctionNameToClosure';
|
||||
|
||||
/// A JavaScript object literal that maps the (minified) JavaScript constructor
|
||||
/// name (as given by [JsBuiltin.rawRtiToJsConstructorName] to the
|
||||
/// JavaScript constructor.
|
||||
|
@ -475,16 +415,4 @@ enum JsBuiltin {
|
|||
/// JS_BUILTIN('returns:var;effects:none;depends:none',
|
||||
/// JsBuiltin.getType, index);
|
||||
getType,
|
||||
|
||||
/// Returns a Dart closure for the global function with the given [name].
|
||||
///
|
||||
/// The [name] is the globally unique (minified) JavaScript name of the
|
||||
/// function (same as the one stored in [STATIC_FUNCTION_NAME_PROPERTY_NAME])
|
||||
///
|
||||
/// This builtin is used when a static closure was sent to a different
|
||||
/// isolate.
|
||||
///
|
||||
/// JS_BUILTIN('returns:Function',
|
||||
/// JsBuiltin.createDartClosureFromNameOfStaticFunction, name);
|
||||
createDartClosureFromNameOfStaticFunction,
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/cla
|
|||
Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t07: MissingCompileTimeError # Issue 24332
|
||||
Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t08: MissingCompileTimeError # Issue 24332
|
||||
Language/Expressions/Shift/syntax_t01/14: MissingRuntimeError # Please triage this failure
|
||||
Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign
|
||||
Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t02: CompileTimeError # Please triage this failure
|
||||
Language/Metadata/before_export_t01: RuntimeError # Please triage this failure
|
||||
Language/Metadata/before_import_t01: RuntimeError # Please triage this failure
|
||||
|
@ -179,18 +180,7 @@ LibTest/html/HttpRequest/responseType_A01_t03: CompileTimeError # co19-roll r706
|
|||
LibTest/html/IFrameElement/addEventListener_A01_t04: Skip # https://github.com/dart-lang/sdk/issues/28873
|
||||
LibTest/html/IFrameElement/enteredView_A01_t01: CompileTimeError # co19-roll r706: Please triage this failure
|
||||
LibTest/html/Window/postMessage_A01_t01: Skip # https://github.com/dart-lang/sdk/issues/28873
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t01: Fail # Dart issue 15974
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t02: Fail # Dart issue 15974
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t03: Fail # Dart issue 15974
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t04: Fail # Dart issue 15974
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t05: Fail # Dart issue 15974
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t06: RuntimeError # Dart issue 15974
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t07: RuntimeError # Dart issue 15974
|
||||
LibTest/isolate/Isolate/spawnUri_A02_t01: RuntimeError, Pass # Dart issue 15617
|
||||
LibTest/isolate/Isolate/spawn_A02_t02: RuntimeError, Pass # Dart issue 15617
|
||||
LibTest/isolate/Isolate/spawn_A04_t01: SkipByDesign
|
||||
LibTest/isolate/Isolate/spawn_A04_t02: SkipByDesign
|
||||
LibTest/isolate/Isolate/spawn_A06_t06: Skip # Times out. Please triage this failure.
|
||||
LibTest/isolate/*: SkipByDesign # dart:isolate not supported.
|
||||
LibTest/math/MutableRectangle/boundingBox_A01_t01: RuntimeError, Pass # co19-roll r706: Please triage this failure.
|
||||
LibTest/math/Rectangle/boundingBox_A01_t01: RuntimeError, Pass # co19-roll r706: Please triage this failure.
|
||||
LibTest/math/pow_A04_t01: Fail # co19-roll r587: Please triage this failure
|
||||
|
@ -1282,7 +1272,6 @@ LayoutTests/fast/text/glyph-reordering_t01: RuntimeError # Please triage this fa
|
|||
LayoutTests/fast/text/line-break-after-question-mark_t01: RuntimeError # Please triage this failure
|
||||
LayoutTests/fast/text/text-combine-shrink-to-fit_t01: RuntimeError # Please triage this failure
|
||||
LibTest/async/Timer/Timer.periodic_A01_t01: Skip # Times out. Please triage this failure
|
||||
LibTest/isolate/Isolate/spawn_A01_t05: Skip # Times out. Please triage this failure
|
||||
WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-002_t01: Skip # Times out. Please triage this failure
|
||||
|
||||
[ $compiler == dart2js && $runtime == chrome && $system != macos ]
|
||||
|
@ -1467,13 +1456,6 @@ LibTest/core/int/operator_truncating_division_A01_t02: Fail # Please triage this
|
|||
LibTest/core/int/remainder_A01_t01: Fail # Please triage this failure.
|
||||
LibTest/core/int/remainder_A01_t03: Fail # Please triage this failure.
|
||||
LibTest/core/int/toRadixString_A01_t01: Fail # Please triage this failure.
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t01: Skip # Please triage this failure.
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t02: Skip # Please triage this failure.
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t03: Skip # Please triage this failure.
|
||||
LibTest/isolate/Isolate/spawnUri_A02_t01: RuntimeError # Please triage this failure.
|
||||
LibTest/isolate/Isolate/spawnUri_A02_t02: Skip # Please triage this failure.
|
||||
LibTest/isolate/Isolate/spawnUri_A02_t03: Skip # Please triage this failure.
|
||||
LibTest/isolate/Isolate/spawnUri_A02_t04: Skip # Please triage this failure.
|
||||
LibTest/math/log_A01_t01: Fail # Please triage this failure.
|
||||
LibTest/typed_data/Float32x4List/Float32x4List.view_A01_t02: RuntimeError # Please triage this failure.
|
||||
LibTest/typed_data/Float32x4List/Float32x4List.view_A06_t01: RuntimeError # Please triage this failure.
|
||||
|
@ -1484,8 +1466,6 @@ LibTest/typed_data/Int8List/sublist_A02_t01: Pass, Slow # Please triage this fai
|
|||
LibTest/typed_data/Uint8ClampedList/map_A02_t01: Pass, Slow # Please triage this failure.
|
||||
|
||||
[ $compiler == dart2js && $runtime == d8 ]
|
||||
LibTest/isolate/Isolate/spawn_A03_t01: Pass # co19 issue 77
|
||||
LibTest/isolate/Isolate/spawn_A04_t02: RuntimeError # Please triage this failure.
|
||||
LibTest/typed_data/Float32x4List/Float32x4List.view_A06_t01: Fail # co19-roll r587: Please triage this failure
|
||||
LibTest/typed_data/Int32x4/operator_OR_A01_t01: RuntimeError # Issue 7728, timer not supported in jsshell
|
||||
|
||||
|
@ -1494,9 +1474,6 @@ Language/Classes/Constructors/Factories/function_type_t02: RuntimeError
|
|||
Language/Expressions/Instance_Creation/New/redirecting_factory_constructor_t02: RuntimeError
|
||||
Language/Generics/malformed_t02: Crash
|
||||
|
||||
[ $compiler == dart2js && $runtime == d8 && $fast_startup ]
|
||||
LibTest/isolate/Isolate/spawn_A04_t04: Pass # Technically fails, but since sync-async was turned on, this test completes before it fails. Underlying issue: #27558
|
||||
|
||||
[ $compiler == dart2js && $runtime == d8 && $fasta ]
|
||||
LayoutTests/*: SkipByDesign
|
||||
LibTest/html/*: SkipByDesign
|
||||
|
@ -5593,22 +5570,6 @@ LibTest/core/Stopwatch/start_A01_t02: RuntimeError # Please triage this failure
|
|||
LibTest/core/Stopwatch/start_A01_t03: RuntimeError # Issue 7728, timer not supported in jsshell
|
||||
LibTest/core/Stopwatch/stop_A01_t01: RuntimeError # Issue 7728, timer not supported in jsshell
|
||||
LibTest/core/Uri/Uri_A06_t03: Pass, Slow
|
||||
LibTest/isolate/Isolate/spawn_A03_t01: RuntimeError # Please triage this failure
|
||||
LibTest/isolate/Isolate/spawn_A03_t03: RuntimeError # Please triage this failure
|
||||
LibTest/isolate/Isolate/spawn_A03_t04: RuntimeError # Please triage this failure
|
||||
LibTest/isolate/Isolate/spawn_A04_t02: RuntimeError # Please triage this failure
|
||||
LibTest/isolate/Isolate/spawn_A04_t03: Fail # Please triage this failure
|
||||
LibTest/isolate/Isolate/spawn_A04_t04: Fail # Issue 27558
|
||||
LibTest/isolate/Isolate/spawn_A04_t05: Fail # Please triage this failure
|
||||
LibTest/isolate/Isolate/spawn_A06_t02: Fail # Please triage this failure
|
||||
LibTest/isolate/Isolate/spawn_A06_t03: Fail # Please triage this failure
|
||||
LibTest/isolate/Isolate/spawn_A06_t04: RuntimeError # Please triage this failure
|
||||
LibTest/isolate/Isolate/spawn_A06_t05: RuntimeError # Please triage this failure
|
||||
LibTest/isolate/Isolate/spawn_A06_t07: Fail # Please triage this failure
|
||||
LibTest/isolate/RawReceivePort/close_A01_t01: RuntimeError # Issue 7728, timer not supported in jsshell
|
||||
LibTest/isolate/ReceivePort/asBroadcastStream_A03_t01: RuntimeError # Issue 7728, timer not supported in jsshell
|
||||
LibTest/isolate/ReceivePort/asBroadcastStream_A04_t03: RuntimeError # Issue 7728, timer not supported in jsshell
|
||||
LibTest/isolate/ReceivePort/close_A01_t01: RuntimeError # Issue 7728, timer not supported in jsshell
|
||||
LibTest/typed_data/Float32List/toList_A01_t01: Skip # co19-roll r559: Please triage this failure
|
||||
LibTest/typed_data/Float32x4List/Float32x4List.view_A06_t01: Fail # co19-roll r587: Please triage this failure
|
||||
LibTest/typed_data/Float64List/toList_A01_t01: Skip # co19-roll r559: Please triage this failure
|
||||
|
@ -5626,9 +5587,6 @@ LibTest/core/Map/Map_class_A01_t04: Skip # Issue 18093, timeout.
|
|||
LibTest/core/Uri/Uri_A06_t03: Skip # Issue 18093, timeout.
|
||||
LibTest/core/Uri/encodeQueryComponent_A01_t02: Skip # Issue 18093, timeout.
|
||||
|
||||
[ $compiler == dart2js && $runtime == jsshell && $fast_startup ]
|
||||
LibTest/isolate/ReceivePort/asBroadcastStream_A03_t01: Fail # please triage
|
||||
|
||||
[ $compiler == dart2js && $runtime == safari ]
|
||||
LayoutTests/fast/alignment/parse-align-items_t01: RuntimeError # Please triage this failure
|
||||
LayoutTests/fast/alignment/parse-align-self_t01: RuntimeError # Please triage this failure
|
||||
|
@ -7108,7 +7066,6 @@ LibTest/html/Window/postMessage_A01_t02: Crash
|
|||
LibTest/html/Window/requestFileSystem_A01_t01: Crash
|
||||
LibTest/html/Window/requestFileSystem_A01_t02: Crash
|
||||
LibTest/html/Window/requestFileSystem_A02_t01: Crash
|
||||
LibTest/isolate/SendPort/send_A01_t03: RuntimeError
|
||||
WebPlatformTest/html/semantics/embedded-content/the-audio-element/audio_constructor_t01: RuntimeError
|
||||
|
||||
[ $compiler == dart2js && $fasta && $host_checked ]
|
||||
|
@ -7261,9 +7218,6 @@ Language/Types/Type_Void/syntax_t02: CompileTimeError # Please triage this failu
|
|||
Language/Variables/final_t01/01: CompileTimeError # co19 issue 77
|
||||
Language/Variables/final_t02/01: CompileTimeError # co19 issue 77
|
||||
Language/Variables/local_variable_t01: MissingCompileTimeError # Issue 21050
|
||||
LibTest/isolate/SendPort/send_A01_t01: CompileTimeError # co19-roll r706: Please triage this failure
|
||||
LibTest/isolate/SendPort/send_A01_t02: CompileTimeError # co19-roll r706: Please triage this failure
|
||||
LibTest/isolate/SendPort/send_A01_t03: CompileTimeError # co19-roll r706: Please triage this failure
|
||||
|
||||
[ $compiler == dart2js && $jscl ]
|
||||
LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: RuntimeError, OK # This is not rejected by V8. Issue 22200
|
||||
|
|
|
@ -458,8 +458,6 @@ void checkBackendUsage(
|
|||
usage2.isInvokeOnUsed);
|
||||
check(usage1, usage2, 'isRuntimeTypeUsed', usage1.isRuntimeTypeUsed,
|
||||
usage2.isRuntimeTypeUsed);
|
||||
check(usage1, usage2, 'isIsolateInUse', usage1.isIsolateInUse,
|
||||
usage2.isIsolateInUse);
|
||||
check(usage1, usage2, 'isFunctionApplyUsed', usage1.isFunctionApplyUsed,
|
||||
usage2.isFunctionApplyUsed);
|
||||
check(usage1, usage2, 'isNoSuchMethodUsed', usage1.isNoSuchMethodUsed,
|
||||
|
@ -915,8 +913,6 @@ void checkResolutionEnqueuers(
|
|||
backendUsage1.isRuntimeTypeUsed,
|
||||
backendUsage2.isRuntimeTypeUsed,
|
||||
"JavaScriptBackend.hasRuntimeTypeSupport mismatch");
|
||||
Expect.equals(backendUsage1.isIsolateInUse, backendUsage2.isIsolateInUse,
|
||||
"JavaScriptBackend.hasIsolateSupport mismatch");
|
||||
}
|
||||
|
||||
void checkCodegenEnqueuers(CodegenEnqueuer enqueuer1, CodegenEnqueuer enqueuer2,
|
||||
|
@ -1026,8 +1022,6 @@ void checkEmitterPrograms(
|
|||
program1.outputContainsConstantList, program2.outputContainsConstantList);
|
||||
check(program1, program2, 'needsNativeSupport', program1.needsNativeSupport,
|
||||
program2.needsNativeSupport);
|
||||
check(program1, program2, 'hasIsolateSupport', program1.hasIsolateSupport,
|
||||
program2.hasIsolateSupport);
|
||||
check(program1, program2, 'hasSoftDeferredClasses',
|
||||
program1.hasSoftDeferredClasses, program2.hasSoftDeferredClasses);
|
||||
checkMaps(
|
||||
|
|
|
@ -120,9 +120,6 @@ const List<LineException> afterExceptions = const [
|
|||
const LineException('_AsyncRun._scheduleImmediateJsOverride.internalCallback',
|
||||
'async_patch.dart'),
|
||||
const LineException('invokeClosure.<anonymous function>', 'js_helper.dart'),
|
||||
const LineException('_IsolateContext.eval', 'isolate_helper.dart'),
|
||||
const LineException('_callInIsolate', 'isolate_helper.dart'),
|
||||
const LineException('startRootIsolate', 'isolate_helper.dart'),
|
||||
const LineException('invokeClosure', 'js_helper.dart'),
|
||||
const LineException('convertDartClosureToJS', 'js_helper.dart'),
|
||||
];
|
||||
|
|
|
@ -5,15 +5,9 @@
|
|||
// Test of IsolateNatives.computeThisScript().
|
||||
|
||||
import 'dart:_isolate_helper';
|
||||
// The isolate helper library is not correctly set up if the dart:isolate
|
||||
// library hasn't been loaded.
|
||||
import 'dart:isolate';
|
||||
|
||||
main() {
|
||||
// Need to use the isolate-library so dart2js correctly initializes the
|
||||
// library.
|
||||
Capability cab = new Capability();
|
||||
String script = IsolateNatives.computeThisScript();
|
||||
String script = computeThisScript();
|
||||
|
||||
// This is somewhat brittle and relies on an implementation detail
|
||||
// of our test runner, but I can think of no other way to test this.
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
// Test that a private library can be accessed from libraries in this special
|
||||
// test folder.
|
||||
|
||||
import 'dart:_isolate_helper';
|
||||
import 'dart:_js_helper';
|
||||
|
||||
void main() {
|
||||
print(startRootIsolate);
|
||||
print(loadDeferredLibrary);
|
||||
}
|
||||
|
|
|
@ -93,6 +93,9 @@ http_resource_test: Skip, OK # VM specific test, uses dart:io.
|
|||
list_as_map_test: Pass, Slow # TODO(kasperl): Please triage.
|
||||
string_trimlr_test/unicode63: RuntimeError # Uses Unicode 6.2.0 or earlier.
|
||||
|
||||
[ $compiler == dart2js && $runtime != d8 ]
|
||||
main_test: RuntimeError
|
||||
|
||||
[ $compiler == dart2js && $runtime == drt ]
|
||||
string_trimlr_test/unicode63: RuntimeError # Uses Unicode 6.2.0 or earlier.
|
||||
|
||||
|
|
|
@ -42,10 +42,12 @@ indexeddb_3_test: Pass, Timeout # Roll 50 failure
|
|||
indexeddb_4_test: Pass, Timeout # Roll 50 failure
|
||||
indexeddb_5_test: Pass, Timeout # Roll 50 failure
|
||||
input_element_test/attributes: Fail # Issue 21555
|
||||
isolates_test: SkipByDesign
|
||||
js_typed_interop_default_arg_test/default_value: MissingCompileTimeError # Issue #25759
|
||||
js_typed_interop_side_cast_exp_test: Pass, RuntimeError # Roll 50 failure
|
||||
mirrors_js_typed_interop_test: Pass, Slow
|
||||
svgelement_test/PathElement: Pass, RuntimeError # Roll 50 failure
|
||||
worker_api_test: SkipByDesign
|
||||
wrapping_collections_test: SkipByDesign # Testing an issue that is only relevant to Dartium
|
||||
xhr_test/xhr: Pass, RuntimeError # Roll 50 failure
|
||||
|
||||
|
@ -152,7 +154,6 @@ shadow_dom_test/supported: Fail # Safari Feature support statuses - All changes
|
|||
speechrecognition_test/supported: Fail # Safari Feature support statuses - All changes should be accompanied by platform support annotation changes.
|
||||
touchevent_test/supported: Fail # Safari does not support TouchEvents
|
||||
webgl_1_test: Pass, Fail # Issue 8219
|
||||
worker_api_test: Skip # Issue 13221
|
||||
|
||||
# The html tests were moved to lib_2/html, and there they should be made strong
|
||||
# mode compliant. There's no sense in running the old versions here.
|
||||
|
|
|
@ -6,29 +6,7 @@
|
|||
browser/typed_data_message_test: StaticWarning
|
||||
|
||||
[ $compiler == dart2js ]
|
||||
browser/issue_12474_test: CompileTimeError # Issue 22529
|
||||
deferred_in_isolate2_test: SkipByDesign
|
||||
enum_const_test/02: RuntimeError # Issue 21817
|
||||
error_at_spawnuri_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
error_exit_at_spawnuri_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
exit_at_spawnuri_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
function_send1_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
issue_21398_parent_isolate1_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
issue_21398_parent_isolate2_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
issue_21398_parent_isolate_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
issue_24243_parent_isolate_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
kill_self_synchronously_test: SkipByDesign # Unsupported operation: Platform._resolvedExecutable
|
||||
message3_test/constInstance: RuntimeError # Issue 21817
|
||||
message3_test/constList: RuntimeError # Issue 21817
|
||||
message3_test/constList_identical: RuntimeError # Issue 21817
|
||||
message3_test/constMap: RuntimeError # Issue 21817
|
||||
non_fatal_exception_in_timer_callback_test: Skip # Issue 23876
|
||||
spawn_uri_exported_main_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
spawn_uri_missing_from_isolate_test: SkipByDesign
|
||||
spawn_uri_nested_vm_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
spawn_uri_vm_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
stacktrace_message_test: RuntimeError # Fails to send stacktrace object.
|
||||
timer_isolate_test: SkipByDesign
|
||||
*: SkipByDesign
|
||||
|
||||
[ $compiler == fasta ]
|
||||
browser/compute_this_script_browser_test: CompileTimeError # TODO(ahe): Support dart:html in Fasta.
|
||||
|
@ -64,91 +42,6 @@ spawn_uri_multi_test/none: RuntimeError # Issue 13544
|
|||
[ $compiler == dart2analyzer && $strong ]
|
||||
*: Skip # Issue 28649
|
||||
|
||||
[ $compiler == dart2js && $runtime == chrome ]
|
||||
function_send_test: Skip # Crashes Chrome 62: https://bugs.chromium.org/p/chromium/issues/detail?id=775506
|
||||
|
||||
[ $compiler == dart2js && $runtime == chromeOnAndroid ]
|
||||
isolate_stress_test: Pass, Slow # TODO(kasperl): Please triage.
|
||||
mandel_isolate_test: Pass, Timeout # TODO(kasperl): Please triage.
|
||||
unresolved_ports_test: Pass, Timeout # Issue 15610
|
||||
|
||||
[ $compiler == dart2js && $runtime == d8 && $fasta ]
|
||||
isolate_stress_test: RuntimeError
|
||||
|
||||
[ $compiler == dart2js && $runtime != d8 ]
|
||||
error_at_spawn_test: Skip # Issue 23876
|
||||
error_exit_at_spawn_test: Skip # Issue 23876
|
||||
exit_at_spawn_test: Skip # Issue 23876
|
||||
message4_test: Skip # Issue 30247
|
||||
|
||||
[ $compiler == dart2js && $runtime == jsshell ]
|
||||
pause_test: Fail, OK # non-zero timer not supported.
|
||||
timer_isolate_test: Fail, OK # Needs Timer to run.
|
||||
|
||||
[ $compiler == dart2js && $runtime == safari ]
|
||||
cross_isolate_message_test: Skip # Issue 12627
|
||||
message_test: Skip # Issue 12627
|
||||
|
||||
[ $compiler == dart2js && !$browser && $fast_startup ]
|
||||
isolate_current_test: Fail # please triage
|
||||
|
||||
[ $compiler == dart2js && $fast_startup ]
|
||||
browser/compute_this_script_browser_test: Fail # mirrors not supported
|
||||
browser/typed_data_message_test: Fail # mirrors not supported
|
||||
count_test: Fail # mirrors not supported
|
||||
cross_isolate_message_test: Fail # mirrors not supported
|
||||
illegal_msg_function_test: Fail # mirrors not supported
|
||||
illegal_msg_mirror_test: Fail # mirrors not supported
|
||||
isolate_complex_messages_test: Fail # mirrors not supported
|
||||
mandel_isolate_test: Fail # mirrors not supported
|
||||
message2_test: Fail # mirrors not supported
|
||||
message_test: Fail # mirrors not supported
|
||||
mint_maker_test: Fail # mirrors not supported
|
||||
nested_spawn2_test: Fail # mirrors not supported
|
||||
nested_spawn_test: Fail # mirrors not supported
|
||||
raw_port_test: Fail # mirrors not supported
|
||||
remote_unittest_helper: Fail # mirrors not supported
|
||||
request_reply_test: Fail # mirrors not supported
|
||||
spawn_function_custom_class_test: Fail # mirrors not supported
|
||||
spawn_function_test: Fail # mirrors not supported
|
||||
stacktrace_message_test: Fail # mirrors not supported
|
||||
static_function_test: Fail # mirrors not supported
|
||||
unresolved_ports_test: Fail # mirrors not supported
|
||||
|
||||
[ $compiler == dart2js && $fasta ]
|
||||
browser/compute_this_script_browser_test: RuntimeError # mirrors not supported
|
||||
browser/typed_data_message_test: RuntimeError # mirrors not supported
|
||||
compile_time_error_test/01: Crash
|
||||
count_test: RuntimeError # mirrors not supported
|
||||
cross_isolate_message_test: RuntimeError # mirrors not supported
|
||||
illegal_msg_function_test: RuntimeError # mirrors not supported
|
||||
illegal_msg_mirror_test: RuntimeError # mirrors not supported
|
||||
isolate_complex_messages_test: RuntimeError # mirrors not supported
|
||||
mandel_isolate_test: RuntimeError # mirrors not supported
|
||||
message2_test: RuntimeError # mirrors not supported
|
||||
message_test: RuntimeError # mirrors not supported
|
||||
mint_maker_test: RuntimeError # mirrors not supported
|
||||
nested_spawn2_test: RuntimeError # mirrors not supported
|
||||
nested_spawn_test: RuntimeError # mirrors not supported
|
||||
raw_port_test: RuntimeError # mirrors not supported
|
||||
remote_unittest_helper: RuntimeError # mirrors not supported
|
||||
request_reply_test: RuntimeError # mirrors not supported
|
||||
spawn_function_custom_class_test: RuntimeError # mirrors not supported
|
||||
spawn_function_test: RuntimeError # mirrors not supported
|
||||
stacktrace_message_test: RuntimeError # mirrors not supported
|
||||
static_function_test: RuntimeError # mirrors not supported
|
||||
unresolved_ports_test: RuntimeError # mirrors not supported
|
||||
|
||||
[ $compiler == dart2js && $fasta && $host_checked ]
|
||||
deferred_in_isolate2_test: Crash
|
||||
|
||||
[ $compiler == dart2js && $jscl ]
|
||||
browser/*: SkipByDesign # Browser specific tests
|
||||
spawn_uri_test: SkipByDesign # Loading another file is not supported in JS shell
|
||||
|
||||
[ $compiler == dart2js && ($runtime == chrome || $runtime == chromeOnAndroid || $runtime == drt || $runtime == ff || $runtime == safari) ]
|
||||
isolate_stress_test: Pass, Slow # Issue 10697
|
||||
|
||||
[ $compiler == none && $runtime == vm && $system == fuchsia ]
|
||||
*: Skip # Not yet triaged.
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ full_stacktrace1_test: Pass, RuntimeError # Issue 12698
|
|||
full_stacktrace2_test: Pass, RuntimeError # Issue 12698
|
||||
full_stacktrace3_test: Pass, RuntimeError # Issue 12698
|
||||
library_env_test/has_no_html_support: RuntimeError, OK
|
||||
main_test/03: MissingRuntimeError # dart:isolate not supported
|
||||
vm/*: Skip # Issue 12699
|
||||
|
||||
[ $arch == ia32 && $compiler == dart2js && $runtime == d8 ]
|
||||
|
@ -132,9 +133,9 @@ const_constructor3_test/04: MissingCompileTimeError
|
|||
const_init2_test/02: MissingCompileTimeError
|
||||
deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
||||
deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
||||
deferred_constraints_type_annotation_test/type_annotation1: Fail # Missing dynamic type error
|
||||
deferred_constraints_type_annotation_test/type_annotation_generic1: Fail # Missing dynamic type error
|
||||
deferred_constraints_type_annotation_test/type_annotation_generic4: Fail # Missing dynamic type error
|
||||
deferred_constraints_type_annotation_test/type_annotation1: Fail # Missing dynamic type error
|
||||
factory_redirection_test/08: Fail
|
||||
factory_redirection_test/09: Fail
|
||||
factory_redirection_test/10: Fail
|
||||
|
|
|
@ -695,7 +695,6 @@ library_env_test/has_mirror_support: RuntimeError
|
|||
local_function2_test/none: RuntimeError
|
||||
local_function3_test/none: RuntimeError
|
||||
local_function_test/none: RuntimeError
|
||||
main_test/03: RuntimeError
|
||||
many_overridden_no_such_method_test: RuntimeError
|
||||
method_override7_test/00: MissingCompileTimeError
|
||||
method_override7_test/01: MissingCompileTimeError
|
||||
|
@ -1118,7 +1117,6 @@ library_env_test/has_no_io_support: RuntimeError
|
|||
local_function2_test/none: RuntimeError
|
||||
local_function3_test/none: RuntimeError
|
||||
local_function_test/none: RuntimeError
|
||||
main_test/03: RuntimeError
|
||||
malbounded_instantiation_test/01: MissingCompileTimeError
|
||||
malbounded_instantiation_test/02: MissingCompileTimeError
|
||||
malbounded_instantiation_test/03: MissingCompileTimeError
|
||||
|
@ -1669,7 +1667,6 @@ library_env_test/has_no_io_support: RuntimeError
|
|||
local_function2_test/none: RuntimeError
|
||||
local_function3_test/none: RuntimeError
|
||||
local_function_test/none: RuntimeError
|
||||
main_test/03: RuntimeError
|
||||
malbounded_instantiation_test/01: MissingCompileTimeError
|
||||
malbounded_instantiation_test/02: MissingCompileTimeError
|
||||
malbounded_instantiation_test/03: MissingCompileTimeError
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
[ $compiler == dart2js ]
|
||||
async/async_await_sync_completer_test: RuntimeError
|
||||
async/future_or_strong_test: RuntimeError
|
||||
convert/base64_test/01: Fail, OK # Uses bit-wise operations to detect invalid values. Some large invalid values accepted by dart2js.
|
||||
convert/chunked_conversion_utf88_test: Slow, Pass
|
||||
|
@ -21,35 +22,15 @@ html/indexeddb_2_test: Pass, Timeout # Roll 50 failure
|
|||
html/indexeddb_3_test: Pass, Timeout # Roll 50 failure
|
||||
html/indexeddb_4_test: Pass, Timeout # Roll 50 failure
|
||||
html/indexeddb_5_test: Pass, Timeout # Roll 50 failure
|
||||
html/isolates_test: SkipByDesign
|
||||
html/js_typed_interop_default_arg_test/default_value: MissingCompileTimeError # Issue #25759
|
||||
html/js_typed_interop_side_cast_exp_test: Pass, RuntimeError # Roll 50 failure
|
||||
html/mirrors_js_typed_interop_test: Pass, Slow
|
||||
html/svgelement_test/PathElement: Pass, RuntimeError # Roll 50 failure
|
||||
html/worker_api_test: SkipByDesign
|
||||
html/wrapping_collections_test: SkipByDesign # Testing an issue that is only relevant to Dartium
|
||||
html/xhr_test: Pass, Slow
|
||||
isolate/browser/issue_12474_test: CompileTimeError # Issue 22529
|
||||
isolate/deferred_in_isolate2_test: SkipByDesign
|
||||
isolate/enum_const_test/02: RuntimeError # Issue 21817
|
||||
isolate/error_at_spawnuri_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
isolate/error_exit_at_spawnuri_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
isolate/exit_at_spawnuri_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
isolate/function_send1_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
isolate/issue_21398_parent_isolate1_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
isolate/issue_21398_parent_isolate2_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
isolate/issue_21398_parent_isolate_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
isolate/issue_24243_parent_isolate_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
isolate/kill_self_synchronously_test: SkipByDesign # Unsupported operation: Platform._resolvedExecutable
|
||||
isolate/message3_test/constInstance: RuntimeError # Issue 21817
|
||||
isolate/message3_test/constList: RuntimeError # Issue 21817
|
||||
isolate/message3_test/constList_identical: RuntimeError # Issue 21817
|
||||
isolate/message3_test/constMap: RuntimeError # Issue 21817
|
||||
isolate/non_fatal_exception_in_timer_callback_test: Skip # Issue 23876
|
||||
isolate/spawn_uri_exported_main_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
isolate/spawn_uri_missing_from_isolate_test: SkipByDesign
|
||||
isolate/spawn_uri_nested_vm_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
isolate/spawn_uri_vm_test: SkipByDesign # Test uses a ".dart" URI.
|
||||
isolate/stacktrace_message_test: RuntimeError # Fails to send stacktrace object.
|
||||
isolate/timer_isolate_test: SkipByDesign
|
||||
isolate/*: SkipByDesign # No support for dart:isolate in dart4web (http://dartbug.com/30538)
|
||||
math/double_pow_test: RuntimeError
|
||||
math/low_test: RuntimeError
|
||||
math/random_big_test: RuntimeError # Using bigint seeds for random.
|
||||
|
@ -88,8 +69,6 @@ html/file_sample_test: Pass, RuntimeError
|
|||
html/fileapi_entry_test: Pass, RuntimeError
|
||||
html/media_stream_test: RuntimeError # Please triage.
|
||||
html/speechrecognition_test: RuntimeError # Please triage.
|
||||
isolate/function_send_test: Skip # Crashes Chrome 62: https://bugs.chromium.org/p/chromium/issues/detail?id=775506
|
||||
isolate/kill_self_synchronously_test: RuntimeError
|
||||
|
||||
[ $compiler == dart2js && $runtime == chrome && $csp ]
|
||||
html/canvas_pixel_array_type_alias_test: RuntimeError
|
||||
|
@ -124,8 +103,6 @@ html/media_stream_test: Fail # TODO(dart2js-team): Please triage this failure.
|
|||
html/rtc_test: Fail # TODO(dart2js-team): Please triage this failure.
|
||||
html/speechrecognition_test: Fail # TODO(dart2js-team): Please triage this failure.
|
||||
html/xhr_test/json: Fail # TODO(dart2js-team): Please triage this failure.
|
||||
isolate/mandel_isolate_test: Pass, Timeout # TODO(kasperl): Please triage.
|
||||
isolate/unresolved_ports_test: Pass, Timeout # Issue 15610
|
||||
typed_data/setRange_2_test: RuntimeError # TODO(dart2js-team): Please triage this failure.
|
||||
typed_data/setRange_3_test: RuntimeError # TODO(dart2js-team): Please triage this failure.
|
||||
|
||||
|
@ -356,22 +333,12 @@ html/worker_test: RuntimeError
|
|||
html/xhr_cross_origin_test: RuntimeError
|
||||
html/xhr_test: RuntimeError
|
||||
html/xsltprocessor_test: RuntimeError
|
||||
isolate/browser/package_resolve_browser_hook2_test: RuntimeError
|
||||
isolate/browser/package_resolve_browser_hook_test: RuntimeError
|
||||
isolate/browser/package_resolve_browser_test: RuntimeError
|
||||
isolate/isolate_stress_test: RuntimeError
|
||||
js/null_test: RuntimeError
|
||||
js/prototype_access_test: RuntimeError
|
||||
|
||||
[ $compiler == dart2js && $runtime == d8 && $fasta && $minified ]
|
||||
collection/list_test: RuntimeError
|
||||
|
||||
[ $compiler == dart2js && $runtime != d8 ]
|
||||
isolate/error_at_spawn_test: Skip # Issue 23876
|
||||
isolate/error_exit_at_spawn_test: Skip # Issue 23876
|
||||
isolate/exit_at_spawn_test: Skip # Issue 23876
|
||||
isolate/message4_test: Skip # Issue 30247
|
||||
|
||||
[ $compiler == dart2js && $runtime != d8 && $runtime != jsshell ]
|
||||
html/fontface_loaded_test: RuntimeError
|
||||
html/html_mock_test: RuntimeError # Issue 31038
|
||||
|
@ -414,7 +381,6 @@ html/shadow_dom_test: Fail
|
|||
html/speechrecognition_test: RuntimeError # Please triage.
|
||||
html/text_event_test: Fail # Issue 17893
|
||||
html/webgl_1_test: Pass, Fail # Issue 8219
|
||||
isolate/kill_self_synchronously_test: RuntimeError
|
||||
|
||||
[ $compiler == dart2js && $runtime == ie11 ]
|
||||
html/element_types_content_test: RuntimeError # Issue 29922
|
||||
|
@ -481,8 +447,6 @@ async/zone_bind_test: Fail # Timer interface not supported: Issue 7728.
|
|||
async/zone_create_periodic_timer_test: RuntimeError # Timer interface not supported: Issue 7728.
|
||||
async/zone_create_timer2_test: RuntimeError # Timer interface not supported: Issue 7728.
|
||||
async/zone_empty_description2_test: RuntimeError # Timer interface not supported: Issue 7728.
|
||||
isolate/pause_test: Fail, OK # non-zero timer not supported.
|
||||
isolate/timer_isolate_test: Fail, OK # Needs Timer to run.
|
||||
|
||||
[ $compiler == dart2js && $runtime != jsshell ]
|
||||
async/timer_not_available_test: RuntimeError
|
||||
|
@ -501,8 +465,6 @@ html/file_sample_test: Skip # FileSystem not supported on Safari.
|
|||
html/fileapi_supported_throws_test: Skip # FileSystem not supported on Safari
|
||||
html/js_mock_test: RuntimeError # Issue 32286
|
||||
html/xhr_test: RuntimeError
|
||||
isolate/cross_isolate_message_test: Skip # Issue 12627
|
||||
isolate/message_test: Skip # Issue 12627
|
||||
|
||||
[ $compiler == dart2js && $system == linux ]
|
||||
html/interactive_geolocation_test: Skip # Requires allowing geo location.
|
||||
|
@ -516,16 +478,12 @@ html/fontface_loaded_test: Fail # Support for promises.
|
|||
html/js_typed_interop_lazy_test/01: RuntimeError
|
||||
html/notification_permission_test: Timeout, Pass # Issue 32002
|
||||
html/private_extension_member_test: RuntimeError
|
||||
isolate/isolate_stress_test: Pass, Slow # Issue 10697
|
||||
js/null_test: RuntimeError # Issue 30652
|
||||
|
||||
[ $compiler == dart2js && $browser && $csp ]
|
||||
html/custom/element_upgrade_test: Fail # Issue 17298
|
||||
html/custom/js_custom_test: Fail # Issue 14643
|
||||
|
||||
[ $compiler == dart2js && !$browser && $fast_startup ]
|
||||
isolate/isolate_current_test: Fail # please triage
|
||||
|
||||
[ $compiler == dart2js && $checked ]
|
||||
convert/utf85_test: Pass, Slow # Issue 12029.
|
||||
html/js_function_getter_trust_types_test: Skip # --trust-type-annotations incompatible with --checked
|
||||
|
@ -709,25 +667,6 @@ html/custom/js_custom_test: Fail # mirrors not supported
|
|||
html/custom/mirrors_2_test: Fail # mirrors not supported
|
||||
html/custom/mirrors_test: Fail # mirrors not supported
|
||||
html/mirrors_js_typed_interop_test: Fail # mirrors not supported
|
||||
isolate/browser/compute_this_script_browser_test: Fail # mirrors not supported
|
||||
isolate/browser/typed_data_message_test: Fail # mirrors not supported
|
||||
isolate/count_test: Fail # mirrors not supported
|
||||
isolate/cross_isolate_message_test: Fail # mirrors not supported
|
||||
isolate/illegal_msg_mirror_test: Fail # mirrors not supported
|
||||
isolate/mandel_isolate_test: Fail # mirrors not supported
|
||||
isolate/message2_test: Fail # mirrors not supported
|
||||
isolate/message_test: Fail # mirrors not supported
|
||||
isolate/mint_maker_test: Fail # mirrors not supported
|
||||
isolate/nested_spawn2_test: Fail # mirrors not supported
|
||||
isolate/nested_spawn_test: Fail # mirrors not supported
|
||||
isolate/raw_port_test: Fail # mirrors not supported
|
||||
isolate/remote_unittest_helper: Fail # mirrors not supported
|
||||
isolate/request_reply_test: Fail # mirrors not supported
|
||||
isolate/spawn_function_custom_class_test: Fail # mirrors not supported
|
||||
isolate/spawn_function_test: Fail # mirrors not supported
|
||||
isolate/stacktrace_message_test: Fail # mirrors not supported
|
||||
isolate/static_function_test: Fail # mirrors not supported
|
||||
isolate/unresolved_ports_test: Fail # mirrors not supported
|
||||
mirrors/regress_16321_test/01: Pass # expects failure, but if fails for the wrong reason
|
||||
|
||||
[ $compiler == dart2js && $fast_startup && $fasta ]
|
||||
|
@ -745,26 +684,6 @@ html/indexeddb_3_test: RuntimeError
|
|||
html/indexeddb_5_test: RuntimeError
|
||||
html/js_typed_interop_default_arg_test/explicit_argument: RuntimeError
|
||||
html/js_typed_interop_test: RuntimeError
|
||||
isolate/browser/compute_this_script_browser_test: RuntimeError # mirrors not supported
|
||||
isolate/browser/typed_data_message_test: RuntimeError # mirrors not supported
|
||||
isolate/compile_time_error_test/01: Crash
|
||||
isolate/count_test: RuntimeError # mirrors not supported
|
||||
isolate/cross_isolate_message_test: RuntimeError # mirrors not supported
|
||||
isolate/illegal_msg_mirror_test: RuntimeError # mirrors not supported
|
||||
isolate/mandel_isolate_test: RuntimeError # mirrors not supported
|
||||
isolate/message2_test: RuntimeError # mirrors not supported
|
||||
isolate/message_test: RuntimeError # mirrors not supported
|
||||
isolate/mint_maker_test: RuntimeError # mirrors not supported
|
||||
isolate/nested_spawn2_test: RuntimeError # mirrors not supported
|
||||
isolate/nested_spawn_test: RuntimeError # mirrors not supported
|
||||
isolate/raw_port_test: RuntimeError # mirrors not supported
|
||||
isolate/remote_unittest_helper: RuntimeError # mirrors not supported
|
||||
isolate/request_reply_test: RuntimeError # mirrors not supported
|
||||
isolate/spawn_function_custom_class_test: RuntimeError # mirrors not supported
|
||||
isolate/spawn_function_test: RuntimeError # mirrors not supported
|
||||
isolate/stacktrace_message_test: RuntimeError # mirrors not supported
|
||||
isolate/static_function_test: RuntimeError # mirrors not supported
|
||||
isolate/unresolved_ports_test: RuntimeError # mirrors not supported
|
||||
|
||||
[ $compiler == dart2js && $fasta && $host_checked ]
|
||||
async/stream_controller_async_test: Crash
|
||||
|
@ -780,8 +699,6 @@ html/js_function_getter_trust_types_test: CompileTimeError
|
|||
html/js_typed_interop_default_arg_test/explicit_argument: CompileTimeError
|
||||
html/js_typed_interop_side_cast_exp_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
|
||||
html/js_typed_interop_test: CompileTimeError
|
||||
isolate/deferred_in_isolate2_test: Crash
|
||||
isolate/mint_maker_test: Crash
|
||||
typed_data/typed_data_list_test: Crash
|
||||
typed_data/typed_list_iterable_test: Crash
|
||||
|
||||
|
@ -864,9 +781,6 @@ html/webgl_1_test: Crash # NoSuchMethodError: Class 'JMethod' has no instance ge
|
|||
[ $compiler == dart2js && !$fasta ]
|
||||
async/future_or_bad_type_test: MissingCompileTimeError
|
||||
|
||||
[ $compiler == dart2js && $jscl ]
|
||||
isolate/spawn_uri_test: SkipByDesign # Loading another file is not supported in JS shell
|
||||
|
||||
[ $compiler == dart2js && $minified ]
|
||||
html/canvas_pixel_array_type_alias_test/types2_runtimeTypeName: Fail, OK # Issue 12605
|
||||
|
||||
|
@ -875,11 +789,6 @@ async/slow_consumer2_test: SkipSlow # Times out. Issue 22050
|
|||
convert/streamed_conversion_json_utf8_decode_test: SkipSlow # Times out. Issue 22050
|
||||
convert/streamed_conversion_json_utf8_encode_test: SkipSlow # Times out. Issue 22050
|
||||
convert/streamed_conversion_utf8_decode_test: SkipSlow # Times out. Issue 22050
|
||||
isolate/kill_self_synchronously_test: RuntimeError
|
||||
|
||||
[ $compiler == dart2js && ($runtime == d8 || $runtime == jsshell) ]
|
||||
isolate/browser/issue_12474_test: RuntimeError # packageRoot not implemented.
|
||||
isolate/large_byte_data_leak_test: RuntimeError
|
||||
|
||||
[ $compiler == dart2js && ($runtime == ff || $runtime == safari || $ie) ]
|
||||
html/custom/attribute_changed_callback_test/unsupported_on_polyfill: Fail # Polyfill does not support
|
||||
|
|
Loading…
Reference in a new issue