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

Side by Side Diff: src/hydrogen-gvn.cc

Issue 61953002: Another fix for windows breakage after r17521. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 char underlying_buffer[kLastFlag * 128]; 426 char underlying_buffer[kLastFlag * 128];
427 Vector<char> buffer(underlying_buffer, sizeof(underlying_buffer)); 427 Vector<char> buffer(underlying_buffer, sizeof(underlying_buffer));
428 #if DEBUG 428 #if DEBUG
429 int offset = 0; 429 int offset = 0;
430 const char* separator = ""; 430 const char* separator = "";
431 const char* comma = ", "; 431 const char* comma = ", ";
432 buffer[0] = 0; 432 buffer[0] = 0;
433 uint32_t set_depends_on = 0; 433 uint32_t set_depends_on = 0;
434 uint32_t set_changes = 0; 434 uint32_t set_changes = 0;
435 for (int bit = 0; bit < kLastFlag; ++bit) { 435 for (int bit = 0; bit < kLastFlag; ++bit) {
436 if ((flags.ToIntegral() & (1 << bit)) != 0) { 436 if (flags.Contains(static_cast<GVNFlag>(bit))) {
437 if (bit % 2 == 0) { 437 if (bit % 2 == 0) {
438 set_changes++; 438 set_changes++;
439 } else { 439 } else {
440 set_depends_on++; 440 set_depends_on++;
441 } 441 }
442 } 442 }
443 } 443 }
444 bool positive_changes = set_changes < (kLastFlag / 2); 444 bool positive_changes = set_changes < (kLastFlag / 2);
445 bool positive_depends_on = set_depends_on < (kLastFlag / 2); 445 bool positive_depends_on = set_depends_on < (kLastFlag / 2);
446 if (set_changes > 0) { 446 if (set_changes > 0) {
447 if (positive_changes) { 447 if (positive_changes) {
448 offset += OS::SNPrintF(buffer + offset, "changes ["); 448 offset += OS::SNPrintF(buffer + offset, "changes [");
449 } else { 449 } else {
450 offset += OS::SNPrintF(buffer + offset, "changes all except ["); 450 offset += OS::SNPrintF(buffer + offset, "changes all except [");
451 } 451 }
452 for (int bit = 0; bit < kLastFlag; ++bit) { 452 for (int bit = 0; bit < kLastFlag; ++bit) {
453 if (((flags.ToIntegral() & (1 << bit)) != 0) == positive_changes) { 453 if (flags.Contains(static_cast<GVNFlag>(bit)) == positive_changes) {
454 switch (static_cast<GVNFlag>(bit)) { 454 switch (static_cast<GVNFlag>(bit)) {
455 #define DECLARE_FLAG(type) \ 455 #define DECLARE_FLAG(type) \
456 case kChanges##type: \ 456 case kChanges##type: \
457 offset += OS::SNPrintF(buffer + offset, separator); \ 457 offset += OS::SNPrintF(buffer + offset, separator); \
458 offset += OS::SNPrintF(buffer + offset, #type); \ 458 offset += OS::SNPrintF(buffer + offset, #type); \
459 separator = comma; \ 459 separator = comma; \
460 break; 460 break;
461 GVN_TRACKED_FLAG_LIST(DECLARE_FLAG) 461 GVN_TRACKED_FLAG_LIST(DECLARE_FLAG)
462 GVN_UNTRACKED_FLAG_LIST(DECLARE_FLAG) 462 GVN_UNTRACKED_FLAG_LIST(DECLARE_FLAG)
463 #undef DECLARE_FLAG 463 #undef DECLARE_FLAG
464 default: 464 default:
465 break; 465 break;
466 } 466 }
467 } 467 }
468 } 468 }
469 offset += OS::SNPrintF(buffer + offset, "]"); 469 offset += OS::SNPrintF(buffer + offset, "]");
470 } 470 }
471 if (set_depends_on > 0) { 471 if (set_depends_on > 0) {
472 separator = ""; 472 separator = "";
473 if (set_changes > 0) { 473 if (set_changes > 0) {
474 offset += OS::SNPrintF(buffer + offset, ", "); 474 offset += OS::SNPrintF(buffer + offset, ", ");
475 } 475 }
476 if (positive_depends_on) { 476 if (positive_depends_on) {
477 offset += OS::SNPrintF(buffer + offset, "depends on ["); 477 offset += OS::SNPrintF(buffer + offset, "depends on [");
478 } else { 478 } else {
479 offset += OS::SNPrintF(buffer + offset, "depends on all except ["); 479 offset += OS::SNPrintF(buffer + offset, "depends on all except [");
480 } 480 }
481 for (int bit = 0; bit < kLastFlag; ++bit) { 481 for (int bit = 0; bit < kLastFlag; ++bit) {
482 if (((flags.ToIntegral() & (1 << bit)) != 0) == positive_depends_on) { 482 if (flags.Contains(static_cast<GVNFlag>(bit)) == positive_depends_on) {
483 switch (static_cast<GVNFlag>(bit)) { 483 switch (static_cast<GVNFlag>(bit)) {
484 #define DECLARE_FLAG(type) \ 484 #define DECLARE_FLAG(type) \
485 case kDependsOn##type: \ 485 case kDependsOn##type: \
486 offset += OS::SNPrintF(buffer + offset, separator); \ 486 offset += OS::SNPrintF(buffer + offset, separator); \
487 offset += OS::SNPrintF(buffer + offset, #type); \ 487 offset += OS::SNPrintF(buffer + offset, #type); \
488 separator = comma; \ 488 separator = comma; \
489 break; 489 break;
490 GVN_TRACKED_FLAG_LIST(DECLARE_FLAG) 490 GVN_TRACKED_FLAG_LIST(DECLARE_FLAG)
491 GVN_UNTRACKED_FLAG_LIST(DECLARE_FLAG) 491 GVN_UNTRACKED_FLAG_LIST(DECLARE_FLAG)
492 #undef DECLARE_FLAG 492 #undef DECLARE_FLAG
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 dominated); 844 dominated);
845 successor_map->Kill(side_effects_on_all_paths); 845 successor_map->Kill(side_effects_on_all_paths);
846 successor_dominators->Kill(side_effects_on_all_paths); 846 successor_dominators->Kill(side_effects_on_all_paths);
847 } 847 }
848 } 848 }
849 current = next; 849 current = next;
850 } 850 }
851 } 851 }
852 852
853 } } // namespace v8::internal 853 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698