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

Side by Side Diff: src/zone-allocator.h

Issue 738613005: Restrict floating control to minimal control-connected component. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_scheduler-loop-1
Patch Set: Rebased and adapted. Created 6 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
« no previous file with comments | « src/compiler/scheduler.cc ('k') | src/zone-containers.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_ZONE_ALLOCATOR_H_ 5 #ifndef V8_ZONE_ALLOCATOR_H_
6 #define V8_ZONE_ALLOCATOR_H_ 6 #define V8_ZONE_ALLOCATOR_H_
7 7
8 #include <limits> 8 #include <limits>
9 9
10 #include "src/zone.h" 10 #include "src/zone.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 void deallocate(pointer p, size_type) { /* noop for Zones */ } 43 void deallocate(pointer p, size_type) { /* noop for Zones */ }
44 44
45 size_type max_size() const throw() { 45 size_type max_size() const throw() {
46 return std::numeric_limits<int>::max() / sizeof(value_type); 46 return std::numeric_limits<int>::max() / sizeof(value_type);
47 } 47 }
48 void construct(pointer p, const T& val) { 48 void construct(pointer p, const T& val) {
49 new(static_cast<void*>(p)) T(val); 49 new(static_cast<void*>(p)) T(val);
50 } 50 }
51 void destroy(pointer p) { p->~T(); } 51 void destroy(pointer p) { p->~T(); }
52 52
53 bool operator==(zone_allocator const& other) { 53 bool operator==(zone_allocator const& other) const {
54 return zone_ == other.zone_; 54 return zone_ == other.zone_;
55 } 55 }
56 bool operator!=(zone_allocator const& other) { 56 bool operator!=(zone_allocator const& other) const {
57 return zone_ != other.zone_; 57 return zone_ != other.zone_;
58 } 58 }
59 59
60 private: 60 private:
61 zone_allocator(); 61 zone_allocator();
62 Zone* zone_; 62 Zone* zone_;
63 }; 63 };
64 64
65 typedef zone_allocator<bool> ZoneBoolAllocator; 65 typedef zone_allocator<bool> ZoneBoolAllocator;
66 typedef zone_allocator<int> ZoneIntAllocator; 66 typedef zone_allocator<int> ZoneIntAllocator;
67 } } // namespace v8::internal 67 } } // namespace v8::internal
68 68
69 #endif // V8_ZONE_ALLOCATOR_H_ 69 #endif // V8_ZONE_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « src/compiler/scheduler.cc ('k') | src/zone-containers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698