| OLD | NEW |
| 1 // Copyright 2007-2010 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 | 312 |
| 313 | 313 |
| 314 void FileByteSink::WriteSpaceUsed( | 314 void FileByteSink::WriteSpaceUsed( |
| 315 int new_space_used, | 315 int new_space_used, |
| 316 int pointer_space_used, | 316 int pointer_space_used, |
| 317 int data_space_used, | 317 int data_space_used, |
| 318 int code_space_used, | 318 int code_space_used, |
| 319 int map_space_used, | 319 int map_space_used, |
| 320 int cell_space_used, | 320 int cell_space_used, |
| 321 int large_space_used) { | 321 int large_space_used) { |
| 322 int file_name_length = strlen(file_name_) + 10; | 322 int file_name_length = StrLength(file_name_) + 10; |
| 323 Vector<char> name = Vector<char>::New(file_name_length + 1); | 323 Vector<char> name = Vector<char>::New(file_name_length + 1); |
| 324 OS::SNPrintF(name, "%s.size", file_name_); | 324 OS::SNPrintF(name, "%s.size", file_name_); |
| 325 FILE* fp = OS::FOpen(name.start(), "w"); | 325 FILE* fp = OS::FOpen(name.start(), "w"); |
| 326 fprintf(fp, "new %d\n", new_space_used); | 326 fprintf(fp, "new %d\n", new_space_used); |
| 327 fprintf(fp, "pointer %d\n", pointer_space_used); | 327 fprintf(fp, "pointer %d\n", pointer_space_used); |
| 328 fprintf(fp, "data %d\n", data_space_used); | 328 fprintf(fp, "data %d\n", data_space_used); |
| 329 fprintf(fp, "code %d\n", code_space_used); | 329 fprintf(fp, "code %d\n", code_space_used); |
| 330 fprintf(fp, "map %d\n", map_space_used); | 330 fprintf(fp, "map %d\n", map_space_used); |
| 331 fprintf(fp, "cell %d\n", cell_space_used); | 331 fprintf(fp, "cell %d\n", cell_space_used); |
| 332 fprintf(fp, "large %d\n", large_space_used); | 332 fprintf(fp, "large %d\n", large_space_used); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 354 ser.CurrentAllocationAddress(CODE_SPACE), | 354 ser.CurrentAllocationAddress(CODE_SPACE), |
| 355 ser.CurrentAllocationAddress(MAP_SPACE), | 355 ser.CurrentAllocationAddress(MAP_SPACE), |
| 356 ser.CurrentAllocationAddress(CELL_SPACE), | 356 ser.CurrentAllocationAddress(CELL_SPACE), |
| 357 ser.CurrentAllocationAddress(LO_SPACE)); | 357 ser.CurrentAllocationAddress(LO_SPACE)); |
| 358 } | 358 } |
| 359 | 359 |
| 360 | 360 |
| 361 DEPENDENT_TEST(PartialDeserialization, PartialSerialization) { | 361 DEPENDENT_TEST(PartialDeserialization, PartialSerialization) { |
| 362 v8::V8::Initialize(); | 362 v8::V8::Initialize(); |
| 363 const char* file_name = FLAG_testing_serialization_file; | 363 const char* file_name = FLAG_testing_serialization_file; |
| 364 int file_name_length = strlen(file_name) + 10; | 364 int file_name_length = StrLength(file_name) + 10; |
| 365 Vector<char> name = Vector<char>::New(file_name_length + 1); | 365 Vector<char> name = Vector<char>::New(file_name_length + 1); |
| 366 OS::SNPrintF(name, "%s.size", file_name); | 366 OS::SNPrintF(name, "%s.size", file_name); |
| 367 FILE* fp = OS::FOpen(name.start(), "r"); | 367 FILE* fp = OS::FOpen(name.start(), "r"); |
| 368 int new_size, pointer_size, data_size, code_size, map_size, cell_size; | 368 int new_size, pointer_size, data_size, code_size, map_size, cell_size; |
| 369 int large_size; | 369 int large_size; |
| 370 #ifdef _MSC_VER | 370 #ifdef _MSC_VER |
| 371 // Avoid warning about unsafe fscanf from MSVC. | 371 // Avoid warning about unsafe fscanf from MSVC. |
| 372 // Please note that this is only fine if %c and %s are not being used. | 372 // Please note that this is only fine if %c and %s are not being used. |
| 373 #define fscanf fscanf_s | 373 #define fscanf fscanf_s |
| 374 #endif | 374 #endif |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 TEST(TestThatAlwaysFails) { | 508 TEST(TestThatAlwaysFails) { |
| 509 bool ArtificialFailure = false; | 509 bool ArtificialFailure = false; |
| 510 CHECK(ArtificialFailure); | 510 CHECK(ArtificialFailure); |
| 511 } | 511 } |
| 512 | 512 |
| 513 | 513 |
| 514 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { | 514 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { |
| 515 bool ArtificialFailure2 = false; | 515 bool ArtificialFailure2 = false; |
| 516 CHECK(ArtificialFailure2); | 516 CHECK(ArtificialFailure2); |
| 517 } | 517 } |
| OLD | NEW |