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

Unified Diff: src/jsregexp.h

Issue 6880010: Merge (7265, 7271] from bleeding_edge to experimental/gc branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/jsregexp.h
===================================================================
--- src/jsregexp.h (revision 7563)
+++ src/jsregexp.h (working copy)
@@ -1424,7 +1424,7 @@
struct CompilationResult {
explicit CompilationResult(const char* error_message)
: error_message(error_message),
- code(Heap::the_hole_value()),
+ code(HEAP->the_hole_value()),
num_registers(0) {}
CompilationResult(Object* code, int registers)
: error_message(NULL),
@@ -1449,14 +1449,14 @@
public:
inline OffsetsVector(int num_registers)
: offsets_vector_length_(num_registers) {
- if (offsets_vector_length_ > kStaticOffsetsVectorSize) {
+ if (offsets_vector_length_ > Isolate::kJSRegexpStaticOffsetsVectorSize) {
vector_ = NewArray<int>(offsets_vector_length_);
} else {
- vector_ = static_offsets_vector_;
+ vector_ = Isolate::Current()->jsregexp_static_offsets_vector();
}
}
inline ~OffsetsVector() {
- if (offsets_vector_length_ > kStaticOffsetsVectorSize) {
+ if (offsets_vector_length_ > Isolate::kJSRegexpStaticOffsetsVectorSize) {
DeleteArray(vector_);
vector_ = NULL;
}
@@ -1467,13 +1467,12 @@
static const int kStaticOffsetsVectorSize = 50;
private:
- static Address static_offsets_vector_address() {
- return reinterpret_cast<Address>(&static_offsets_vector_);
+ static Address static_offsets_vector_address(Isolate* isolate) {
+ return reinterpret_cast<Address>(isolate->jsregexp_static_offsets_vector());
}
int* vector_;
int offsets_vector_length_;
- static int static_offsets_vector_[kStaticOffsetsVectorSize];
friend class ExternalReference;
};

Powered by Google App Engine
This is Rietveld 408576698