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

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: Addresed new comments from ager@ 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
« no previous file with comments | « runtime/platform/utils.cc ('k') | runtime/vm/assembler_ia32.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 (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 "vm/assembler.h" 5 #include "vm/assembler.h"
6
7 #include "platform/utils.h"
6 #include "vm/cpu.h" 8 #include "vm/cpu.h"
7 #include "vm/heap.h" 9 #include "vm/heap.h"
8 #include "vm/memory_region.h" 10 #include "vm/memory_region.h"
9 #include "vm/os.h" 11 #include "vm/os.h"
10 #include "vm/utils.h"
11 #include "vm/zone.h" 12 #include "vm/zone.h"
12 13
13 namespace dart { 14 namespace dart {
14 15
15 static uword NewContents(int capacity) { 16 static uword NewContents(int capacity) {
16 Zone* zone = Isolate::Current()->current_zone(); 17 Zone* zone = Isolate::Current()->current_zone();
17 uword result = zone->Allocate(capacity); 18 uword result = zone->Allocate(capacity);
18 #if defined(DEBUG) 19 #if defined(DEBUG)
19 // Initialize the buffer with kBreakPointInstruction to force a break 20 // Initialize the buffer with kBreakPointInstruction to force a break
20 // point if we ever execute an uninitialized part of the code buffer. 21 // 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 174
174 void Assembler::Unreachable(const char* message) { 175 void Assembler::Unreachable(const char* message) {
175 const char* format = "Unreachable: %s"; 176 const char* format = "Unreachable: %s";
176 const intptr_t len = OS::SNPrint(NULL, 0, format, message); 177 const intptr_t len = OS::SNPrint(NULL, 0, format, message);
177 char* buffer = reinterpret_cast<char*>(malloc(len + 1)); 178 char* buffer = reinterpret_cast<char*>(malloc(len + 1));
178 OS::SNPrint(buffer, len + 1, format, message); 179 OS::SNPrint(buffer, len + 1, format, message);
179 Stop(buffer); 180 Stop(buffer);
180 } 181 }
181 182
182 } // namespace dart 183 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/platform/utils.cc ('k') | runtime/vm/assembler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698