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

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

Issue 9209001: Move utils.h and utils.cc from runtime/vm to runtime/platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, 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 "platform/utils.h"
5 #include "vm/assembler.h" 6 #include "vm/assembler.h"
Mads Ager (chromium) 2012/01/13 15:10:09 Move assembler.h above utils.h.
Søren Gjesse 2012/01/16 10:53:00 Done.
6 #include "vm/cpu.h" 7 #include "vm/cpu.h"
7 #include "vm/heap.h" 8 #include "vm/heap.h"
8 #include "vm/memory_region.h" 9 #include "vm/memory_region.h"
9 #include "vm/os.h" 10 #include "vm/os.h"
10 #include "vm/utils.h"
11 #include "vm/zone.h" 11 #include "vm/zone.h"
12 12
13 namespace dart { 13 namespace dart {
14 14
15 static uword NewContents(int capacity) { 15 static uword NewContents(int capacity) {
16 Zone* zone = Isolate::Current()->current_zone(); 16 Zone* zone = Isolate::Current()->current_zone();
17 uword result = zone->Allocate(capacity); 17 uword result = zone->Allocate(capacity);
18 #if defined(DEBUG) 18 #if defined(DEBUG)
19 // Initialize the buffer with kBreakPointInstruction to force a break 19 // Initialize the buffer with kBreakPointInstruction to force a break
20 // point if we ever execute an uninitialized part of the code buffer. 20 // point if we ever execute an uninitialized part of the code buffer.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 void Assembler::Unreachable(const char* message) { 174 void Assembler::Unreachable(const char* message) {
175 const char* format = "Unreachable: %s"; 175 const char* format = "Unreachable: %s";
176 const intptr_t len = OS::SNPrint(NULL, 0, format, message); 176 const intptr_t len = OS::SNPrint(NULL, 0, format, message);
177 char* buffer = reinterpret_cast<char*>(malloc(len + 1)); 177 char* buffer = reinterpret_cast<char*>(malloc(len + 1));
178 OS::SNPrint(buffer, len + 1, format, message); 178 OS::SNPrint(buffer, len + 1, format, message);
179 Stop(buffer); 179 Stop(buffer);
180 } 180 }
181 181
182 } // namespace dart 182 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698