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

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

Issue 11028145: Changed StackZone and ApiZone to be containers for Zone. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor tweak to use RawError instead of RawObject. Created 8 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/lib/string.cc ('k') | runtime/vm/base_isolate.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) 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/assembler.h" 5 #include "vm/assembler.h"
6 6
7 #include "platform/utils.h" 7 #include "platform/utils.h"
8 #include "vm/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/heap.h" 9 #include "vm/heap.h"
10 #include "vm/memory_region.h" 10 #include "vm/memory_region.h"
11 #include "vm/os.h" 11 #include "vm/os.h"
12 #include "vm/zone.h" 12 #include "vm/zone.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 static uword NewContents(intptr_t capacity) { 16 static uword NewContents(intptr_t capacity) {
17 StackZone* zone = Isolate::Current()->current_zone(); 17 Zone* zone = Isolate::Current()->current_zone();
18 uword result = zone->AllocUnsafe(capacity); 18 uword result = zone->AllocUnsafe(capacity);
19 #if defined(DEBUG) 19 #if defined(DEBUG)
20 // Initialize the buffer with kBreakPointInstruction to force a break 20 // Initialize the buffer with kBreakPointInstruction to force a break
21 // 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.
22 Assembler::InitializeMemoryWithBreakpoints(result, capacity); 22 Assembler::InitializeMemoryWithBreakpoints(result, capacity);
23 #endif 23 #endif
24 return result; 24 return result;
25 } 25 }
26 26
27 27
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 void Assembler::Unreachable(const char* message) { 180 void Assembler::Unreachable(const char* message) {
181 const char* format = "Unreachable: %s"; 181 const char* format = "Unreachable: %s";
182 const intptr_t len = OS::SNPrint(NULL, 0, format, message); 182 const intptr_t len = OS::SNPrint(NULL, 0, format, message);
183 char* buffer = reinterpret_cast<char*>(malloc(len + 1)); 183 char* buffer = reinterpret_cast<char*>(malloc(len + 1));
184 OS::SNPrint(buffer, len + 1, format, message); 184 OS::SNPrint(buffer, len + 1, format, message);
185 Stop(buffer); 185 Stop(buffer);
186 } 186 }
187 187
188 } // namespace dart 188 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/string.cc ('k') | runtime/vm/base_isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698