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

Side by Side Diff: src/utils.h

Issue 2601: Fixed build problem on mac, lint issues and a test failure on win32. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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/platform-win32.cc ('k') | 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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 321
322 // Factory method for creating empty vectors. 322 // Factory method for creating empty vectors.
323 static Vector<T> empty() { return Vector<T>(NULL, 0); } 323 static Vector<T> empty() { return Vector<T>(NULL, 0); }
324 324
325 private: 325 private:
326 T* start_; 326 T* start_;
327 int length_; 327 int length_;
328 }; 328 };
329 329
330 330
331 template <typename T, int size> 331 template <typename T, int kSize>
332 class EmbeddedVector : public Vector<T> { 332 class EmbeddedVector : public Vector<T> {
333 public: 333 public:
334 EmbeddedVector() : Vector<T>(buffer_, size) { } 334 EmbeddedVector() : Vector<T>(buffer_, kSize) { }
335 private: 335 private:
336 T buffer_[size]; 336 T buffer_[kSize];
337 }; 337 };
338 338
339 339
340 inline Vector<const char> CStrVector(const char* data) { 340 inline Vector<const char> CStrVector(const char* data) {
341 return Vector<const char>(data, strlen(data)); 341 return Vector<const char>(data, strlen(data));
342 } 342 }
343 343
344 inline Vector<char> MutableCStrVector(char* data) { 344 inline Vector<char> MutableCStrVector(char* data) {
345 return Vector<char>(data, strlen(data)); 345 return Vector<char>(data, strlen(data));
346 } 346 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 int position_; 439 int position_;
440 440
441 bool is_finalized() const { return position_ < 0; } 441 bool is_finalized() const { return position_ < 0; }
442 442
443 DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder); 443 DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder);
444 }; 444 };
445 445
446 } } // namespace v8::internal 446 } } // namespace v8::internal
447 447
448 #endif // V8_UTILS_H_ 448 #endif // V8_UTILS_H_
OLDNEW
« no previous file with comments | « src/platform-win32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698