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

Side by Side Diff: src/small-pointer-list.h

Issue 11365174: A change in the way we place TransitionElementKinds in the tree. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Now includes optimization of codegen for transition elementskind instruction Created 8 years 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/runtime.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 if ((data_ & kTagMask) == kEmptyTag) return; 119 if ((data_ & kTagMask) == kEmptyTag) return;
120 if ((data_ & kTagMask) == kSingletonTag) { 120 if ((data_ & kTagMask) == kSingletonTag) {
121 if (pointer == single_value()) { 121 if (pointer == single_value()) {
122 data_ = kEmptyTag; 122 data_ = kEmptyTag;
123 } 123 }
124 return; 124 return;
125 } 125 }
126 list()->RemoveElement(pointer); 126 list()->RemoveElement(pointer);
127 } 127 }
128 128
129 void RemoveAt(int i) {
130 if ((data_ & kTagMask) == kEmptyTag) return;
131 if ((data_ & kTagMask) == kSingletonTag) {
132 ASSERT(i == 0);
133 data_ = kEmptyTag;
134 return;
135 }
136 list()->Remove(i);
137 }
138
129 T* RemoveLast() { 139 T* RemoveLast() {
130 ASSERT((data_ & kTagMask) != kEmptyTag); 140 ASSERT((data_ & kTagMask) != kEmptyTag);
131 if ((data_ & kTagMask) == kSingletonTag) { 141 if ((data_ & kTagMask) == kSingletonTag) {
132 T* result = single_value(); 142 T* result = single_value();
133 data_ = kEmptyTag; 143 data_ = kEmptyTag;
134 return result; 144 return result;
135 } 145 }
136 return list()->RemoveLast(); 146 return list()->RemoveLast();
137 } 147 }
138 148
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 199 }
190 200
191 intptr_t data_; 201 intptr_t data_;
192 202
193 DISALLOW_COPY_AND_ASSIGN(SmallPointerList); 203 DISALLOW_COPY_AND_ASSIGN(SmallPointerList);
194 }; 204 };
195 205
196 } } // namespace v8::internal 206 } } // namespace v8::internal
197 207
198 #endif // V8_SMALL_POINTER_LIST_H_ 208 #endif // V8_SMALL_POINTER_LIST_H_
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698