Remove unused irregexp cache.
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/200303002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
e617c101b9
commit
dc24a17226
@ -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_; }
|
||||
|
@ -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. */ \
|
||||
|
Loading…
Reference in New Issue
Block a user