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

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

Issue 430503007: Rename ASSERT* to DCHECK*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and fixes Created 6 years, 4 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-tracer.cc ('k') | src/rewriter.cc » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_REGEXP_STACK_H_ 5 #ifndef V8_REGEXP_STACK_H_
6 #define V8_REGEXP_STACK_H_ 6 #define V8_REGEXP_STACK_H_
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 10
(...skipping 23 matching lines...) Expand all
34 34
35 class RegExpStack { 35 class RegExpStack {
36 public: 36 public:
37 // Number of allocated locations on the stack below the limit. 37 // Number of allocated locations on the stack below the limit.
38 // No sequence of pushes must be longer that this without doing a stack-limit 38 // No sequence of pushes must be longer that this without doing a stack-limit
39 // check. 39 // check.
40 static const int kStackLimitSlack = 32; 40 static const int kStackLimitSlack = 32;
41 41
42 // Gives the top of the memory used as stack. 42 // Gives the top of the memory used as stack.
43 Address stack_base() { 43 Address stack_base() {
44 ASSERT(thread_local_.memory_size_ != 0); 44 DCHECK(thread_local_.memory_size_ != 0);
45 return thread_local_.memory_ + thread_local_.memory_size_; 45 return thread_local_.memory_ + thread_local_.memory_size_;
46 } 46 }
47 47
48 // The total size of the memory allocated for the stack. 48 // The total size of the memory allocated for the stack.
49 size_t stack_capacity() { return thread_local_.memory_size_; } 49 size_t stack_capacity() { return thread_local_.memory_size_; }
50 50
51 // If the stack pointer gets below the limit, we should react and 51 // If the stack pointer gets below the limit, we should react and
52 // either grow the stack or report an out-of-stack exception. 52 // either grow the stack or report an out-of-stack exception.
53 // There is only a limited number of locations below the stack limit, 53 // There is only a limited number of locations below the stack limit,
54 // so users of the stack should check the stack limit during any 54 // so users of the stack should check the stack limit during any
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 friend class ExternalReference; 116 friend class ExternalReference;
117 friend class Isolate; 117 friend class Isolate;
118 friend class RegExpStackScope; 118 friend class RegExpStackScope;
119 119
120 DISALLOW_COPY_AND_ASSIGN(RegExpStack); 120 DISALLOW_COPY_AND_ASSIGN(RegExpStack);
121 }; 121 };
122 122
123 }} // namespace v8::internal 123 }} // namespace v8::internal
124 124
125 #endif // V8_REGEXP_STACK_H_ 125 #endif // V8_REGEXP_STACK_H_
OLDNEW
« no previous file with comments | « src/regexp-macro-assembler-tracer.cc ('k') | src/rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698