Reviewers: Lasse Reichstein,
Description:
Remove unused variable from Scanner class.
BUG=None
TEST=compiles
Patch from Thiago Farina <[email protected]>
Please review this at http://codereview.chromium.org/3413015/show
SVN Base: git://github.com/v8/v8.git
Affected files:
M src/parser.cc
M src/scanner.h
M src/scanner.cc
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index
d41eb81ac6b01bb0123838443e9c451c20cd0e77..6b6d30c37d82dc3471230b755dfdc135a92f28ad
100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -1439,7 +1439,7 @@ Parser::Parser(Handle<Script> script,
ParserLog* log,
ScriptDataImpl* pre_data)
: script_(script),
- scanner_(is_pre_parsing),
+ scanner_(),
top_scope_(NULL),
with_nesting_level_(0),
temp_scope_(NULL),
Index: src/scanner.cc
diff --git a/src/scanner.cc b/src/scanner.cc
index
15b1d44203e5c897c7b33591f8dd9f6576464a07..79d63f1774dceaceceec1eccb19aebb218bb3a34
100755
--- a/src/scanner.cc
+++ b/src/scanner.cc
@@ -1,4 +1,4 @@
-// Copyright 2006-2008 the V8 project authors. All rights reserved.
+// Copyright 2010 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -342,8 +342,11 @@ void Scanner::LiteralScope::Complete() {
//
----------------------------------------------------------------------------
// Scanner
-Scanner::Scanner(ParserMode pre)
- : is_pre_parsing_(pre == PREPARSE), stack_overflow_(false) { }
+Scanner::Scanner()
+ : has_line_terminator_before_next_(false),
+ is_parsing_json_(false),
+ source_(NULL),
+ stack_overflow_(false) {}
void Scanner::Initialize(Handle<String> source,
Index: src/scanner.h
diff --git a/src/scanner.h b/src/scanner.h
index
8d6184697fa58aed313d22aad77dacf1efb6667a..56760c3743f71803616d468095efd4ba3fabf6e7
100644
--- a/src/scanner.h
+++ b/src/scanner.h
@@ -1,4 +1,4 @@
-// Copyright 2006-2008 the V8 project authors. All rights reserved.
+// Copyright 2010 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -281,8 +281,7 @@ class Scanner {
bool complete_;
};
- // Construction
- explicit Scanner(ParserMode parse_mode);
+ Scanner();
// Initialize the Scanner to scan source.
void Initialize(Handle<String> source,
@@ -488,7 +487,6 @@ class Scanner {
TokenDesc current_; // desc for current token (as returned by Next())
TokenDesc next_; // desc for next token (one token look-ahead)
bool has_line_terminator_before_next_;
- bool is_pre_parsing_;
bool is_parsing_json_;
// Different UTF16 buffers used to pull characters from. Based on input
one of
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev