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

Side by Side Diff: src/runtime/runtime-debug.cc

Issue 1484723003: [runtime] Use "the hole" instead of smi 0 as sentinel for context extension. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 years 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
« no previous file with comments | « src/profiler/heap-snapshot-generator.cc ('k') | src/runtime/runtime-scopes.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/debug/debug-evaluate.h" 9 #include "src/debug/debug-evaluate.h"
10 #include "src/debug/debug-frames.h" 10 #include "src/debug/debug-frames.h"
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 // Check the execution state and decode arguments frame and source to be 1273 // Check the execution state and decode arguments frame and source to be
1274 // evaluated. 1274 // evaluated.
1275 DCHECK(args.length() == 6); 1275 DCHECK(args.length() == 6);
1276 CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]); 1276 CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
1277 RUNTIME_ASSERT(isolate->debug()->CheckExecutionState(break_id)); 1277 RUNTIME_ASSERT(isolate->debug()->CheckExecutionState(break_id));
1278 1278
1279 CONVERT_SMI_ARG_CHECKED(wrapped_id, 1); 1279 CONVERT_SMI_ARG_CHECKED(wrapped_id, 1);
1280 CONVERT_NUMBER_CHECKED(int, inlined_jsframe_index, Int32, args[2]); 1280 CONVERT_NUMBER_CHECKED(int, inlined_jsframe_index, Int32, args[2]);
1281 CONVERT_ARG_HANDLE_CHECKED(String, source, 3); 1281 CONVERT_ARG_HANDLE_CHECKED(String, source, 3);
1282 CONVERT_BOOLEAN_ARG_CHECKED(disable_break, 4); 1282 CONVERT_BOOLEAN_ARG_CHECKED(disable_break, 4);
1283 CONVERT_ARG_HANDLE_CHECKED(Object, context_extension, 5); 1283 CONVERT_ARG_HANDLE_CHECKED(HeapObject, context_extension, 5);
1284 1284
1285 StackFrame::Id id = DebugFrameHelper::UnwrapFrameId(wrapped_id); 1285 StackFrame::Id id = DebugFrameHelper::UnwrapFrameId(wrapped_id);
1286 1286
1287 Handle<Object> result; 1287 Handle<Object> result;
1288 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 1288 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
1289 isolate, result, 1289 isolate, result,
1290 DebugEvaluate::Local(isolate, id, inlined_jsframe_index, source, 1290 DebugEvaluate::Local(isolate, id, inlined_jsframe_index, source,
1291 disable_break, context_extension)); 1291 disable_break, context_extension));
1292 return *result; 1292 return *result;
1293 } 1293 }
1294 1294
1295 1295
1296 RUNTIME_FUNCTION(Runtime_DebugEvaluateGlobal) { 1296 RUNTIME_FUNCTION(Runtime_DebugEvaluateGlobal) {
1297 HandleScope scope(isolate); 1297 HandleScope scope(isolate);
1298 1298
1299 // Check the execution state and decode arguments frame and source to be 1299 // Check the execution state and decode arguments frame and source to be
1300 // evaluated. 1300 // evaluated.
1301 DCHECK(args.length() == 4); 1301 DCHECK(args.length() == 4);
1302 CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]); 1302 CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
1303 RUNTIME_ASSERT(isolate->debug()->CheckExecutionState(break_id)); 1303 RUNTIME_ASSERT(isolate->debug()->CheckExecutionState(break_id));
1304 1304
1305 CONVERT_ARG_HANDLE_CHECKED(String, source, 1); 1305 CONVERT_ARG_HANDLE_CHECKED(String, source, 1);
1306 CONVERT_BOOLEAN_ARG_CHECKED(disable_break, 2); 1306 CONVERT_BOOLEAN_ARG_CHECKED(disable_break, 2);
1307 CONVERT_ARG_HANDLE_CHECKED(Object, context_extension, 3); 1307 CONVERT_ARG_HANDLE_CHECKED(HeapObject, context_extension, 3);
1308 1308
1309 Handle<Object> result; 1309 Handle<Object> result;
1310 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 1310 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
1311 isolate, result, 1311 isolate, result,
1312 DebugEvaluate::Global(isolate, source, disable_break, context_extension)); 1312 DebugEvaluate::Global(isolate, source, disable_break, context_extension));
1313 return *result; 1313 return *result;
1314 } 1314 }
1315 1315
1316 1316
1317 RUNTIME_FUNCTION(Runtime_DebugGetLoadedScripts) { 1317 RUNTIME_FUNCTION(Runtime_DebugGetLoadedScripts) {
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1711 return *isolate->factory()->undefined_value(); 1711 return *isolate->factory()->undefined_value();
1712 } 1712 }
1713 1713
1714 1714
1715 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { 1715 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) {
1716 UNIMPLEMENTED(); 1716 UNIMPLEMENTED();
1717 return NULL; 1717 return NULL;
1718 } 1718 }
1719 } // namespace internal 1719 } // namespace internal
1720 } // namespace v8 1720 } // namespace v8
OLDNEW
« no previous file with comments | « src/profiler/heap-snapshot-generator.cc ('k') | src/runtime/runtime-scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698