[vm] Remove unused Integer_parse native
The Integer_parse VM native has no Dart-side caller. int.parse is implemented entirely in Dart in sdk/lib/_internal/vm_shared/lib/integers_patch.dart (_tryParseSmi and _parseRadix). Removes the native entry and drops a stale reference in the comment on the shared ParseInteger helper, which is still used by Integer_fromEnvironment. TEST=ci Change-Id: I8d034e3081c09357094abc6415fc709e3edbea07 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507322 Reviewed-by: Martin Kustermann <kustermann@google.com> Auto-Submit: Modestas Valauskas <valauskasmodestas@gmail.com> Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Slava Egorov <vegorov@google.com>
This commit is contained in:
committed by
dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
02046380d1
commit
062123bcf5
@@ -160,7 +160,7 @@ DEFINE_NATIVE_ENTRY(Integer_equalToInteger, 0, 2) {
|
||||
}
|
||||
|
||||
static IntegerPtr ParseInteger(const String& value) {
|
||||
// Used by both Integer_parse and Integer_fromEnvironment.
|
||||
// Used by Integer_fromEnvironment.
|
||||
if (value.IsOneByteString()) {
|
||||
// Quick conversion for unpadded integers in strings.
|
||||
const intptr_t len = value.Length();
|
||||
@@ -180,11 +180,6 @@ static IntegerPtr ParseInteger(const String& value) {
|
||||
return Integer::New(value);
|
||||
}
|
||||
|
||||
DEFINE_NATIVE_ENTRY(Integer_parse, 0, 1) {
|
||||
GET_NON_NULL_NATIVE_ARGUMENT(String, value, arguments->NativeArgAt(0));
|
||||
return ParseInteger(value);
|
||||
}
|
||||
|
||||
DEFINE_NATIVE_ENTRY(Integer_fromEnvironment, 0, 2) {
|
||||
GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(0));
|
||||
GET_NATIVE_ARGUMENT(Integer, default_value, arguments->NativeArgAt(1));
|
||||
|
||||
@@ -46,7 +46,6 @@ namespace dart {
|
||||
V(Integer_greaterThanFromInteger, 2) \
|
||||
V(Integer_equalToInteger, 2) \
|
||||
V(Integer_fromEnvironment, 2) \
|
||||
V(Integer_parse, 1) \
|
||||
V(Integer_shlFromInteger, 2) \
|
||||
V(Integer_shrFromInteger, 2) \
|
||||
V(Integer_ushrFromInteger, 2) \
|
||||
|
||||
Reference in New Issue
Block a user