OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 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 function inherits(childCtor, parentCtor) { | 5 function inherits(childCtor, parentCtor) { |
6 childCtor.prototype.__proto__ = parentCtor.prototype; | 6 childCtor.prototype.__proto__ = parentCtor.prototype; |
7 }; | 7 }; |
8 | 8 |
9 /** | 9 /** |
10 * A thin wrapper around shell's 'read' function showing a file name on error. | 10 * A thin wrapper around shell's 'read' function showing a file name on error. |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 IcProcessor.prototype.processFunctionMove = function(from, to) { | 161 IcProcessor.prototype.processFunctionMove = function(from, to) { |
162 this.profile_.moveFunc(from, to); | 162 this.profile_.moveFunc(from, to); |
163 }; | 163 }; |
164 | 164 |
165 IcProcessor.prototype.formatName = function(entry) { | 165 IcProcessor.prototype.formatName = function(entry) { |
166 if (!entry) return "<unknown>" | 166 if (!entry) return "<unknown>" |
167 var name = entry.func.getName(); | 167 var name = entry.func.getName(); |
168 var re = /(.*):[0-9]+:[0-9]+$/; | 168 var re = /(.*):[0-9]+:[0-9]+$/; |
169 var array = re.exec(name); | 169 var array = re.exec(name); |
170 if (!array) return name; | 170 if (!array) return name; |
171 return array[1]; | 171 return entry.getState() + array[1]; |
172 } | 172 } |
173 | 173 |
174 IcProcessor.prototype.processPropertyIC = function ( | 174 IcProcessor.prototype.processPropertyIC = function ( |
175 type, pc, line, column, old_state, new_state, map, name, modifier, | 175 type, pc, line, column, old_state, new_state, map, name, modifier, |
176 slow_reason) { | 176 slow_reason) { |
177 this[type]++; | 177 this[type]++; |
178 var entry = this.profile_.findEntry(pc); | 178 var entry = this.profile_.findEntry(pc); |
179 print(type + " (" + old_state + "->" + new_state + modifier + ") at " + | 179 print(type + " (" + old_state + "->" + new_state + modifier + ") at " + |
180 this.formatName(entry) + ":" + line + ":" + column + " " + name + | 180 this.formatName(entry) + ":" + line + ":" + column + " " + name + |
181 " (map 0x" + map.toString(16) + ")"); | 181 " (map 0x" + map.toString(16) + ")"); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 for (var synArg in this.argsDispatch_) { | 296 for (var synArg in this.argsDispatch_) { |
297 if (arg !== synArg && dispatch === this.argsDispatch_[synArg]) { | 297 if (arg !== synArg && dispatch === this.argsDispatch_[synArg]) { |
298 synonyms.push(synArg); | 298 synonyms.push(synArg); |
299 delete this.argsDispatch_[synArg]; | 299 delete this.argsDispatch_[synArg]; |
300 } | 300 } |
301 } | 301 } |
302 print(' ' + padRight(synonyms.join(', '), 20) + " " + dispatch[2]); | 302 print(' ' + padRight(synonyms.join(', '), 20) + " " + dispatch[2]); |
303 } | 303 } |
304 quit(2); | 304 quit(2); |
305 }; | 305 }; |
OLD | NEW |