OLD | NEW |
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // If passing zero, the default/minimum size buffer is allocated. | 82 // If passing zero, the default/minimum size buffer is allocated. |
83 Address EnsureCapacity(size_t size); | 83 Address EnsureCapacity(size_t size); |
84 | 84 |
85 // Thread local archiving. | 85 // Thread local archiving. |
86 static int ArchiveSpacePerThread() { | 86 static int ArchiveSpacePerThread() { |
87 return static_cast<int>(sizeof(ThreadLocal)); | 87 return static_cast<int>(sizeof(ThreadLocal)); |
88 } | 88 } |
89 char* ArchiveStack(char* to); | 89 char* ArchiveStack(char* to); |
90 char* RestoreStack(char* from); | 90 char* RestoreStack(char* from); |
91 void FreeThreadResources() { thread_local_.Free(); } | 91 void FreeThreadResources() { thread_local_.Free(); } |
| 92 |
92 private: | 93 private: |
93 RegExpStack(); | 94 RegExpStack(); |
94 ~RegExpStack(); | 95 ~RegExpStack(); |
95 | 96 |
96 // Artificial limit used when no memory has been allocated. | 97 // Artificial limit used when no memory has been allocated. |
97 static const uintptr_t kMemoryTop = static_cast<uintptr_t>(-1); | 98 static const uintptr_t kMemoryTop = static_cast<uintptr_t>(-1); |
98 | 99 |
99 // Minimal size of allocated stack area. | 100 // Minimal size of allocated stack area. |
100 static const size_t kMinimumStackSize = 1 * KB; | 101 static const size_t kMinimumStackSize = 1 * KB; |
101 | 102 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 friend class ExternalReference; | 139 friend class ExternalReference; |
139 friend class Isolate; | 140 friend class Isolate; |
140 friend class RegExpStackScope; | 141 friend class RegExpStackScope; |
141 | 142 |
142 DISALLOW_COPY_AND_ASSIGN(RegExpStack); | 143 DISALLOW_COPY_AND_ASSIGN(RegExpStack); |
143 }; | 144 }; |
144 | 145 |
145 }} // namespace v8::internal | 146 }} // namespace v8::internal |
146 | 147 |
147 #endif // V8_REGEXP_STACK_H_ | 148 #endif // V8_REGEXP_STACK_H_ |
OLD | NEW |