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

Side by Side Diff: src/objects-printer.cc

Issue 300283002: Introduce FieldIndex to unify and abstract property/field offset (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix mutable boxed double runtime function Created 6 years, 6 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 | « src/objects-inl.h ('k') | src/property.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/disassembler.h" 7 #include "src/disassembler.h"
8 #include "src/disasm.h" 8 #include "src/disasm.h"
9 #include "src/jsregexp.h" 9 #include "src/jsregexp.h"
10 #include "src/objects-visiting.h" 10 #include "src/objects-visiting.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 void JSObject::PrintProperties(FILE* out) { 226 void JSObject::PrintProperties(FILE* out) {
227 if (HasFastProperties()) { 227 if (HasFastProperties()) {
228 DescriptorArray* descs = map()->instance_descriptors(); 228 DescriptorArray* descs = map()->instance_descriptors();
229 for (int i = 0; i < map()->NumberOfOwnDescriptors(); i++) { 229 for (int i = 0; i < map()->NumberOfOwnDescriptors(); i++) {
230 PrintF(out, " "); 230 PrintF(out, " ");
231 descs->GetKey(i)->NamePrint(out); 231 descs->GetKey(i)->NamePrint(out);
232 PrintF(out, ": "); 232 PrintF(out, ": ");
233 switch (descs->GetType(i)) { 233 switch (descs->GetType(i)) {
234 case FIELD: { 234 case FIELD: {
235 int index = descs->GetFieldIndex(i); 235 FieldIndex index = FieldIndex::ForDescriptor(map(), i);
236 RawFastPropertyAt(index)->ShortPrint(out); 236 RawFastPropertyAt(index)->ShortPrint(out);
237 PrintF(out, " (field at offset %d)\n", index); 237 PrintF(out, " (field at offset %d)\n", index.property_index());
238 break; 238 break;
239 } 239 }
240 case CONSTANT: 240 case CONSTANT:
241 descs->GetConstant(i)->ShortPrint(out); 241 descs->GetConstant(i)->ShortPrint(out);
242 PrintF(out, " (constant)\n"); 242 PrintF(out, " (constant)\n");
243 break; 243 break;
244 case CALLBACKS: 244 case CALLBACKS:
245 descs->GetCallbacksObject(i)->ShortPrint(out); 245 descs->GetCallbacksObject(i)->ShortPrint(out);
246 PrintF(out, " (callback)\n"); 246 PrintF(out, " (callback)\n");
247 break; 247 break;
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 } 1257 }
1258 } 1258 }
1259 PrintF(out, "\n"); 1259 PrintF(out, "\n");
1260 } 1260 }
1261 1261
1262 1262
1263 #endif // OBJECT_PRINT 1263 #endif // OBJECT_PRINT
1264 1264
1265 1265
1266 } } // namespace v8::internal 1266 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698