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

Unified Diff: src/objects-printer.cc

Issue 1552473002: Revert of [runtime] Introduce dedicated JSBoundFunction to represent bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@FunctionConstructor
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | src/profiler/heap-snapshot-generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index db716505deabb8ed8fe66e9e855ababe06935e22..27dbdd1d623d3748270bd035c43603b3e406ab98 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -109,9 +109,6 @@
break;
case JS_MODULE_TYPE:
JSModule::cast(this)->JSModulePrint(os);
- break;
- case JS_BOUND_FUNCTION_TYPE:
- JSBoundFunction::cast(this)->JSBoundFunctionPrint(os);
break;
case JS_FUNCTION_TYPE:
JSFunction::cast(this)->JSFunctionPrint(os);
@@ -847,15 +844,6 @@
}
-void JSBoundFunction::JSBoundFunctionPrint(std::ostream& os) { // NOLINT
- JSObjectPrintHeader(os, this, "JSBoundFunction");
- os << "\n - bound_target_function = " << Brief(bound_target_function());
- os << "\n - bound_this = " << Brief(bound_this());
- os << "\n - bound_arguments = " << Brief(bound_arguments());
- JSObjectPrintBody(os, this);
-}
-
-
void JSFunction::JSFunctionPrint(std::ostream& os) { // NOLINT
JSObjectPrintHeader(os, this, "Function");
os << "\n - initial_map = ";
@@ -866,7 +854,11 @@
os << "\n - generator";
}
os << "\n - context = " << Brief(context());
- os << "\n - literals = " << Brief(literals());
+ if (shared()->bound()) {
+ os << "\n - bindings = " << Brief(function_bindings());
+ } else {
+ os << "\n - literals = " << Brief(literals());
+ }
os << "\n - code = " << Brief(code());
JSObjectPrintBody(os, this);
}
« no previous file with comments | « src/objects-inl.h ('k') | src/profiler/heap-snapshot-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698