Commit 70242fe3 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Fix JSObject::PrintTransitions.

BUG=347912
LOG=y
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/183683005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 38ca2629
......@@ -400,28 +400,39 @@ void JSObject::PrintTransitions(FILE* out) {
if (!map()->HasTransitionArray()) return;
TransitionArray* transitions = map()->transitions();
for (int i = 0; i < transitions->number_of_transitions(); i++) {
Name* key = transitions->GetKey(i);
PrintF(out, " ");
transitions->GetKey(i)->NamePrint(out);
key->NamePrint(out);
PrintF(out, ": ");
switch (transitions->GetTargetDetails(i).type()) {
case FIELD: {
PrintF(out, " (transition to field)\n");
break;
if (key == GetHeap()->frozen_symbol()) {
PrintF(out, " (transition to frozen)\n");
} else if (key == GetHeap()->elements_transition_symbol()) {
PrintF(out, " (transition to ");
PrintElementsKind(out, transitions->GetTarget(i)->elements_kind());
PrintF(out, ")\n");
} else if (key == GetHeap()->observed_symbol()) {
PrintF(out, " (transition to Object.observe)\n");
} else {
switch (transitions->GetTargetDetails(i).type()) {
case FIELD: {
PrintF(out, " (transition to field)\n");
break;
}
case CONSTANT:
PrintF(out, " (transition to constant)\n");
break;
case CALLBACKS:
PrintF(out, " (transition to callback)\n");
break;
// Values below are never in the target descriptor array.
case NORMAL:
case HANDLER:
case INTERCEPTOR:
case TRANSITION:
case NONEXISTENT:
UNREACHABLE();
break;
}
case CONSTANT:
PrintF(out, " (transition to constant)\n");
break;
case CALLBACKS:
PrintF(out, " (transition to callback)\n");
break;
// Values below are never in the target descriptor array.
case NORMAL:
case HANDLER:
case INTERCEPTOR:
case TRANSITION:
case NONEXISTENT:
UNREACHABLE();
break;
}
}
}
......
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
var __v_4 = {};
__v_2 = {};
__v_2[1024] = 0;
%DebugPrint(__v_4);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment