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

Unified Diff: src/codegen.cc

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs.cc ('k') | src/compilation-cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen.cc
diff --git a/src/codegen.cc b/src/codegen.cc
index 93ae30796296dcc0b8774c1ceeb5ee049b28a852..651535dc1e785f2e76c61a75fcf6cb216382fb5c 100644
--- a/src/codegen.cc
+++ b/src/codegen.cc
@@ -147,11 +147,12 @@ Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm,
void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
#ifdef ENABLE_DISASSEMBLER
AllowDeferredHandleDereference allow_deference_for_print_code;
- bool print_code = info->isolate()->bootstrapper()->IsActive()
- ? FLAG_print_builtin_code
- : (FLAG_print_code ||
- (info->IsStub() && FLAG_print_code_stubs) ||
- (info->IsOptimizing() && FLAG_print_opt_code));
+ Isolate* isolate = info->isolate();
+ bool print_code =
+ isolate->bootstrapper()->IsActive()
+ ? FLAG_print_builtin_code
+ : (FLAG_print_code || (info->IsStub() && FLAG_print_code_stubs) ||
+ (info->IsOptimizing() && FLAG_print_opt_code));
if (print_code) {
base::SmartArrayPointer<char> debug_name = info->GetDebugName();
CodeTracer::Scope tracing_scope(info->isolate()->GetCodeTracer());
@@ -164,7 +165,8 @@ void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
if (print_source) {
Handle<SharedFunctionInfo> shared = info->shared_info();
Handle<Script> script = info->script();
- if (!script->IsUndefined() && !script->source()->IsUndefined()) {
+ if (!script->IsUndefined(isolate) &&
+ !script->source()->IsUndefined(isolate)) {
os << "--- Raw source ---\n";
StringCharacterStream stream(String::cast(script->source()),
shared->start_position());
« no previous file with comments | « src/code-stubs.cc ('k') | src/compilation-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698