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

Unified Diff: src/objects.cc

Issue 2970443003: Print missing builtin names when using a snapshot. (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/snapshot/deserializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 0a0c713314b2f0b3ea8ceedb428c78122692ccc9..bcd8e3fa79e427eb5fd8591002fbcc975e5c8dab 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -14274,13 +14274,15 @@ void Code::Disassemble(const char* name, std::ostream& os) { // NOLINT
}
if ((name != nullptr) && (name[0] != '\0')) {
os << "name = " << name << "\n";
- } else if (kind() == BUILTIN) {
- name = GetIsolate()->builtins()->Lookup(instruction_start());
+ } else if (kind() == BYTECODE_HANDLER) {
+ name = GetIsolate()->interpreter()->LookupNameOfBytecodeHandler(this);
if (name != nullptr) {
os << "name = " << name << "\n";
}
- } else if (kind() == BYTECODE_HANDLER) {
- name = GetIsolate()->interpreter()->LookupNameOfBytecodeHandler(this);
+ } else {
+ // There are some handlers and ICs that we can also find names for with
+ // Builtins::Lookup.
+ name = GetIsolate()->builtins()->Lookup(instruction_start());
if (name != nullptr) {
os << "name = " << name << "\n";
}
« 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