Ensure consistent error handling on 32b/64b platforms.

BUG=chromium:669017

Review-Url: https://codereview.chromium.org/2536783003
Cr-Commit-Position: refs/heads/master@{#41364}
This commit is contained in:
vogelheim 2016-11-29 07:05:43 -08:00 committed by Commit bot
parent 8fcfe66f94
commit c44008b01f
3 changed files with 15 additions and 1 deletions

View File

@ -1152,7 +1152,8 @@ Token::Value Scanner::ScanNumber(bool seen_period) {
}
if (next_.literal_chars->one_byte_literal().length() <= 10 &&
value <= Smi::kMaxValue && c0_ != '.' && c0_ != 'e' && c0_ != 'E') {
value <= Smi::kMaxValue && c0_ != '.' &&
(c0_ == kEndOfInput || !unicode_cache_->IsIdentifierStart(c0_))) {
next_.smi_value_ = static_cast<uint32_t>(value);
literal.Complete();
HandleLeadSurrogate();

View File

@ -0,0 +1,5 @@
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
1073741824O0

View File

@ -0,0 +1,8 @@
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
*%(basename)s:5: SyntaxError: Invalid or unexpected token
1073741824O0
^^^^^^^^^^
SyntaxError: Invalid or unexpected token