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

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

Issue 20180003: Allocate comments in old space. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 8246 matching lines...) Expand 10 before | Expand all | Expand 10 after
8257 8257
8258 Code::Comments& Code::Comments::New(intptr_t count) { 8258 Code::Comments& Code::Comments::New(intptr_t count) {
8259 Comments* comments; 8259 Comments* comments;
8260 if (count < 0 || count > (kIntptrMax / kNumberOfEntries)) { 8260 if (count < 0 || count > (kIntptrMax / kNumberOfEntries)) {
8261 // This should be caught before we reach here. 8261 // This should be caught before we reach here.
8262 FATAL1("Fatal error in Code::Comments::New: invalid count %"Pd"\n", count); 8262 FATAL1("Fatal error in Code::Comments::New: invalid count %"Pd"\n", count);
8263 } 8263 }
8264 if (count == 0) { 8264 if (count == 0) {
8265 comments = new Comments(Object::empty_array()); 8265 comments = new Comments(Object::empty_array());
8266 } else { 8266 } else {
8267 const Array& data = Array::Handle(Array::New(count * kNumberOfEntries)); 8267 const Array& data =
8268 Array::Handle(Array::New(count * kNumberOfEntries, Heap::kOld));
8268 comments = new Comments(data); 8269 comments = new Comments(data);
8269 } 8270 }
8270 return *comments; 8271 return *comments;
8271 } 8272 }
8272 8273
8273 8274
8274 intptr_t Code::Comments::Length() const { 8275 intptr_t Code::Comments::Length() const {
8275 if (comments_.IsNull()) { 8276 if (comments_.IsNull()) {
8276 return 0; 8277 return 0;
8277 } 8278 }
(...skipping 6082 matching lines...) Expand 10 before | Expand all | Expand 10 after
14360 } 14361 }
14361 14362
14362 14363
14363 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 14364 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
14364 stream->OpenObject(); 14365 stream->OpenObject();
14365 stream->CloseObject(); 14366 stream->CloseObject();
14366 } 14367 }
14367 14368
14368 14369
14369 } // namespace dart 14370 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698