intl: Add `@pragma` for inlining for the VM, same as for dart2js.
PiperOrigin-RevId: 327396904
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 56e3dae..5f7a702 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 0.17.0+1
+ * Add `@pragma('vm:prefer-inline')` to `Intl` methods that already have
+ `@pragma('dart2js:tryInline')`, for the same reason: to help omit message
+ descriptions from compiled output.
+
## 0.17.0
* **Breaking Change** [#123][]: Fix parsing of two-digit years to match the
documented behavior. Previously a two-digit year would be parsed to a value
diff --git a/lib/intl.dart b/lib/intl.dart
index 98f3899..cf22be2 100644
--- a/lib/intl.dart
+++ b/lib/intl.dart
@@ -174,9 +174,10 @@
/// messages during development whose text aren't finalized yet without having
/// the placeholder automatically translated.
@pragma('dart2js:tryInline')
- // We want dart2js to try to inline these messages, but not inline the
- // internal messages, so it will eliminate the descriptions and other
- // information not needed at runtime.
+ @pragma('vm:prefer-inline')
+ // We want to try to inline these messages, but not inline the internal
+ // messages, so it will eliminate the descriptions and other information
+ // not needed at runtime.
static String message(String messageText,
{String desc = '',
Map<String, Object> examples,
@@ -286,6 +287,7 @@
/// For an explanation of plurals and the [zero], [one], [two], [few], [many]
/// categories see http://cldr.unicode.org/index/cldr-spec/plural-rules
@pragma('dart2js:tryInline')
+ @pragma('vm:prefer-inline')
static String plural(num howMany,
{String zero,
String one,
@@ -432,6 +434,7 @@
/// Format a message differently depending on [targetGender].
@pragma('dart2js:tryInline')
+ @pragma('vm:prefer-inline')
static String gender(String targetGender,
{String female,
String male,
@@ -508,6 +511,7 @@
///
/// The first argument in [args] must correspond to the [choice] Object.
@pragma('dart2js:tryInline')
+ @pragma('vm:prefer-inline')
static String select(Object choice, Map<Object, String> cases,
{String desc,
Map<String, Object> examples,