Reviewers: Mikhail Naganov (Chromium),

Description:
Move the implementation of Scanner::LiteralScope to scanner.cc

It seems more appropriate as LiteralScope is declared in scanner.h

[email protected]

Signed-off-by: Thiago Farina <[email protected]>


Please review this at http://codereview.chromium.org/7864024/

SVN Base: git://github.com/v8/v8.git@bleeding_edge

Affected files:
  M src/scanner-character-streams.cc
  M src/scanner.cc


Index: src/scanner-character-streams.cc
diff --git a/src/scanner-character-streams.cc b/src/scanner-character-streams.cc index 2c1ccea69e9e6001da407d37f30456f2cfa1d9ab..ee10703c9ef82d20b835ea182f9b755d3295797f 100644
--- a/src/scanner-character-streams.cc
+++ b/src/scanner-character-streams.cc
@@ -29,7 +29,6 @@

 #include "scanner-character-streams.h"

-#include "ast.h"
 #include "handles.h"
 #include "unicode-inl.h"

@@ -305,24 +304,4 @@ ExternalTwoByteStringUC16CharacterStream
   pos_ = start_position;
 }

-
-// ----------------------------------------------------------------------------
-// Scanner::LiteralScope
-
-Scanner::LiteralScope::LiteralScope(Scanner* self)
-    : scanner_(self), complete_(false) {
-  self->StartLiteral();
-}
-
-
-Scanner::LiteralScope::~LiteralScope() {
-  if (!complete_) scanner_->DropLiteral();
-}
-
-
-void Scanner::LiteralScope::Complete() {
-  scanner_->TerminateLiteral();
-  complete_ = true;
-}
-
 } }  // namespace v8::internal
Index: src/scanner.cc
diff --git a/src/scanner.cc b/src/scanner.cc
index 3425f4159e571d4bdfa0eb83d3064ac244821a61..69ea8ae6e7c296affc62211a96b435a035c01479 100644
--- a/src/scanner.cc
+++ b/src/scanner.cc
@@ -36,6 +36,25 @@ namespace v8 {
 namespace internal {

// ----------------------------------------------------------------------------
+// Scanner::LiteralScope
+
+Scanner::LiteralScope::LiteralScope(Scanner* self)
+    : scanner_(self), complete_(false) {
+  self->StartLiteral();
+}
+
+
+Scanner::LiteralScope::~LiteralScope() {
+  if (!complete_) scanner_->DropLiteral();
+}
+
+
+void Scanner::LiteralScope::Complete() {
+  scanner_->TerminateLiteral();
+  complete_ = true;
+}
+
+// ----------------------------------------------------------------------------
 // Scanner

 Scanner::Scanner(UnicodeCache* unicode_cache)


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to