Test CFE constants in side-effects test
Change-Id: I720a4e1b574a19aebb93dfab17a372f987f2cb71 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99153 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
6839e0d9f8
commit
b614253cdb
@@ -36,6 +36,15 @@ class Stringifier extends ir.ExpressionVisitor<String> {
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@override
|
||||
String visitConstantExpression(ir.ConstantExpression node) {
|
||||
ir.Constant constant = node.constant;
|
||||
if (constant is ir.StringConstant) {
|
||||
return constant.value;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// Visitor that converts a kernel constant expression into a
|
||||
|
||||
@@ -29,12 +29,20 @@ jsBuiltin_rawRtiToJsConstructorName() {
|
||||
return JS_BUILTIN('String', JsBuiltin.rawRtiToJsConstructorName, null);
|
||||
}
|
||||
|
||||
/*member: jsEmbeddedGlobal_getTypeFromName:SideEffects(reads static; writes nothing)*/
|
||||
/*strong.member: jsEmbeddedGlobal_getTypeFromName:SideEffects(reads static; writes nothing)*/
|
||||
/*omit.member: jsEmbeddedGlobal_getTypeFromName:SideEffects(reads static; writes nothing)*/
|
||||
// With CFE constant we no longer get the noise from the static get if GET_TYPE_FROM_NAME.
|
||||
/*strongConst.member: jsEmbeddedGlobal_getTypeFromName:SideEffects(reads nothing; writes nothing)*/
|
||||
/*omitConst.member: jsEmbeddedGlobal_getTypeFromName:SideEffects(reads nothing; writes nothing)*/
|
||||
jsEmbeddedGlobal_getTypeFromName() {
|
||||
return JS_EMBEDDED_GLOBAL('', GET_TYPE_FROM_NAME);
|
||||
}
|
||||
|
||||
/*member: jsEmbeddedGlobal_libraries:SideEffects(reads static; writes nothing)*/
|
||||
/*strong.member: jsEmbeddedGlobal_libraries:SideEffects(reads static; writes nothing)*/
|
||||
/*omit.member: jsEmbeddedGlobal_libraries:SideEffects(reads static; writes nothing)*/
|
||||
// With CFE constant we no longer get the noise from the static get if LIBRARIES.
|
||||
/*strongConst.member: jsEmbeddedGlobal_libraries:SideEffects(reads nothing; writes nothing)*/
|
||||
/*omitConst.member: jsEmbeddedGlobal_libraries:SideEffects(reads nothing; writes nothing)*/
|
||||
jsEmbeddedGlobal_libraries() {
|
||||
return JS_EMBEDDED_GLOBAL('JSExtendableArray|Null', LIBRARIES);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,9 @@ main(List<String> args) {
|
||||
Directory dataDir =
|
||||
new Directory.fromUri(Platform.script.resolve('side_effects'));
|
||||
await checkTests(dataDir, const SideEffectsDataComputer(),
|
||||
args: args, options: [stopAfterTypeInference]);
|
||||
args: args,
|
||||
options: [stopAfterTypeInference],
|
||||
testedConfigs: allInternalConfigs);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user