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

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

Issue 26294002: Cleanups: int -> intptr_t for "array" lengths, memory sizes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | « runtime/vm/growable_array.h ('k') | runtime/vm/os_linux.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) 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 9093 matching lines...) Expand 10 before | Expand all | Expand 10 after
9104 instrs.size()); 9104 instrs.size());
9105 assembler->FinalizeInstructions(region); 9105 assembler->FinalizeInstructions(region);
9106 CPU::FlushICache(instrs.EntryPoint(), instrs.size()); 9106 CPU::FlushICache(instrs.EntryPoint(), instrs.size());
9107 9107
9108 CodeObservers::NotifyAll(name, 9108 CodeObservers::NotifyAll(name,
9109 instrs.EntryPoint(), 9109 instrs.EntryPoint(),
9110 assembler->prologue_offset(), 9110 assembler->prologue_offset(),
9111 instrs.size(), 9111 instrs.size(),
9112 optimized); 9112 optimized);
9113 9113
9114 const ZoneGrowableArray<int>& pointer_offsets = 9114 const ZoneGrowableArray<intptr_t>& pointer_offsets =
9115 assembler->GetPointerOffsets(); 9115 assembler->GetPointerOffsets();
9116 9116
9117 // Allocate the code object. 9117 // Allocate the code object.
9118 Code& code = Code::ZoneHandle(Code::New(pointer_offsets.length())); 9118 Code& code = Code::ZoneHandle(Code::New(pointer_offsets.length()));
9119 { 9119 {
9120 NoGCScope no_gc; 9120 NoGCScope no_gc;
9121 9121
9122 // Set pointer offsets list in Code object and resolve all handles in 9122 // Set pointer offsets list in Code object and resolve all handles in
9123 // the instruction stream to raw objects. 9123 // the instruction stream to raw objects.
9124 ASSERT(code.pointer_offsets_length() == pointer_offsets.length()); 9124 ASSERT(code.pointer_offsets_length() == pointer_offsets.length());
9125 for (int i = 0; i < pointer_offsets.length(); i++) { 9125 for (intptr_t i = 0; i < pointer_offsets.length(); i++) {
9126 int offset_in_instrs = pointer_offsets[i]; 9126 intptr_t offset_in_instrs = pointer_offsets[i];
9127 code.SetPointerOffsetAt(i, offset_in_instrs); 9127 code.SetPointerOffsetAt(i, offset_in_instrs);
9128 const Object* object = region.Load<const Object*>(offset_in_instrs); 9128 const Object* object = region.Load<const Object*>(offset_in_instrs);
9129 region.Store<RawObject*>(offset_in_instrs, object->raw()); 9129 region.Store<RawObject*>(offset_in_instrs, object->raw());
9130 } 9130 }
9131 9131
9132 // Hook up Code and Instructions objects. 9132 // Hook up Code and Instructions objects.
9133 instrs.set_code(code.raw()); 9133 instrs.set_code(code.raw());
9134 code.set_instructions(instrs.raw()); 9134 code.set_instructions(instrs.raw());
9135 9135
9136 // Set object pool in Instructions object. 9136 // Set object pool in Instructions object.
(...skipping 6179 matching lines...) Expand 10 before | Expand all | Expand 10 after
15316 return "_MirrorReference"; 15316 return "_MirrorReference";
15317 } 15317 }
15318 15318
15319 15319
15320 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 15320 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
15321 JSONObject jsobj(stream); 15321 JSONObject jsobj(stream);
15322 } 15322 }
15323 15323
15324 15324
15325 } // namespace dart 15325 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/growable_array.h ('k') | runtime/vm/os_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698