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

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

Issue 2419433008: Improve CodeStubAssembler assert functionality (Closed)
Patch Set: Fix memory leak Created 4 years, 2 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
« no previous file with comments | « src/code-stub-assembler.cc ('k') | no next file » | 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 <memory> 7 #include <memory>
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" 10 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 return isolate->heap()->undefined_value(); 437 return isolate->heap()->undefined_value();
438 } 438 }
439 439
440 440
441 RUNTIME_FUNCTION(Runtime_DebugPrint) { 441 RUNTIME_FUNCTION(Runtime_DebugPrint) {
442 SealHandleScope shs(isolate); 442 SealHandleScope shs(isolate);
443 DCHECK(args.length() == 1); 443 DCHECK(args.length() == 1);
444 444
445 OFStream os(stdout); 445 OFStream os(stdout);
446 #ifdef DEBUG 446 #ifdef DEBUG
447 if (args[0]->IsString()) { 447 if (args[0]->IsString() && isolate->context() != nullptr) {
448 // If we have a string, assume it's a code "marker" 448 // If we have a string, assume it's a code "marker"
449 // and print some interesting cpu debugging info. 449 // and print some interesting cpu debugging info.
450 JavaScriptFrameIterator it(isolate); 450 JavaScriptFrameIterator it(isolate);
451 JavaScriptFrame* frame = it.frame(); 451 JavaScriptFrame* frame = it.frame();
452 os << "fp = " << static_cast<void*>(frame->fp()) 452 os << "fp = " << static_cast<void*>(frame->fp())
453 << ", sp = " << static_cast<void*>(frame->sp()) 453 << ", sp = " << static_cast<void*>(frame->sp())
454 << ", caller_sp = " << static_cast<void*>(frame->caller_sp()) << ": "; 454 << ", caller_sp = " << static_cast<void*>(frame->caller_sp()) << ": ";
455 } else { 455 } else {
456 os << "DebugPrint: "; 456 os << "DebugPrint: ";
457 } 457 }
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 RUNTIME_FUNCTION(Runtime_ValidateWasmOrphanedInstance) { 794 RUNTIME_FUNCTION(Runtime_ValidateWasmOrphanedInstance) {
795 HandleScope shs(isolate); 795 HandleScope shs(isolate);
796 DCHECK(args.length() == 1); 796 DCHECK(args.length() == 1);
797 CONVERT_ARG_HANDLE_CHECKED(JSObject, instance_obj, 0); 797 CONVERT_ARG_HANDLE_CHECKED(JSObject, instance_obj, 0);
798 wasm::testing::ValidateOrphanedInstance(isolate, instance_obj); 798 wasm::testing::ValidateOrphanedInstance(isolate, instance_obj);
799 return isolate->heap()->ToBoolean(true); 799 return isolate->heap()->ToBoolean(true);
800 } 800 }
801 801
802 } // namespace internal 802 } // namespace internal
803 } // namespace v8 803 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698