Revision: 17533
Author: [email protected]
Date: Wed Nov 6 18:19:26 2013 UTC
Log: Revert "Landing https://codereview.chromium.org/40133004 for
[email protected]." due to test failures.
[email protected]
Review URL: https://chromiumcodereview.appspot.com/62563002
http://code.google.com/p/v8/source/detail?r=17533
Deleted:
/branches/bleeding_edge/test/intl/string
Modified:
/branches/bleeding_edge/src/i18n.js
/branches/bleeding_edge/src/runtime.cc
/branches/bleeding_edge/src/runtime.h
=======================================
--- /branches/bleeding_edge/src/i18n.js Wed Nov 6 17:27:31 2013 UTC
+++ /branches/bleeding_edge/src/i18n.js Wed Nov 6 18:19:26 2013 UTC
@@ -45,11 +45,6 @@
'dateformat',
'breakiterator'];
-var NORMALIZATION_FORMS = ['NFC',
- 'NFD',
- 'NFKC',
- 'NFKD'];
-
/**
* Caches available locales for each service.
*/
@@ -1993,40 +1988,6 @@
%FunctionRemovePrototype($String.prototype.localeCompare);
%SetNativeFlag($String.prototype.localeCompare);
-/**
- * Unicode normalization. This method is called with one argument that
- * specifies the normalization form.
- * If none is specified, "NFC" is assumed.
- * If the form is not one of "NFC", "NFD", "NFKC", or "NFKD", then throw
- * a RangeError Exception.
- */
-$Object.defineProperty($String.prototype, 'normalize', {
- value: function(that) {
- if (%_IsConstructCall()) {
- throw new $TypeError(ORDINARY_FUNCTION_CALLED_AS_CONSTRUCTOR);
- }
-
- if (IS_NULL_OR_UNDEFINED(this)) {
- throw new $TypeError('Method invoked on undefined or null value.');
- }
-
- var form = $String(%_Arguments(0) || 'NFC');
-
- var normalizationForm = NORMALIZATION_FORMS.indexOf(form);
- if (normalizationForm !== -1) {
- return %StringNormalize(this, normalizationForm);
- }
- throw new $RangeError('The normalization form should be one of '
- + NORMALIZATION_FORMS.join(', ') + '.');
- },
- writable: true,
- configurable: true,
- enumerable: false
-});
-%FunctionSetName($String.prototype.normalize, 'normalize');
-%FunctionRemovePrototype($String.prototype.normalize);
-%SetNativeFlag($String.prototype.normalize);
-
/**
* Formats a Number object (this) using locale and options values.
=======================================
--- /branches/bleeding_edge/src/runtime.cc Wed Nov 6 17:27:31 2013 UTC
+++ /branches/bleeding_edge/src/runtime.cc Wed Nov 6 18:19:26 2013 UTC
@@ -14031,35 +14031,6 @@
return *isolate->factory()->NewNumberFromInt(result);
}
-
-
-RUNTIME_FUNCTION(MaybeObject*, Runtime_StringNormalize) {
- HandleScope scope(isolate);
- static const UNormalizationMode normalizationForms[] =
- { UNORM_NFC, UNORM_NFD, UNORM_NFKC, UNORM_NFKD };
-
- ASSERT(args.length() == 2);
-
- CONVERT_ARG_HANDLE_CHECKED(String, stringValue, 0);
- CONVERT_NUMBER_CHECKED(int, form_id, Int32, args[1]);
-
- v8::String::Value string_value(v8::Utils::ToLocal(stringValue));
- const UChar* u_value = reinterpret_cast<const UChar*>(*string_value);
-
- // TODO(mnita): check Normalizer2 (not available in ICU 46)
- UErrorCode status = U_ZERO_ERROR;
- icu::UnicodeString result;
- icu::Normalizer::normalize(u_value, normalizationForms[form_id], 0,
- result, status);
- if (U_FAILURE(status)) {
- return isolate->heap()->undefined_value();
- }
-
- return *isolate->factory()->NewStringFromTwoByte(
- Vector<const uint16_t>(
- reinterpret_cast<const uint16_t*>(result.getBuffer()),
- result.length()));
-}
RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateBreakIterator) {
=======================================
--- /branches/bleeding_edge/src/runtime.h Wed Nov 6 17:27:31 2013 UTC
+++ /branches/bleeding_edge/src/runtime.h Wed Nov 6 18:19:26 2013 UTC
@@ -564,9 +564,6 @@
F(CreateCollator, 3, 1) \
F(InternalCompare, 3, 1) \
\
- /* String.prototype.normalize. */ \
- F(StringNormalize, 2, 1) \
- \
/* Break iterator. */ \
F(CreateBreakIterator, 3, 1) \
F(BreakIteratorAdoptText, 2, 1) \
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.