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

Unified Diff: src/objects-printer.cc

Issue 776143005: Optimize Object.seal and Object.preventExtensions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add nonextensible and sealed as special transitions Created 6 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/runtime/runtime.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 58d446be62c397dba79040ce8d223d99ff79443f..fb40a4fa517761a6850537182a855e4694cea33e 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -416,11 +416,7 @@ void Map::MapPrint(std::ostream& os) { // NOLINT
if (is_undetectable()) os << " - undetectable\n";
if (has_instance_call_handler()) os << " - instance_call_handler\n";
if (is_access_check_needed()) os << " - access_check_needed\n";
- if (is_frozen()) {
- os << " - frozen\n";
- } else if (!is_extensible()) {
- os << " - sealed\n";
- }
+ if (!is_extensible()) os << " - non-extensible\n";
os << " - back pointer: " << Brief(GetBackPointer());
os << "\n - instance descriptors " << (owns_descriptors() ? "(own) " : "")
<< "#" << NumberOfOwnDescriptors() << ": "
@@ -1179,7 +1175,11 @@ void TransitionArray::PrintTransitions(std::ostream& os,
key->ShortPrint(os);
#endif
os << ": ";
- if (key == GetHeap()->frozen_symbol()) {
+ if (key == GetHeap()->nonextensible_symbol()) {
+ os << " (transition to non-extensible)";
+ } else if (key == GetHeap()->sealed_symbol()) {
+ os << " (transition to sealed)";
+ } else if (key == GetHeap()->frozen_symbol()) {
os << " (transition to frozen)";
} else if (key == GetHeap()->elements_transition_symbol()) {
os << " (transition to " << ElementsKindToString(target->elements_kind())
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698