Commit f21ea065 authored by verwaest's avatar verwaest Committed by Commit bot

Fix smi scanning

BUG=chromium:483176
LOG=n

Review URL: https://codereview.chromium.org/1114073003

Cr-Commit-Position: refs/heads/master@{#28202}
parent 2cdd74b3
......@@ -1006,7 +1006,7 @@ Token::Value Scanner::ScanNumber(bool seen_period) {
if (next_.literal_chars->one_byte_literal().length() <= 10 &&
value <= Smi::kMaxValue && c0_ != '.' && c0_ != 'e' && c0_ != 'E') {
smi_value_ = static_cast<int>(value);
next_.smi_value_ = static_cast<int>(value);
literal.Complete();
HandleLeadSurrogate();
......
......@@ -436,7 +436,7 @@ class Scanner {
void clear_octal_position() { octal_pos_ = Location::invalid(); }
// Returns the value of the last smi that was scanned.
int smi_value() const { return smi_value_; }
int smi_value() const { return current_.smi_value_; }
// Seek forward to the given position. This operation does not
// work in general, for instance when there are pushed back
......@@ -491,6 +491,7 @@ class Scanner {
Location location;
LiteralBuffer* literal_chars;
LiteralBuffer* raw_literal_chars;
int smi_value_;
};
static const int kCharacterLookaheadBufferSize = 1;
......@@ -718,9 +719,6 @@ class Scanner {
// Start position of the octal literal last scanned.
Location octal_pos_;
// Value of the last smi that was scanned.
int smi_value_;
// One Unicode character look-ahead; c0_ < 0 at the end of the input.
uc32 c0_;
......
// Copyright 2015 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.
x = 2
3;
assertEquals(2, x);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment