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

Side by Side Diff: src/compiler/pipeline.cc

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: reducing old cmpare patterns 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 unified diff | Download patch
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/compiler/pipeline.h" 5 #include "src/compiler/pipeline.h"
6 6
7 #include <fstream> // NOLINT(readability/streams) 7 #include <fstream> // NOLINT(readability/streams)
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/base/adapters.h" 10 #include "src/base/adapters.h"
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 pipeline_statistics->BeginPhaseKind("initializing"); 527 pipeline_statistics->BeginPhaseKind("initializing");
528 } 528 }
529 529
530 if (FLAG_trace_turbo) { 530 if (FLAG_trace_turbo) {
531 TurboJsonFile json_of(info, std::ios_base::trunc); 531 TurboJsonFile json_of(info, std::ios_base::trunc);
532 Handle<Script> script = info->script(); 532 Handle<Script> script = info->script();
533 base::SmartArrayPointer<char> function_name = info->GetDebugName(); 533 base::SmartArrayPointer<char> function_name = info->GetDebugName();
534 int pos = info->shared_info()->start_position(); 534 int pos = info->shared_info()->start_position();
535 json_of << "{\"function\":\"" << function_name.get() 535 json_of << "{\"function\":\"" << function_name.get()
536 << "\", \"sourcePosition\":" << pos << ", \"source\":\""; 536 << "\", \"sourcePosition\":" << pos << ", \"source\":\"";
537 if (!script->IsUndefined() && !script->source()->IsUndefined()) { 537 Isolate* isolate = script->GetIsolate();
538 if (!script->IsUndefined(isolate) &&
539 !script->source()->IsUndefined(isolate)) {
538 DisallowHeapAllocation no_allocation; 540 DisallowHeapAllocation no_allocation;
539 int start = info->shared_info()->start_position(); 541 int start = info->shared_info()->start_position();
540 int len = info->shared_info()->end_position() - start; 542 int len = info->shared_info()->end_position() - start;
541 String::SubStringRange source(String::cast(script->source()), start, len); 543 String::SubStringRange source(String::cast(script->source()), start, len);
542 for (const auto& c : source) { 544 for (const auto& c : source) {
543 json_of << AsEscapedUC16ForJSON(c); 545 json_of << AsEscapedUC16ForJSON(c);
544 } 546 }
545 } 547 }
546 json_of << "\",\n\"phases\":["; 548 json_of << "\",\n\"phases\":[";
547 } 549 }
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 data->DeleteRegisterAllocationZone(); 1801 data->DeleteRegisterAllocationZone();
1800 } 1802 }
1801 1803
1802 CompilationInfo* PipelineImpl::info() const { return data_->info(); } 1804 CompilationInfo* PipelineImpl::info() const { return data_->info(); }
1803 1805
1804 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } 1806 Isolate* PipelineImpl::isolate() const { return info()->isolate(); }
1805 1807
1806 } // namespace compiler 1808 } // namespace compiler
1807 } // namespace internal 1809 } // namespace internal
1808 } // namespace v8 1810 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-graph.cc ('k') | src/contexts.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698