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
This commit is contained in:
parent
38ca2629be
commit
70242fe3bb
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
10
test/mjsunit/regress/regress-347912.js
Normal file
10
test/mjsunit/regress/regress-347912.js
Normal file
@ -0,0 +1,10 @@
|
||||
// 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);
|
Loading…
Reference in New Issue
Block a user