Enable Latin-1

R=yangguo@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/12039038
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13682 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2013-02-18 10:27:46 +00:00
parent da3e335280
commit 072bad2ed5
3 changed files with 4 additions and 3 deletions

View File

@ -73,7 +73,7 @@
# Default arch variant for MIPS.
'mips_arch_variant%': 'mips32r2',
'v8_enable_latin_1%': 0,
'v8_enable_latin_1%': 1,
'v8_enable_debugger_support%': 1,

View File

@ -40,6 +40,8 @@
// TODO(svenpanne) Remove me when the Chrome bindings are adapted.
#define V8_DISABLE_DEPRECATIONS 1
// TODO(dcarney): Remove once Latin-1 transitions in WebKit has stuck.
#define V8_ONE_BYTE_STRINGS_ENABLED 1
#include "v8stdint.h"

View File

@ -836,8 +836,7 @@ function StringFromCharCode(code) {
var code = %_Arguments(i);
if (!%_IsSmi(code)) code = ToNumber(code) & 0xffff;
if (code < 0) code = code & 0xffff;
// TODO(dcarney): Fix for Latin-1.
if (code > 0x7f) break;
if (code > 0xff) break;
%_OneByteSeqStringSetChar(one_byte, i, code);
}
if (i == n) return one_byte;