35 : regexp_stack_(isolate->regexp_stack()) {
43 regexp_stack_->Reset();
47 RegExpStack::RegExpStack()
52 RegExpStack::~RegExpStack() {
58 size_t size =
sizeof(thread_local_);
59 OS::MemCopy(reinterpret_cast<void*>(to), &thread_local_, size);
60 thread_local_ = ThreadLocal();
66 size_t size =
sizeof(thread_local_);
67 OS::MemCopy(&thread_local_, reinterpret_cast<void*>(from), size);
72 void RegExpStack::Reset() {
73 if (thread_local_.memory_size_ > kMinimumStackSize) {
75 thread_local_ = ThreadLocal();
80 void RegExpStack::ThreadLocal::Free() {
81 if (memory_size_ > 0) {
89 if (size > kMaximumStackSize)
return NULL;
90 if (size < kMinimumStackSize) size = kMinimumStackSize;
91 if (thread_local_.memory_size_ < size) {
92 Address new_memory = NewArray<byte>(
static_cast<int>(
size));
93 if (thread_local_.memory_size_ > 0) {
96 reinterpret_cast<void*>(
97 new_memory + size - thread_local_.memory_size_),
98 reinterpret_cast<void*>(thread_local_.memory_),
99 thread_local_.memory_size_);
102 thread_local_.memory_ = new_memory;
103 thread_local_.memory_size_ =
size;
106 return thread_local_.memory_ + thread_local_.memory_size_;
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
Address EnsureCapacity(size_t size)
RegExpStackScope(Isolate *isolate)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object size
char * ArchiveStack(char *to)
static void MemCopy(void *dest, const void *src, size_t size)
char * RestoreStack(char *from)
static const int kStackLimitSlack
void DeleteArray(T *array)