| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 void Map::PrintGeneralization(FILE* file, | 1364 void Map::PrintGeneralization(FILE* file, |
| 1365 const char* reason, | 1365 const char* reason, |
| 1366 int modify_index, | 1366 int modify_index, |
| 1367 int split, | 1367 int split, |
| 1368 int descriptors, | 1368 int descriptors, |
| 1369 bool constant_to_field, | 1369 bool constant_to_field, |
| 1370 Representation old_representation, | 1370 Representation old_representation, |
| 1371 Representation new_representation, | 1371 Representation new_representation, |
| 1372 HeapType* old_field_type, | 1372 HeapType* old_field_type, |
| 1373 HeapType* new_field_type) { | 1373 HeapType* new_field_type) { |
| 1374 PrintF(file, "[generalizing "); | 1374 OFStream os(file); |
| 1375 os << "[generalizing "; |
| 1375 constructor_name()->PrintOn(file); | 1376 constructor_name()->PrintOn(file); |
| 1376 PrintF(file, "] "); | 1377 os << "] "; |
| 1377 Name* name = instance_descriptors()->GetKey(modify_index); | 1378 Name* name = instance_descriptors()->GetKey(modify_index); |
| 1378 if (name->IsString()) { | 1379 if (name->IsString()) { |
| 1379 String::cast(name)->PrintOn(file); | 1380 String::cast(name)->PrintOn(file); |
| 1380 } else { | 1381 } else { |
| 1381 PrintF(file, "{symbol %p}", static_cast<void*>(name)); | 1382 os << "{symbol " << static_cast<void*>(name) << "}"; |
| 1382 } | 1383 } |
| 1383 PrintF(file, ":"); | 1384 os << ":"; |
| 1384 if (constant_to_field) { | 1385 if (constant_to_field) { |
| 1385 PrintF(file, "c"); | 1386 os << "c"; |
| 1386 } else { | 1387 } else { |
| 1387 PrintF(file, "%s", old_representation.Mnemonic()); | 1388 os << old_representation.Mnemonic() << "{"; |
| 1388 PrintF(file, "{"); | 1389 old_field_type->PrintTo(os, HeapType::SEMANTIC_DIM); |
| 1389 old_field_type->TypePrint(file, HeapType::SEMANTIC_DIM); | 1390 os << "}"; |
| 1390 PrintF(file, "}"); | |
| 1391 } | 1391 } |
| 1392 PrintF(file, "->%s", new_representation.Mnemonic()); | 1392 os << "->" << new_representation.Mnemonic() << "{"; |
| 1393 PrintF(file, "{"); | 1393 new_field_type->PrintTo(os, HeapType::SEMANTIC_DIM); |
| 1394 new_field_type->TypePrint(file, HeapType::SEMANTIC_DIM); | 1394 os << "} ("; |
| 1395 PrintF(file, "}"); | |
| 1396 PrintF(file, " ("); | |
| 1397 if (strlen(reason) > 0) { | 1395 if (strlen(reason) > 0) { |
| 1398 PrintF(file, "%s", reason); | 1396 os << reason; |
| 1399 } else { | 1397 } else { |
| 1400 PrintF(file, "+%i maps", descriptors - split); | 1398 os << "+" << (descriptors - split) << " maps"; |
| 1401 } | 1399 } |
| 1402 PrintF(file, ") ["); | 1400 os << ") ["; |
| 1403 JavaScriptFrame::PrintTop(GetIsolate(), file, false, true); | 1401 JavaScriptFrame::PrintTop(GetIsolate(), file, false, true); |
| 1404 PrintF(file, "]\n"); | 1402 os << "]\n"; |
| 1405 } | 1403 } |
| 1406 | 1404 |
| 1407 | 1405 |
| 1408 void JSObject::PrintInstanceMigration(FILE* file, | 1406 void JSObject::PrintInstanceMigration(FILE* file, |
| 1409 Map* original_map, | 1407 Map* original_map, |
| 1410 Map* new_map) { | 1408 Map* new_map) { |
| 1411 PrintF(file, "[migrating "); | 1409 PrintF(file, "[migrating "); |
| 1412 map()->constructor_name()->PrintOn(file); | 1410 map()->constructor_name()->PrintOn(file); |
| 1413 PrintF(file, "] "); | 1411 PrintF(file, "] "); |
| 1414 DescriptorArray* o = original_map->instance_descriptors(); | 1412 DescriptorArray* o = original_map->instance_descriptors(); |
| (...skipping 15563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16978 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16976 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 16979 static const char* error_messages_[] = { | 16977 static const char* error_messages_[] = { |
| 16980 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16978 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 16981 }; | 16979 }; |
| 16982 #undef ERROR_MESSAGES_TEXTS | 16980 #undef ERROR_MESSAGES_TEXTS |
| 16983 return error_messages_[reason]; | 16981 return error_messages_[reason]; |
| 16984 } | 16982 } |
| 16985 | 16983 |
| 16986 | 16984 |
| 16987 } } // namespace v8::internal | 16985 } } // namespace v8::internal |
| OLD | NEW |