Reviewers: Sven Panne,

Description:
Remove unused irregexp cache.

[email protected]

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

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+2, -17 lines):
  M src/interpreter-irregexp.cc
  M src/isolate.h


Index: src/interpreter-irregexp.cc
diff --git a/src/interpreter-irregexp.cc b/src/interpreter-irregexp.cc
index 2fc9fd302574357aa21dc9cbd8281fe9bd16ff09..ccabfd10dfdacbbe1f1b78e184b9b03b9b7e6a61 100644
--- a/src/interpreter-irregexp.cc
+++ b/src/interpreter-irregexp.cc
@@ -159,24 +159,11 @@ static int32_t Load16Aligned(const byte* pc) {
 class BacktrackStack {
  public:
   explicit BacktrackStack(Isolate* isolate) : isolate_(isolate) {
-    if (isolate->irregexp_interpreter_backtrack_stack_cache() != NULL) {
-      // If the cache is not empty reuse the previously allocated stack.
-      data_ = isolate->irregexp_interpreter_backtrack_stack_cache();
-      isolate->set_irregexp_interpreter_backtrack_stack_cache(NULL);
-    } else {
-      // Cache was empty. Allocate a new backtrack stack.
-      data_ = NewArray<int>(kBacktrackStackSize);
-    }
+    data_ = NewArray<int>(kBacktrackStackSize);
   }

   ~BacktrackStack() {
-    if (isolate_->irregexp_interpreter_backtrack_stack_cache() == NULL) {
-      // The cache is empty. Keep this backtrack stack around.
-      isolate_->set_irregexp_interpreter_backtrack_stack_cache(data_);
-    } else {
-      // A backtrack stack was already cached, just release this one.
-      DeleteArray(data_);
-    }
+    DeleteArray(data_);
   }

   int* data() const { return data_; }
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index 5df84a2e51d1011ec110aba8bba901d048ffccb8..4a773b30b0a7a992f5533900080f9188bfa77108 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -353,8 +353,6 @@ typedef List<HeapObject*> DebugObjectCache;
V(Relocatable*, relocatable_top, NULL) \ V(DebugObjectCache*, string_stream_debug_object_cache, NULL) \ V(Object*, string_stream_current_security_token, NULL) \ - /* TODO(isolates): Release this on destruction? */ \ - V(int*, irregexp_interpreter_backtrack_stack_cache, NULL) \ /* Serializer state. */ \ V(ExternalReferenceTable*, external_reference_table, NULL) \ /* AstNode state. */ \


--
--
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/d/optout.

Reply via email to