Index: src/runtime/runtime-i18n.cc |
diff --git a/src/runtime/runtime-i18n.cc b/src/runtime/runtime-i18n.cc |
index 5ea524840e3699d6e0d939f41d5c750ee3c1967f..afa9cc849fe78b8678d022b5c62fde4434ea437b 100644 |
--- a/src/runtime/runtime-i18n.cc |
+++ b/src/runtime/runtime-i18n.cc |
@@ -530,30 +530,6 @@ RUNTIME_FUNCTION(Runtime_InternalDateFormatToParts) { |
return *result; |
} |
-RUNTIME_FUNCTION(Runtime_InternalDateParse) { |
- HandleScope scope(isolate); |
- |
- DCHECK(args.length() == 2); |
- |
- CONVERT_ARG_HANDLE_CHECKED(JSObject, date_format_holder, 0); |
- CONVERT_ARG_HANDLE_CHECKED(String, date_string, 1); |
- |
- v8::String::Utf8Value utf8_date(v8::Utils::ToLocal(date_string)); |
- icu::UnicodeString u_date(icu::UnicodeString::fromUTF8(*utf8_date)); |
- icu::SimpleDateFormat* date_format = |
- DateFormat::UnpackDateFormat(isolate, date_format_holder); |
- if (!date_format) return isolate->ThrowIllegalOperation(); |
- |
- UErrorCode status = U_ZERO_ERROR; |
- UDate date = date_format->parse(u_date, status); |
- if (U_FAILURE(status)) return isolate->heap()->undefined_value(); |
- |
- RETURN_RESULT_OR_FAILURE( |
- isolate, JSDate::New(isolate->date_function(), isolate->date_function(), |
- static_cast<double>(date))); |
-} |
- |
- |
RUNTIME_FUNCTION(Runtime_CreateNumberFormat) { |
HandleScope scope(isolate); |
@@ -618,47 +594,6 @@ RUNTIME_FUNCTION(Runtime_InternalNumberFormat) { |
} |
-RUNTIME_FUNCTION(Runtime_InternalNumberParse) { |
- HandleScope scope(isolate); |
- |
- DCHECK(args.length() == 2); |
- |
- CONVERT_ARG_HANDLE_CHECKED(JSObject, number_format_holder, 0); |
- CONVERT_ARG_HANDLE_CHECKED(String, number_string, 1); |
- |
- isolate->CountUsage(v8::Isolate::UseCounterFeature::kIntlV8Parse); |
- |
- v8::String::Utf8Value utf8_number(v8::Utils::ToLocal(number_string)); |
- icu::UnicodeString u_number(icu::UnicodeString::fromUTF8(*utf8_number)); |
- icu::DecimalFormat* number_format = |
- NumberFormat::UnpackNumberFormat(isolate, number_format_holder); |
- if (!number_format) return isolate->ThrowIllegalOperation(); |
- |
- UErrorCode status = U_ZERO_ERROR; |
- icu::Formattable result; |
- // ICU 4.6 doesn't support parseCurrency call. We need to wait for ICU49 |
- // to be part of Chrome. |
- // TODO(cira): Include currency parsing code using parseCurrency call. |
- // We need to check if the formatter parses all currencies or only the |
- // one it was constructed with (it will impact the API - how to return ISO |
- // code and the value). |
- number_format->parse(u_number, result, status); |
- if (U_FAILURE(status)) return isolate->heap()->undefined_value(); |
- |
- switch (result.getType()) { |
- case icu::Formattable::kDouble: |
- return *isolate->factory()->NewNumber(result.getDouble()); |
- case icu::Formattable::kLong: |
- return *isolate->factory()->NewNumberFromInt(result.getLong()); |
- case icu::Formattable::kInt64: |
- return *isolate->factory()->NewNumber( |
- static_cast<double>(result.getInt64())); |
- default: |
- return isolate->heap()->undefined_value(); |
- } |
-} |
- |
- |
RUNTIME_FUNCTION(Runtime_CreateCollator) { |
HandleScope scope(isolate); |