| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/tracing/traced-value.h" | 5 #include "src/tracing/traced-value.h" |
| 6 | 6 |
| 7 #include "src/base/platform/platform.h" | 7 #include "src/base/platform/platform.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace tracing { | 10 namespace tracing { |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 data_ += '['; | 114 data_ += '['; |
| 115 first_item_ = true; | 115 first_item_ = true; |
| 116 } | 116 } |
| 117 | 117 |
| 118 void TracedValue::AppendInteger(int value) { | 118 void TracedValue::AppendInteger(int value) { |
| 119 DCHECK_CURRENT_CONTAINER_IS(kStackTypeArray); | 119 DCHECK_CURRENT_CONTAINER_IS(kStackTypeArray); |
| 120 WriteComma(); | 120 WriteComma(); |
| 121 data_ += std::to_string(value); | 121 data_ += std::to_string(value); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void TracedValue::AppendLongInteger(int64_t value) { | |
| 125 DCHECK_CURRENT_CONTAINER_IS(kStackTypeArray); | |
| 126 WriteComma(); | |
| 127 data_ += std::to_string(value); | |
| 128 } | |
| 129 | |
| 130 void TracedValue::AppendDouble(double value) { | 124 void TracedValue::AppendDouble(double value) { |
| 131 DCHECK_CURRENT_CONTAINER_IS(kStackTypeArray); | 125 DCHECK_CURRENT_CONTAINER_IS(kStackTypeArray); |
| 132 WriteComma(); | 126 WriteComma(); |
| 133 data_ += std::to_string(value); | 127 data_ += std::to_string(value); |
| 134 } | 128 } |
| 135 | 129 |
| 136 void TracedValue::AppendBoolean(bool value) { | 130 void TracedValue::AppendBoolean(bool value) { |
| 137 DCHECK_CURRENT_CONTAINER_IS(kStackTypeArray); | 131 DCHECK_CURRENT_CONTAINER_IS(kStackTypeArray); |
| 138 WriteComma(); | 132 WriteComma(); |
| 139 data_ += value ? "true" : "false"; | 133 data_ += value ? "true" : "false"; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 } | 185 } |
| 192 | 186 |
| 193 void TracedValue::AppendAsTraceFormat(std::string* out) const { | 187 void TracedValue::AppendAsTraceFormat(std::string* out) const { |
| 194 *out += '{'; | 188 *out += '{'; |
| 195 *out += data_; | 189 *out += data_; |
| 196 *out += '}'; | 190 *out += '}'; |
| 197 } | 191 } |
| 198 | 192 |
| 199 } // namespace tracing | 193 } // namespace tracing |
| 200 } // namespace v8 | 194 } // namespace v8 |
| OLD | NEW |