Revision: 19601
Author: [email protected]
Date: Fri Feb 28 11:41:07 2014 UTC
Log: Fix JSObject::PrintTransitions.
BUG=347912
LOG=y
[email protected]
Review URL: https://codereview.chromium.org/183683005
http://code.google.com/p/v8/source/detail?r=19601
Added:
/branches/bleeding_edge/test/mjsunit/regress/regress-347912.js
Modified:
/branches/bleeding_edge/src/objects-printer.cc
=======================================
--- /dev/null
+++ /branches/bleeding_edge/test/mjsunit/regress/regress-347912.js Fri Feb
28 11:41:07 2014 UTC
@@ -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);
=======================================
--- /branches/bleeding_edge/src/objects-printer.cc Tue Feb 11 09:29:51 2014
UTC
+++ /branches/bleeding_edge/src/objects-printer.cc Fri Feb 28 11:41:07 2014
UTC
@@ -400,28 +400,39 @@
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;
}
}
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.