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

Side by Side Diff: runtime/vm/object_id_ring.cc

Issue 1660063002: Remove many features when building product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « runtime/vm/object.cc ('k') | runtime/vm/object_id_ring_test.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/dart_api_state.h" 6 #include "vm/dart_api_state.h"
7 #include "vm/json_stream.h" 7 #include "vm/json_stream.h"
8 #include "vm/object_id_ring.h" 8 #include "vm/object_id_ring.h"
9 9
10 namespace dart { 10 namespace dart {
11 11
12 #ifndef PRODUCT
13
12 void ObjectIdRing::Init(Isolate* isolate, int32_t capacity) { 14 void ObjectIdRing::Init(Isolate* isolate, int32_t capacity) {
13 ObjectIdRing* ring = new ObjectIdRing(isolate, capacity); 15 ObjectIdRing* ring = new ObjectIdRing(isolate, capacity);
14 isolate->set_object_id_ring(ring); 16 isolate->set_object_id_ring(ring);
15 } 17 }
16 18
17 19
18 ObjectIdRing::~ObjectIdRing() { 20 ObjectIdRing::~ObjectIdRing() {
19 ASSERT(table_ != NULL); 21 ASSERT(table_ != NULL);
20 free(table_); 22 free(table_);
21 table_ = NULL; 23 table_ = NULL;
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // Interval #2 248 // Interval #2
247 const int32_t max_serial_num = max_serial_; 249 const int32_t max_serial_num = max_serial_;
248 const int32_t bottom = max_serial_num - (capacity_ - serial_num_); 250 const int32_t bottom = max_serial_num - (capacity_ - serial_num_);
249 return id >= bottom && bottom < max_serial_num; 251 return id >= bottom && bottom < max_serial_num;
250 } 252 }
251 } 253 }
252 ASSERT(wrapped_ == false); 254 ASSERT(wrapped_ == false);
253 return IsValidContiguous(id); 255 return IsValidContiguous(id);
254 } 256 }
255 257
258 #endif // !PRODUCT
259
256 } // namespace dart 260 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/object_id_ring_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698