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

Side by Side Diff: src/unique.h

Issue 106733002: Improve check elimination with branch sensitivity on HCompareObjectEqAndBranch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Split variable declarations onto multiple lines. Created 7 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/hydrogen-check-elimination.cc ('k') | test/mjsunit/compiler/compare_objeq_elim.js » ('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 // 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } 271 }
272 } 272 }
273 273
274 while (i < this->size_) out->array_[k++] = this->array_[i++]; 274 while (i < this->size_) out->array_[k++] = this->array_[i++];
275 while (j < that->size_) out->array_[k++] = that->array_[j++]; 275 while (j < that->size_) out->array_[k++] = that->array_[j++];
276 276
277 out->size_ = k; 277 out->size_ = k;
278 return out; 278 return out;
279 } 279 }
280 280
281 // Makes an exact copy of this set. O(|this| + |that|). 281 // Makes an exact copy of this set. O(|this|).
282 UniqueSet<T>* Copy(Zone* zone) const { 282 UniqueSet<T>* Copy(Zone* zone) const {
283 UniqueSet<T>* copy = new(zone) UniqueSet<T>(); 283 UniqueSet<T>* copy = new(zone) UniqueSet<T>();
284 copy->size_ = this->size_; 284 copy->size_ = this->size_;
285 copy->capacity_ = this->size_; 285 copy->capacity_ = this->size_;
286 copy->array_ = zone->NewArray<Unique<T> >(this->size_); 286 copy->array_ = zone->NewArray<Unique<T> >(this->size_);
287 memcpy(copy->array_, this->array_, this->size_ * sizeof(Unique<T>)); 287 memcpy(copy->array_, this->array_, this->size_ * sizeof(Unique<T>));
288 return copy; 288 return copy;
289 } 289 }
290 290
291 void Clear() { 291 void Clear() {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 capacity_ = new_capacity; 323 capacity_ = new_capacity;
324 array_ = new_array; 324 array_ = new_array;
325 } 325 }
326 } 326 }
327 }; 327 };
328 328
329 329
330 } } // namespace v8::internal 330 } } // namespace v8::internal
331 331
332 #endif // V8_HYDROGEN_UNIQUE_H_ 332 #endif // V8_HYDROGEN_UNIQUE_H_
OLDNEW
« no previous file with comments | « src/hydrogen-check-elimination.cc ('k') | test/mjsunit/compiler/compare_objeq_elim.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698