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

Side by Side Diff: src/allocation-site-scopes.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/allocation.cc ('k') | src/allocation-site-scopes.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ALLOCATION_SITE_SCOPES_H_ 5 #ifndef V8_ALLOCATION_SITE_SCOPES_H_
6 #define V8_ALLOCATION_SITE_SCOPES_H_ 6 #define V8_ALLOCATION_SITE_SCOPES_H_
7 7
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 top_site_(site), 68 top_site_(site),
69 activated_(activated) { } 69 activated_(activated) { }
70 70
71 inline Handle<AllocationSite> EnterNewScope() { 71 inline Handle<AllocationSite> EnterNewScope() {
72 if (top().is_null()) { 72 if (top().is_null()) {
73 InitializeTraversal(top_site_); 73 InitializeTraversal(top_site_);
74 } else { 74 } else {
75 // Advance current site 75 // Advance current site
76 Object* nested_site = current()->nested_site(); 76 Object* nested_site = current()->nested_site();
77 // Something is wrong if we advance to the end of the list here. 77 // Something is wrong if we advance to the end of the list here.
78 ASSERT(nested_site->IsAllocationSite()); 78 DCHECK(nested_site->IsAllocationSite());
79 update_current_site(AllocationSite::cast(nested_site)); 79 update_current_site(AllocationSite::cast(nested_site));
80 } 80 }
81 return Handle<AllocationSite>(*current(), isolate()); 81 return Handle<AllocationSite>(*current(), isolate());
82 } 82 }
83 83
84 inline void ExitScope(Handle<AllocationSite> scope_site, 84 inline void ExitScope(Handle<AllocationSite> scope_site,
85 Handle<JSObject> object) { 85 Handle<JSObject> object) {
86 // This assert ensures that we are pointing at the right sub-object in a 86 // This assert ensures that we are pointing at the right sub-object in a
87 // recursive walk of a nested literal. 87 // recursive walk of a nested literal.
88 ASSERT(object.is_null() || *object == scope_site->transition_info()); 88 DCHECK(object.is_null() || *object == scope_site->transition_info());
89 } 89 }
90 90
91 bool ShouldCreateMemento(Handle<JSObject> object); 91 bool ShouldCreateMemento(Handle<JSObject> object);
92 92
93 private: 93 private:
94 Handle<AllocationSite> top_site_; 94 Handle<AllocationSite> top_site_;
95 bool activated_; 95 bool activated_;
96 }; 96 };
97 97
98 98
99 } } // namespace v8::internal 99 } } // namespace v8::internal
100 100
101 #endif // V8_ALLOCATION_SITE_SCOPES_H_ 101 #endif // V8_ALLOCATION_SITE_SCOPES_H_
OLDNEW
« no previous file with comments | « src/allocation.cc ('k') | src/allocation-site-scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698