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

Side by Side Diff: src/utils.h

Issue 7754022: Fix presubmit errors caused by updated depot tools (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 3 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 | « src/string-stream.h ('k') | src/v8threads.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 void AddDecimalInteger(int value); 883 void AddDecimalInteger(int value);
884 884
885 // Finalize the string by 0-terminating it and returning the buffer. 885 // Finalize the string by 0-terminating it and returning the buffer.
886 char* Finalize(); 886 char* Finalize();
887 887
888 protected: 888 protected:
889 Vector<char> buffer_; 889 Vector<char> buffer_;
890 int position_; 890 int position_;
891 891
892 bool is_finalized() const { return position_ < 0; } 892 bool is_finalized() const { return position_ < 0; }
893
893 private: 894 private:
894 DISALLOW_IMPLICIT_CONSTRUCTORS(SimpleStringBuilder); 895 DISALLOW_IMPLICIT_CONSTRUCTORS(SimpleStringBuilder);
895 }; 896 };
896 897
897 898
898 // A poor man's version of STL's bitset: A bit set of enums E (without explicit 899 // A poor man's version of STL's bitset: A bit set of enums E (without explicit
899 // values), fitting into an integral type T. 900 // values), fitting into an integral type T.
900 template <class E, class T = int> 901 template <class E, class T = int>
901 class EnumSet { 902 class EnumSet {
902 public: 903 public:
(...skipping 11 matching lines...) Expand all
914 ASSERT(element < static_cast<int>(sizeof(T) * CHAR_BIT)); 915 ASSERT(element < static_cast<int>(sizeof(T) * CHAR_BIT));
915 return 1 << element; 916 return 1 << element;
916 } 917 }
917 918
918 T bits_; 919 T bits_;
919 }; 920 };
920 921
921 } } // namespace v8::internal 922 } } // namespace v8::internal
922 923
923 #endif // V8_UTILS_H_ 924 #endif // V8_UTILS_H_
OLDNEW
« no previous file with comments | « src/string-stream.h ('k') | src/v8threads.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698