Revision: 19660
Author:   [email protected]
Date:     Tue Mar  4 15:50:47 2014 UTC
Log:      Experimental parser: cleanup after bleeding_edge merge

[email protected]

BUG=

Review URL: https://codereview.chromium.org/183853025
http://code.google.com/p/v8/source/detail?r=19660

Modified:
 /branches/experimental/parser/src/isolate.cc
 /branches/experimental/parser/src/lexer/lexer-shell.cc
 /branches/experimental/parser/src/lexer/lexer.cc
 /branches/experimental/parser/src/scanner.cc

=======================================
--- /branches/experimental/parser/src/isolate.cc Tue Mar 4 14:45:34 2014 UTC +++ /branches/experimental/parser/src/isolate.cc Tue Mar 4 15:50:47 2014 UTC
@@ -2325,6 +2325,7 @@
 Object* Isolate::FindCodeObject(Address a) {
   return inner_pointer_to_code_cache()->GcSafeFindCodeForInnerPointer(a);
 }
+

 #ifdef DEBUG
 #define ISOLATE_FIELD_OFFSET(type, name, ignored)                       \
=======================================
--- /branches/experimental/parser/src/lexer/lexer-shell.cc Tue Mar 4 14:45:34 2014 UTC +++ /branches/experimental/parser/src/lexer/lexer-shell.cc Tue Mar 4 15:50:47 2014 UTC
@@ -44,6 +44,7 @@
 #include "scopeinfo.h"
 #include "string-stream.h"
 #include "scanner.h"
+#include "lexer/lexer.h"

 using namespace v8::internal;

=======================================
--- /branches/experimental/parser/src/lexer/lexer.cc Tue Mar 4 14:45:34 2014 UTC +++ /branches/experimental/parser/src/lexer/lexer.cc Tue Mar 4 15:50:47 2014 UTC
@@ -172,9 +172,7 @@
                    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 @@
       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;
 }


=======================================
--- /branches/experimental/parser/src/scanner.cc Tue Mar 4 14:45:34 2014 UTC +++ /branches/experimental/parser/src/scanner.cc Tue Mar 4 15:50:47 2014 UTC
@@ -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