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

Side by Side Diff: src/objects.cc

Issue 2970443003: Print missing builtin names when using a snapshot. (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « no previous file | src/snapshot/deserializer.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 14256 matching lines...) Expand 10 before | Expand all | Expand 10 after
14267 DCHECK(CodeStub::GetMajorKey(this) == CodeStub::CompareIC); 14267 DCHECK(CodeStub::GetMajorKey(this) == CodeStub::CompareIC);
14268 CompareICStub stub(stub_key(), GetIsolate()); 14268 CompareICStub stub(stub_key(), GetIsolate());
14269 os << "compare_state = " << CompareICState::GetStateName(stub.left()) 14269 os << "compare_state = " << CompareICState::GetStateName(stub.left())
14270 << "*" << CompareICState::GetStateName(stub.right()) << " -> " 14270 << "*" << CompareICState::GetStateName(stub.right()) << " -> "
14271 << CompareICState::GetStateName(stub.state()) << "\n"; 14271 << CompareICState::GetStateName(stub.state()) << "\n";
14272 os << "compare_operation = " << Token::Name(stub.op()) << "\n"; 14272 os << "compare_operation = " << Token::Name(stub.op()) << "\n";
14273 } 14273 }
14274 } 14274 }
14275 if ((name != nullptr) && (name[0] != '\0')) { 14275 if ((name != nullptr) && (name[0] != '\0')) {
14276 os << "name = " << name << "\n"; 14276 os << "name = " << name << "\n";
14277 } else if (kind() == BUILTIN) {
14278 name = GetIsolate()->builtins()->Lookup(instruction_start());
14279 if (name != nullptr) {
14280 os << "name = " << name << "\n";
14281 }
14282 } else if (kind() == BYTECODE_HANDLER) { 14277 } else if (kind() == BYTECODE_HANDLER) {
14283 name = GetIsolate()->interpreter()->LookupNameOfBytecodeHandler(this); 14278 name = GetIsolate()->interpreter()->LookupNameOfBytecodeHandler(this);
14284 if (name != nullptr) { 14279 if (name != nullptr) {
14285 os << "name = " << name << "\n"; 14280 os << "name = " << name << "\n";
14286 } 14281 }
14282 } else {
14283 // There are some handlers and ICs that we can also find names for with
14284 // Builtins::Lookup.
14285 name = GetIsolate()->builtins()->Lookup(instruction_start());
14286 if (name != nullptr) {
14287 os << "name = " << name << "\n";
14288 }
14287 } 14289 }
14288 if (kind() == OPTIMIZED_FUNCTION) { 14290 if (kind() == OPTIMIZED_FUNCTION) {
14289 os << "stack_slots = " << stack_slots() << "\n"; 14291 os << "stack_slots = " << stack_slots() << "\n";
14290 } 14292 }
14291 os << "compiler = " << (is_turbofanned() 14293 os << "compiler = " << (is_turbofanned()
14292 ? "turbofan" 14294 ? "turbofan"
14293 : is_crankshafted() ? "crankshaft" 14295 : is_crankshafted() ? "crankshaft"
14294 : kind() == Code::FUNCTION 14296 : kind() == Code::FUNCTION
14295 ? "full-codegen" 14297 ? "full-codegen"
14296 : "unknown") << "\n"; 14298 : "unknown") << "\n";
(...skipping 5869 matching lines...) Expand 10 before | Expand all | Expand 10 after
20166 // not 20168 // not
20167 // depend on this. 20169 // depend on this.
20168 return DICTIONARY_ELEMENTS; 20170 return DICTIONARY_ELEMENTS;
20169 } 20171 }
20170 DCHECK_LE(kind, LAST_ELEMENTS_KIND); 20172 DCHECK_LE(kind, LAST_ELEMENTS_KIND);
20171 return kind; 20173 return kind;
20172 } 20174 }
20173 } 20175 }
20174 } // namespace internal 20176 } // namespace internal
20175 } // namespace v8 20177 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/snapshot/deserializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698