OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 #include "src/utils.h" | 5 #include "src/utils.h" |
6 | 6 |
7 #include <stdarg.h> | 7 #include <stdarg.h> |
8 #include <sys/stat.h> | 8 #include <sys/stat.h> |
9 | 9 |
10 #include "src/base/functional.h" | 10 #include "src/base/functional.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 buffer_[position_] = '\0'; | 70 buffer_[position_] = '\0'; |
71 // Make sure nobody managed to add a 0-character to the | 71 // Make sure nobody managed to add a 0-character to the |
72 // buffer while building the string. | 72 // buffer while building the string. |
73 DCHECK(strlen(buffer_.start()) == static_cast<size_t>(position_)); | 73 DCHECK(strlen(buffer_.start()) == static_cast<size_t>(position_)); |
74 position_ = -1; | 74 position_ = -1; |
75 DCHECK(is_finalized()); | 75 DCHECK(is_finalized()); |
76 return buffer_.start(); | 76 return buffer_.start(); |
77 } | 77 } |
78 | 78 |
79 | 79 |
| 80 std::ostream& operator<<(std::ostream& os, FeedbackVectorSlot slot) { |
| 81 return os << "#" << slot.id_; |
| 82 } |
| 83 |
| 84 |
80 size_t hash_value(BailoutId id) { | 85 size_t hash_value(BailoutId id) { |
81 base::hash<int> h; | 86 base::hash<int> h; |
82 return h(id.id_); | 87 return h(id.id_); |
83 } | 88 } |
84 | 89 |
85 | 90 |
86 std::ostream& operator<<(std::ostream& os, BailoutId id) { | 91 std::ostream& operator<<(std::ostream& os, BailoutId id) { |
87 return os << id.id_; | 92 return os << id.id_; |
88 } | 93 } |
89 | 94 |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 if (u.bits.exp == 0) { | 434 if (u.bits.exp == 0) { |
430 // Detect +0, and -0 for IEEE double precision floating point. | 435 // Detect +0, and -0 for IEEE double precision floating point. |
431 if ((u.bits.man_low | u.bits.man_high) == 0) return false; | 436 if ((u.bits.man_low | u.bits.man_high) == 0) return false; |
432 } | 437 } |
433 return true; | 438 return true; |
434 } | 439 } |
435 | 440 |
436 | 441 |
437 } // namespace internal | 442 } // namespace internal |
438 } // namespace v8 | 443 } // namespace v8 |
OLD | NEW |