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

Side by Side Diff: test/mjsunit/debug-evaluate-locals-optimized-double.js

Issue 9124004: Backport hash collision workaround to 3.6. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.6/
Patch Set: Created 8 years, 11 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 for (var i = 0; i < exec_state.frameCount(); i++) { 44 for (var i = 0; i < exec_state.frameCount(); i++) {
45 var frame = exec_state.frame(i); 45 var frame = exec_state.frame(i);
46 if (i < exec_state.frameCount() - 1) { 46 if (i < exec_state.frameCount() - 1) {
47 var expected_a = i * 2 + 1 + (i * 2 + 1) / 100; 47 var expected_a = i * 2 + 1 + (i * 2 + 1) / 100;
48 var expected_b = i * 2 + 2 + (i * 2 + 2) / 100; 48 var expected_b = i * 2 + 2 + (i * 2 + 2) / 100;
49 var expected_x = (i + 1) * 2 + 1 + ((i + 1) * 2 + 1) / 100; 49 var expected_x = (i + 1) * 2 + 1 + ((i + 1) * 2 + 1) / 100;
50 var expected_y = (i + 1) * 2 + 2 + ((i + 1) * 2 + 2) / 100; 50 var expected_y = (i + 1) * 2 + 2 + ((i + 1) * 2 + 2) / 100;
51 51
52 // All frames except the bottom one has normal variables a and b. 52 // All frames except the bottom one has normal variables a and b.
53 assertEquals('a', frame.localName(0)); 53 var a = ('a' === frame.localName(0)) ? 0 : 1;
54 assertEquals('b', frame.localName(1)); 54 var b = 1 - a;
55 assertEquals(expected_a, frame.localValue(0).value()); 55 assertEquals('a', frame.localName(a));
56 assertEquals(expected_b, frame.localValue(1).value()); 56 assertEquals('b', frame.localName(b));
57 assertEquals(expected_a, frame.localValue(a).value());
58 assertEquals(expected_b, frame.localValue(b).value());
57 59
58 // All frames except the bottom one has arguments variables x and y. 60 // All frames except the bottom one has arguments variables x and y.
59 assertEquals('x', frame.argumentName(0)); 61 assertEquals('x', frame.argumentName(0));
60 assertEquals('y', frame.argumentName(1)); 62 assertEquals('y', frame.argumentName(1));
61 assertEquals(expected_x, frame.argumentValue(0).value()); 63 assertEquals(expected_x, frame.argumentValue(0).value());
62 assertEquals(expected_y, frame.argumentValue(1).value()); 64 assertEquals(expected_y, frame.argumentValue(1).value());
63 65
64 // All frames except the bottom one have two scopes. 66 // All frames except the bottom one have two scopes.
65 assertEquals(2, frame.scopeCount()); 67 assertEquals(2, frame.scopeCount());
66 assertEquals(debug.ScopeType.Local, frame.scope(0).scopeType()); 68 assertEquals(debug.ScopeType.Local, frame.scope(0).scopeType());
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // Test calling f normally and as a constructor. 176 // Test calling f normally and as a constructor.
175 f(11.11, 12.12); 177 f(11.11, 12.12);
176 testingConstructCall = true; 178 testingConstructCall = true;
177 new f(11.11, 12.12); 179 new f(11.11, 12.12);
178 180
179 // Make sure that the debug event listener vas invoked. 181 // Make sure that the debug event listener vas invoked.
180 assertFalse(exception, "exception in listener " + exception) 182 assertFalse(exception, "exception in listener " + exception)
181 assertTrue(listenerComplete); 183 assertTrue(listenerComplete);
182 184
183 Debug.setListener(null); 185 Debug.setListener(null);
OLDNEW
« src/objects.h ('K') | « test/mjsunit/debug-evaluate-locals-optimized.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698