Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: src/interpreter-irregexp.cc

Issue 484643002: Version 3.28.71.3 (merged r23081) (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.28
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/libplatform/worker-thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // A simple interpreter for the Irregexp byte code. 5 // A simple interpreter for the Irregexp byte code.
6 6
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/ast.h" 10 #include "src/ast.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 return *reinterpret_cast<const uint16_t *>(pc); 129 return *reinterpret_cast<const uint16_t *>(pc);
130 } 130 }
131 131
132 132
133 // A simple abstraction over the backtracking stack used by the interpreter. 133 // A simple abstraction over the backtracking stack used by the interpreter.
134 // This backtracking stack does not grow automatically, but it ensures that the 134 // This backtracking stack does not grow automatically, but it ensures that the
135 // the memory held by the stack is released or remembered in a cache if the 135 // the memory held by the stack is released or remembered in a cache if the
136 // matching terminates. 136 // matching terminates.
137 class BacktrackStack { 137 class BacktrackStack {
138 public: 138 public:
139 explicit BacktrackStack() { 139 BacktrackStack() { data_ = NewArray<int>(kBacktrackStackSize); }
140 data_ = NewArray<int>(kBacktrackStackSize);
141 }
142 140
143 ~BacktrackStack() { 141 ~BacktrackStack() {
144 DeleteArray(data_); 142 DeleteArray(data_);
145 } 143 }
146 144
147 int* data() const { return data_; } 145 int* data() const { return data_; }
148 146
149 int max_size() const { return kBacktrackStackSize; } 147 int max_size() const { return kBacktrackStackSize; }
150 148
151 private: 149 private:
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 return RawMatch(isolate, 600 return RawMatch(isolate,
603 code_base, 601 code_base,
604 subject_vector, 602 subject_vector,
605 registers, 603 registers,
606 start_position, 604 start_position,
607 previous_char); 605 previous_char);
608 } 606 }
609 } 607 }
610 608
611 } } // namespace v8::internal 609 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/libplatform/worker-thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698