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

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: 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 unified diff | Download patch
« no previous file with comments | « src/compiler/js-graph.cc ('k') | src/contexts.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/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 = info->isolate();
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 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1809 data->DeleteRegisterAllocationZone(); 1811 data->DeleteRegisterAllocationZone();
1810 } 1812 }
1811 1813
1812 CompilationInfo* PipelineImpl::info() const { return data_->info(); } 1814 CompilationInfo* PipelineImpl::info() const { return data_->info(); }
1813 1815
1814 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } 1816 Isolate* PipelineImpl::isolate() const { return info()->isolate(); }
1815 1817
1816 } // namespace compiler 1818 } // namespace compiler
1817 } // namespace internal 1819 } // namespace internal
1818 } // namespace v8 1820 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-graph.cc ('k') | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698