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

Side by Side Diff: vm/assembler.cc

Issue 11519006: Add read only handles for the following predefined symbols (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years 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 | vm/assembler_ia32.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/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"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 private: 145 private:
146 ZoneGrowableArray<int>* pointer_offsets_; 146 ZoneGrowableArray<int>* pointer_offsets_;
147 const Object& object_; 147 const Object& object_;
148 }; 148 };
149 149
150 150
151 void AssemblerBuffer::EmitObject(const Object& object) { 151 void AssemblerBuffer::EmitObject(const Object& object) {
152 // Since we are going to store the handle as part of the fixup information 152 // Since we are going to store the handle as part of the fixup information
153 // the handle needs to be a zone handle. 153 // the handle needs to be a zone handle.
154 ASSERT(object.IsZoneHandle()); 154 ASSERT(object.IsNotTemporaryScopedHandle());
155 ASSERT(object.IsOld()); 155 ASSERT(object.IsOld());
156 EmitFixup(new PatchCodeWithHandle(pointer_offsets_, object)); 156 EmitFixup(new PatchCodeWithHandle(pointer_offsets_, object));
157 cursor_ += kWordSize; // Reserve space for pointer. 157 cursor_ += kWordSize; // Reserve space for pointer.
158 } 158 }
159 159
160 160
161 // Shared macros are implemented here. 161 // Shared macros are implemented here.
162 void Assembler::Unimplemented(const char* message) { 162 void Assembler::Unimplemented(const char* message) {
163 const char* format = "Unimplemented: %s"; 163 const char* format = "Unimplemented: %s";
164 const intptr_t len = OS::SNPrint(NULL, 0, format, message); 164 const intptr_t len = OS::SNPrint(NULL, 0, format, message);
(...skipping 14 matching lines...) Expand all
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 | « no previous file | vm/assembler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698