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

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

Issue 1191243003: [turbofan] Factor out the function specific part from the frame state operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 5 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/ast-graph-builder.cc ('k') | src/compiler/common-operator.h » ('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 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/snapshot/serialize.h" // TODO(turbofan): RootIndexMap 10 #include "src/snapshot/serialize.h" // TODO(turbofan): RootIndexMap
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 } 521 }
522 frame_state_offset += descriptor->outer_state()->GetTotalSize(); 522 frame_state_offset += descriptor->outer_state()->GetTotalSize();
523 523
524 Handle<SharedFunctionInfo> shared_info; 524 Handle<SharedFunctionInfo> shared_info;
525 if (!descriptor->shared_info().ToHandle(&shared_info)) { 525 if (!descriptor->shared_info().ToHandle(&shared_info)) {
526 shared_info = info()->shared_info(); 526 shared_info = info()->shared_info();
527 } 527 }
528 int shared_info_id = DefineDeoptimizationLiteral(shared_info); 528 int shared_info_id = DefineDeoptimizationLiteral(shared_info);
529 529
530 switch (descriptor->type()) { 530 switch (descriptor->type()) {
531 case JS_FRAME: 531 case FrameStateType::kJavaScriptFunction:
532 translation->BeginJSFrame( 532 translation->BeginJSFrame(
533 descriptor->bailout_id(), shared_info_id, 533 descriptor->bailout_id(), shared_info_id,
534 static_cast<unsigned int>(descriptor->GetSize(state_combine) - 534 static_cast<unsigned int>(descriptor->GetSize(state_combine) -
535 (1 + descriptor->parameters_count()))); 535 (1 + descriptor->parameters_count())));
536 break; 536 break;
537 case ARGUMENTS_ADAPTOR: 537 case FrameStateType::kArgumentsAdaptor:
538 translation->BeginArgumentsAdaptorFrame( 538 translation->BeginArgumentsAdaptorFrame(
539 shared_info_id, 539 shared_info_id,
540 static_cast<unsigned int>(descriptor->parameters_count())); 540 static_cast<unsigned int>(descriptor->parameters_count()));
541 break; 541 break;
542 } 542 }
543 543
544 for (size_t i = 0; i < descriptor->GetSize(state_combine); i++) { 544 for (size_t i = 0; i < descriptor->GetSize(state_combine); i++) {
545 OperandAndType op = TypedOperandForFrameState( 545 OperandAndType op = TypedOperandForFrameState(
546 descriptor, instr, frame_state_offset, i, state_combine); 546 descriptor, instr, frame_state_offset, i, state_combine);
547 AddTranslationForOperand(translation, instr, op.operand, op.type); 547 AddTranslationForOperand(translation, instr, op.operand, op.type);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 : masm_(gen->masm()), next_(gen->ools_) { 707 : masm_(gen->masm()), next_(gen->ools_) {
708 gen->ools_ = this; 708 gen->ools_ = this;
709 } 709 }
710 710
711 711
712 OutOfLineCode::~OutOfLineCode() {} 712 OutOfLineCode::~OutOfLineCode() {}
713 713
714 } // namespace compiler 714 } // namespace compiler
715 } // namespace internal 715 } // namespace internal
716 } // namespace v8 716 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/common-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698