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

Side by Side Diff: src/zone.cc

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 years, 11 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
« no previous file with comments | « src/zone.h ('k') | test/cctest/cctest.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #include <string.h> 5 #include <string.h>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 #include "src/zone-inl.h" 8 #include "src/zone-inl.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 26 matching lines...) Expand all
37 // Computes the address of the nth byte in this segment. 37 // Computes the address of the nth byte in this segment.
38 Address address(int n) const { 38 Address address(int n) const {
39 return Address(this) + n; 39 return Address(this) + n;
40 } 40 }
41 41
42 Segment* next_; 42 Segment* next_;
43 int size_; 43 int size_;
44 }; 44 };
45 45
46 46
47 Zone::Zone(Isolate* isolate) 47 Zone::Zone()
48 : allocation_size_(0), 48 : allocation_size_(0),
49 segment_bytes_allocated_(0), 49 segment_bytes_allocated_(0),
50 position_(0), 50 position_(0),
51 limit_(0), 51 limit_(0),
52 segment_head_(NULL), 52 segment_head_(NULL) {}
53 isolate_(isolate) {
54 }
55 53
56 54
57 Zone::~Zone() { 55 Zone::~Zone() {
58 DeleteAll(); 56 DeleteAll();
59 DeleteKeptSegment(); 57 DeleteKeptSegment();
60 58
61 DCHECK(segment_bytes_allocated_ == 0); 59 DCHECK(segment_bytes_allocated_ == 0);
62 } 60 }
63 61
64 62
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 V8::FatalProcessOutOfMemory("Zone"); 249 V8::FatalProcessOutOfMemory("Zone");
252 return NULL; 250 return NULL;
253 } 251 }
254 limit_ = segment->end(); 252 limit_ = segment->end();
255 DCHECK(position_ <= limit_); 253 DCHECK(position_ <= limit_);
256 return result; 254 return result;
257 } 255 }
258 256
259 257
260 } } // namespace v8::internal 258 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/zone.h ('k') | test/cctest/cctest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698