Reviewers: marja,

Message:
Committed patchset #1 manually as r19660 (tree was closed).

Description:
Experimental parser: cleanup after bleeding_edge merge

[email protected]

BUG=

Committed: https://code.google.com/p/v8/source/detail?r=19660

Please review this at https://codereview.chromium.org/183853025/

SVN Base: https://v8.googlecode.com/svn/branches/experimental/parser

Affected files (+10, -9 lines):
  M src/isolate.cc
  M src/lexer/lexer-shell.cc
  M src/lexer/lexer.cc
  M src/scanner.cc


Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 4b1131a842f27e0f9d1103edbf00352a0ddbe9e4..d814b4dbf85d057d5f7cabeb4985a1a0b6932f70 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -2326,6 +2326,7 @@ Object* Isolate::FindCodeObject(Address a) {
   return inner_pointer_to_code_cache()->GcSafeFindCodeForInnerPointer(a);
 }

+
 #ifdef DEBUG
 #define ISOLATE_FIELD_OFFSET(type, name, ignored)                       \
 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
Index: src/lexer/lexer-shell.cc
diff --git a/src/lexer/lexer-shell.cc b/src/lexer/lexer-shell.cc
index 60c89500fa6b44b6e809e3c6d88e07044f640093..ae371b8f278bd8d8e4c67b6bfc1278cb9ce41be3 100644
--- a/src/lexer/lexer-shell.cc
+++ b/src/lexer/lexer-shell.cc
@@ -44,6 +44,7 @@
 #include "scopeinfo.h"
 #include "string-stream.h"
 #include "scanner.h"
+#include "lexer/lexer.h"

 using namespace v8::internal;

Index: src/lexer/lexer.cc
diff --git a/src/lexer/lexer.cc b/src/lexer/lexer.cc
index fd1b70dde3d2bfebf1225b461e93dab9aaabebe9..9171ab14fed9bb9d94da7f1a3abc521e789ab70c 100644
--- a/src/lexer/lexer.cc
+++ b/src/lexer/lexer.cc
@@ -172,9 +172,7 @@ Lexer<Char>::Lexer(UnicodeCache* unicode_cache,
                    int end_position)
     : LexerBase(unicode_cache),
       isolate_(source->GetIsolate()),
-      // TODO(dcarney): don't need to allocate here, used stored positions
-      source_handle_(isolate_->factory()->NewSubString(
-          source, start_position, end_position)),
+      source_handle_(FlattenGetString(source)),
       source_ptr_(NULL),
       start_position_(start_position),
       end_position_(end_position),
@@ -183,14 +181,15 @@ Lexer<Char>::Lexer(UnicodeCache* unicode_cache,
       start_(NULL),
       cursor_(NULL),
       last_octal_end_(NULL) {
-  ASSERT(source->IsFlat());
-  fprintf(stderr, "%s %d %d %d %d %d\n",
-    __func__, start_position_, end_position_,
-    source->length(), source_handle_->length(),
-    source->IsOneByteRepresentation());
   UpdateBufferBasedOnHandle();
   current_.beg_pos = current_.end_pos = next_.beg_pos = next_.end_pos = 0;
   isolate_->lexer_gc_handler()->AddLexer(this);
+  // TODO(dcarney): move this to UpdateBufferBasedOnHandle
+  cursor_ = buffer_ + start_position;
+  buffer_end_ = buffer_ + end_position;
+  start_ = cursor_;
+  has_line_terminator_before_next_ = false;
+  has_multiline_comment_before_next_ = false;
 }


Index: src/scanner.cc
diff --git a/src/scanner.cc b/src/scanner.cc
index 8de014fedd686b647377f261d09138e74c34b239..137570d77d0bf934293cefadde2c145ea0e2b515 100644
--- a/src/scanner.cc
+++ b/src/scanner.cc
@@ -35,7 +35,7 @@
 #include "char-predicates-inl.h"
 #include "conversions-inl.h"
 #include "list-inl.h"
-#include "v8.h"
+#include "lexer/lexer.h"

 namespace v8 {
 namespace internal {


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to