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

Side by Side Diff: src/unique.h

Issue 420033003: Fix 64-bit VS2010 build (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/deoptimizer.cc ('k') | test/cctest/compiler/test-branch-combine.cc » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HYDROGEN_UNIQUE_H_ 5 #ifndef V8_HYDROGEN_UNIQUE_H_
6 #define V8_HYDROGEN_UNIQUE_H_ 6 #define V8_HYDROGEN_UNIQUE_H_
7 7
8 #include "src/handles.h" 8 #include "src/handles.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 #include "src/string-stream.h" 10 #include "src/string-stream.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 const char* string_; 180 const char* string_;
181 181
182 void InitializeString(Zone* zone) { 182 void InitializeString(Zone* zone) {
183 // The stringified version of the parameter must be calculated when the 183 // The stringified version of the parameter must be calculated when the
184 // Operator is constructed to avoid accessing the heap. 184 // Operator is constructed to avoid accessing the heap.
185 HeapStringAllocator temp_allocator; 185 HeapStringAllocator temp_allocator;
186 StringStream stream(&temp_allocator); 186 StringStream stream(&temp_allocator);
187 this->handle_->ShortPrint(&stream); 187 this->handle_->ShortPrint(&stream);
188 SmartArrayPointer<const char> desc_string = stream.ToCString(); 188 SmartArrayPointer<const char> desc_string = stream.ToCString();
189 const char* desc_chars = desc_string.get(); 189 const char* desc_chars = desc_string.get();
190 int length = strlen(desc_chars); 190 int length = static_cast<int>(strlen(desc_chars));
191 char* desc_copy = zone->NewArray<char>(length + 1); 191 char* desc_copy = zone->NewArray<char>(length + 1);
192 memcpy(desc_copy, desc_chars, length + 1); 192 memcpy(desc_copy, desc_chars, length + 1);
193 string_ = desc_copy; 193 string_ = desc_copy;
194 } 194 }
195 }; 195 };
196 196
197 197
198 template <typename T> 198 template <typename T>
199 class UniqueSet V8_FINAL : public ZoneObject { 199 class UniqueSet V8_FINAL : public ZoneObject {
200 public: 200 public:
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } 404 }
405 capacity_ = new_capacity; 405 capacity_ = new_capacity;
406 array_ = new_array; 406 array_ = new_array;
407 } 407 }
408 } 408 }
409 }; 409 };
410 410
411 } } // namespace v8::internal 411 } } // namespace v8::internal
412 412
413 #endif // V8_HYDROGEN_UNIQUE_H_ 413 #endif // V8_HYDROGEN_UNIQUE_H_
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | test/cctest/compiler/test-branch-combine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698