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

Side by Side Diff: src/regexp-stack.h

Issue 521028: Direct call to native RegExp code from JavaScript (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 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/regexp-macro-assembler.cc ('k') | src/v8-counters.h » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 : memory_(NULL), 91 : memory_(NULL),
92 memory_size_(0), 92 memory_size_(0),
93 limit_(reinterpret_cast<Address>(kMemoryTop)) {} 93 limit_(reinterpret_cast<Address>(kMemoryTop)) {}
94 // If memory_size_ > 0 then memory_ must be non-NULL. 94 // If memory_size_ > 0 then memory_ must be non-NULL.
95 Address memory_; 95 Address memory_;
96 size_t memory_size_; 96 size_t memory_size_;
97 Address limit_; 97 Address limit_;
98 void Free(); 98 void Free();
99 }; 99 };
100 100
101 // Address of allocated memory.
102 static Address memory_address() {
103 return reinterpret_cast<Address>(&thread_local_.memory_);
104 }
105
106 // Address of size of allocated memory.
107 static Address memory_size_address() {
108 return reinterpret_cast<Address>(&thread_local_.memory_size_);
109 }
110
101 // Resets the buffer if it has grown beyond the default/minimum size. 111 // Resets the buffer if it has grown beyond the default/minimum size.
102 // After this, the buffer is either the default size, or it is empty, so 112 // After this, the buffer is either the default size, or it is empty, so
103 // you have to call EnsureCapacity before using it again. 113 // you have to call EnsureCapacity before using it again.
104 static void Reset(); 114 static void Reset();
105 115
106 static ThreadLocal thread_local_; 116 static ThreadLocal thread_local_;
117
118 friend class ExternalReference;
107 }; 119 };
108 120
109 }} // namespace v8::internal 121 }} // namespace v8::internal
110 122
111 #endif // V8_REGEXP_STACK_H_ 123 #endif // V8_REGEXP_STACK_H_
OLDNEW
« no previous file with comments | « src/regexp-macro-assembler.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698