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

Side by Side Diff: src/compiler/code-generator.cc

Issue 1303953007: [turbofan] Use the SharedInfo only if we have it in the code generator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/pipeline.h" 9 #include "src/compiler/pipeline.h"
10 #include "src/frames-inl.h" 10 #include "src/frames-inl.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 Handle<DeoptimizationInputData> data = 352 Handle<DeoptimizationInputData> data =
353 DeoptimizationInputData::New(isolate(), deopt_count, TENURED); 353 DeoptimizationInputData::New(isolate(), deopt_count, TENURED);
354 354
355 Handle<ByteArray> translation_array = 355 Handle<ByteArray> translation_array =
356 translations_.CreateByteArray(isolate()->factory()); 356 translations_.CreateByteArray(isolate()->factory());
357 357
358 data->SetTranslationByteArray(*translation_array); 358 data->SetTranslationByteArray(*translation_array);
359 data->SetInlinedFunctionCount( 359 data->SetInlinedFunctionCount(
360 Smi::FromInt(static_cast<int>(inlined_function_count_))); 360 Smi::FromInt(static_cast<int>(inlined_function_count_)));
361 data->SetOptimizationId(Smi::FromInt(info->optimization_id())); 361 data->SetOptimizationId(Smi::FromInt(info->optimization_id()));
362 // TODO(jarin) The following code was copied over from Lithium, not sure 362
363 // whether the scope or the IsOptimizing condition are really needed. 363 if (info->has_shared_info()) {
364 if (info->IsOptimizing()) {
365 // Reference to shared function info does not change between phases.
366 AllowDeferredHandleDereference allow_handle_dereference;
367 data->SetSharedFunctionInfo(*info->shared_info()); 364 data->SetSharedFunctionInfo(*info->shared_info());
368 } else { 365 } else {
369 data->SetSharedFunctionInfo(Smi::FromInt(0)); 366 data->SetSharedFunctionInfo(Smi::FromInt(0));
370 } 367 }
371 368
372 Handle<FixedArray> literals = isolate()->factory()->NewFixedArray( 369 Handle<FixedArray> literals = isolate()->factory()->NewFixedArray(
373 static_cast<int>(deoptimization_literals_.size()), TENURED); 370 static_cast<int>(deoptimization_literals_.size()), TENURED);
374 { 371 {
375 AllowDeferredHandleDereference copy_handles; 372 AllowDeferredHandleDereference copy_handles;
376 for (unsigned i = 0; i < deoptimization_literals_.size(); i++) { 373 for (unsigned i = 0; i < deoptimization_literals_.size(); i++) {
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 : masm_(gen->masm()), next_(gen->ools_) { 665 : masm_(gen->masm()), next_(gen->ools_) {
669 gen->ools_ = this; 666 gen->ools_ = this;
670 } 667 }
671 668
672 669
673 OutOfLineCode::~OutOfLineCode() {} 670 OutOfLineCode::~OutOfLineCode() {}
674 671
675 } // namespace compiler 672 } // namespace compiler
676 } // namespace internal 673 } // namespace internal
677 } // namespace v8 674 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698