OLD | NEW |
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 Loading... |
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 FieldIndex index = FieldIndex::ForDescriptor(map(), i); | 235 int index = descs->GetFieldIndex(i); |
236 RawFastPropertyAt(index)->ShortPrint(out); | 236 RawFastPropertyAt(index)->ShortPrint(out); |
237 PrintF(out, " (field at offset %d)\n", index.property_index()); | 237 PrintF(out, " (field at offset %d)\n", 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 Loading... |
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 |
OLD | NEW |