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

Side by Side Diff: src/types.cc

Issue 18899003: Use static_cast instead of reinterpret_cast (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « 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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 for (unsigned i = 0; i < sizeof(val)*8; ++i) { 508 for (unsigned i = 0; i < sizeof(val)*8; ++i) {
509 int mask = (1 << i); 509 int mask = (1 << i);
510 if ((val & mask) != 0) { 510 if ((val & mask) != 0) {
511 if (!first_entry) PrintF(out, ","); 511 if (!first_entry) PrintF(out, ",");
512 first_entry = false; 512 first_entry = false;
513 PrintF(out, "%s", GetPrimitiveName(mask)); 513 PrintF(out, "%s", GetPrimitiveName(mask));
514 } 514 }
515 } 515 }
516 PrintF(out, "}"); 516 PrintF(out, "}");
517 } else if (is_constant()) { 517 } else if (is_constant()) {
518 PrintF(out, "Constant(%p)", reinterpret_cast<void*>(*as_constant())); 518 PrintF(out, "Constant(%p)", static_cast<void*>(*as_constant()));
519 } else if (is_class()) { 519 } else if (is_class()) {
520 PrintF(out, "Class(%p)", reinterpret_cast<void*>(*as_class())); 520 PrintF(out, "Class(%p)", static_cast<void*>(*as_class()));
521 } else if (is_union()) { 521 } else if (is_union()) {
522 PrintF(out, "{"); 522 PrintF(out, "{");
523 Handle<Unioned> unioned = as_union(); 523 Handle<Unioned> unioned = as_union();
524 for (int i = 0; i < unioned->length(); ++i) { 524 for (int i = 0; i < unioned->length(); ++i) {
525 Handle<Type> type_i = union_get(unioned, i); 525 Handle<Type> type_i = union_get(unioned, i);
526 if (i > 0) PrintF(out, ","); 526 if (i > 0) PrintF(out, ",");
527 type_i->TypePrint(out); 527 type_i->TypePrint(out);
528 } 528 }
529 PrintF(out, "}"); 529 PrintF(out, "}");
530 } 530 }
531 } 531 }
532 #endif 532 #endif
533 533
534 534
535 } } // namespace v8::internal 535 } } // 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