diff options
author | Fedor Indutny <fedor.indutny@gmail.com> | 2014-03-18 00:33:01 +0400 |
---|---|---|
committer | Fedor Indutny <fedor.indutny@gmail.com> | 2014-03-18 00:33:01 +0400 |
commit | 4d140746f0978da2a6493b92d3b6de4b18f3394d (patch) | |
tree | 69d76bb397ca1dde203a5d7535ecc33c58c85f25 /deps/v8/src/unicode.cc | |
parent | ee4b9b552dee37ed5844da6c261e4d28a33d3c13 (diff) | |
download | android-node-v8-4d140746f0978da2a6493b92d3b6de4b18f3394d.tar.gz android-node-v8-4d140746f0978da2a6493b92d3b6de4b18f3394d.tar.bz2 android-node-v8-4d140746f0978da2a6493b92d3b6de4b18f3394d.zip |
deps: update v8 to 3.24.35.17
Diffstat (limited to 'deps/v8/src/unicode.cc')
-rw-r--r-- | deps/v8/src/unicode.cc | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/deps/v8/src/unicode.cc b/deps/v8/src/unicode.cc index 2bef7ab20b..bd32467786 100644 --- a/deps/v8/src/unicode.cc +++ b/deps/v8/src/unicode.cc @@ -25,7 +25,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// This file was generated at 2014-02-07 15:31:16.733174 +// This file was generated at 2012-03-06 09:55:58.934483 #include "unicode-inl.h" #include <stdlib.h> @@ -710,6 +710,28 @@ bool Letter::Is(uchar c) { } +// Space: point.category == 'Zs' + +static const uint16_t kSpaceTable0Size = 4; +static const int32_t kSpaceTable0[4] = { + 32, 160, 5760, 6158 }; // NOLINT +static const uint16_t kSpaceTable1Size = 5; +static const int32_t kSpaceTable1[5] = { + 1073741824, 10, 47, 95, 4096 }; // NOLINT +bool Space::Is(uchar c) { + int chunk_index = c >> 13; + switch (chunk_index) { + case 0: return LookupPredicate(kSpaceTable0, + kSpaceTable0Size, + c); + case 1: return LookupPredicate(kSpaceTable1, + kSpaceTable1Size, + c); + default: return false; + } +} + + // Number: point.category == 'Nd' static const uint16_t kNumberTable0Size = 56; @@ -745,14 +767,14 @@ bool Number::Is(uchar c) { } -// WhiteSpace: point.category == 'Zs' +// WhiteSpace: 'Ws' in point.properties -static const uint16_t kWhiteSpaceTable0Size = 4; -static const int32_t kWhiteSpaceTable0[4] = { - 32, 160, 5760, 6158 }; // NOLINT -static const uint16_t kWhiteSpaceTable1Size = 5; -static const int32_t kWhiteSpaceTable1[5] = { - 1073741824, 10, 47, 95, 4096 }; // NOLINT +static const uint16_t kWhiteSpaceTable0Size = 7; +static const int32_t kWhiteSpaceTable0[7] = { + 1073741833, 13, 32, 133, 160, 5760, 6158 }; // NOLINT +static const uint16_t kWhiteSpaceTable1Size = 7; +static const int32_t kWhiteSpaceTable1[7] = { + 1073741824, 10, 1073741864, 41, 47, 95, 4096 }; // NOLINT bool WhiteSpace::Is(uchar c) { int chunk_index = c >> 13; switch (chunk_index) { @@ -1811,6 +1833,8 @@ int UnicodeData::GetByteCount() { + kLetterTable5Size * sizeof(int32_t) // NOLINT + kLetterTable6Size * sizeof(int32_t) // NOLINT + kLetterTable7Size * sizeof(int32_t) // NOLINT + + kSpaceTable0Size * sizeof(int32_t) // NOLINT + + kSpaceTable1Size * sizeof(int32_t) // NOLINT + kNumberTable0Size * sizeof(int32_t) // NOLINT + kNumberTable5Size * sizeof(int32_t) // NOLINT + kNumberTable7Size * sizeof(int32_t) // NOLINT |