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

Side by Side Diff: src/func-name-inferrer.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/full-codegen.cc ('k') | src/gc-tracer.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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_FUNC_NAME_INFERRER_H_ 5 #ifndef V8_FUNC_NAME_INFERRER_H_
6 #define V8_FUNC_NAME_INFERRER_H_ 6 #define V8_FUNC_NAME_INFERRER_H_
7 7
8 #include "src/handles.h" 8 #include "src/handles.h"
9 #include "src/zone.h" 9 #include "src/zone.h"
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 void RemoveLastFunction() { 56 void RemoveLastFunction() {
57 if (IsOpen() && !funcs_to_infer_.is_empty()) { 57 if (IsOpen() && !funcs_to_infer_.is_empty()) {
58 funcs_to_infer_.RemoveLast(); 58 funcs_to_infer_.RemoveLast();
59 } 59 }
60 } 60 }
61 61
62 // Infers a function name and leaves names collection state. 62 // Infers a function name and leaves names collection state.
63 void Infer() { 63 void Infer() {
64 ASSERT(IsOpen()); 64 DCHECK(IsOpen());
65 if (!funcs_to_infer_.is_empty()) { 65 if (!funcs_to_infer_.is_empty()) {
66 InferFunctionsNames(); 66 InferFunctionsNames();
67 } 67 }
68 } 68 }
69 69
70 // Leaves names collection state. 70 // Leaves names collection state.
71 void Leave() { 71 void Leave() {
72 ASSERT(IsOpen()); 72 DCHECK(IsOpen());
73 names_stack_.Rewind(entries_stack_.RemoveLast()); 73 names_stack_.Rewind(entries_stack_.RemoveLast());
74 if (entries_stack_.is_empty()) 74 if (entries_stack_.is_empty())
75 funcs_to_infer_.Clear(); 75 funcs_to_infer_.Clear();
76 } 76 }
77 77
78 private: 78 private:
79 enum NameType { 79 enum NameType {
80 kEnclosingConstructorName, 80 kEnclosingConstructorName,
81 kLiteralName, 81 kLiteralName,
82 kVariableName 82 kVariableName
(...skipping 22 matching lines...) Expand all
105 ZoneList<FunctionLiteral*> funcs_to_infer_; 105 ZoneList<FunctionLiteral*> funcs_to_infer_;
106 Zone* zone_; 106 Zone* zone_;
107 107
108 DISALLOW_COPY_AND_ASSIGN(FuncNameInferrer); 108 DISALLOW_COPY_AND_ASSIGN(FuncNameInferrer);
109 }; 109 };
110 110
111 111
112 } } // namespace v8::internal 112 } } // namespace v8::internal
113 113
114 #endif // V8_FUNC_NAME_INFERRER_H_ 114 #endif // V8_FUNC_NAME_INFERRER_H_
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/gc-tracer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698