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

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

Issue 1804783002: Remove Scope::scope_contains_with_ bit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix scope names and GCC build Created 4 years, 9 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
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 function f() { 83 function f() {
84 var a = 5; 84 var a = 5;
85 var b = 0; 85 var b = 0;
86 with ({b:6}) { 86 with ({b:6}) {
87 return g(); 87 return g();
88 } 88 }
89 } 89 }
90 90
91 function checkFrame2(frame) { 91 function checkFrame2(frame) {
92 // Frame 2 (f) has normal variables a and b (and arguments). 92 // Frame 2 (f) has normal variables a and b.
93 var count = frame.localCount(); 93 var count = frame.localCount();
94 assertEquals(3, count); 94 assertEquals(2, count);
95 for (var i = 0; i < count; ++i) { 95 for (var i = 0; i < count; ++i) {
96 var name = frame.localName(i); 96 var name = frame.localName(i);
97 var value = frame.localValue(i).value(); 97 var value = frame.localValue(i).value();
98 if (name == 'a') { 98 if (name == 'a') {
99 assertEquals(5, value); 99 assertEquals(5, value);
100 } else if (name == 'b') { 100 } else {
101 assertEquals('b', name);
101 assertEquals(0, value); 102 assertEquals(0, value);
102 } else {
103 assertEquals('arguments', name);
104 } 103 }
105 } 104 }
106 } 105 }
107 106
108 107
109 function listener(event, exec_state, event_data, data) { 108 function listener(event, exec_state, event_data, data) {
110 try { 109 try {
111 if (event == Debug.DebugEvent.Break) 110 if (event == Debug.DebugEvent.Break)
112 { 111 {
113 checkFrame0(exec_state.frame(0)); 112 checkFrame0(exec_state.frame(0));
(...skipping 30 matching lines...) Expand all
144 // Add the debug event listener. 143 // Add the debug event listener.
145 Debug.setListener(listener); 144 Debug.setListener(listener);
146 145
147 var f_result = f(); 146 var f_result = f();
148 147
149 assertEquals(4, f_result); 148 assertEquals(4, f_result);
150 149
151 // Make sure that the debug event listener was invoked. 150 // Make sure that the debug event listener was invoked.
152 assertFalse(exception, "exception in listener") 151 assertFalse(exception, "exception in listener")
153 assertTrue(listenerComplete); 152 assertTrue(listenerComplete);
OLDNEW
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/WithStatement.golden ('k') | test/mjsunit/debug-function-scopes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698