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

Side by Side Diff: src/tracing/traced-value.cc

Issue 2557463003: [Tracing] Remove AppendLongInteger in TracedValue. (Closed)
Patch Set: Address alph's comment Created 4 years 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
« no previous file with comments | « src/tracing/traced-value.h ('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 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
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
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
OLDNEW
« no previous file with comments | « src/tracing/traced-value.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698