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

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

Issue 1848783003: [turbofan] Frame deconstruction self-validation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/address-map.h" 7 #include "src/address-map.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/pipeline.h" 10 #include "src/compiler/pipeline.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 void CodeGenerator::AssembleBlock(const InstructionBlock* block) { 305 void CodeGenerator::AssembleBlock(const InstructionBlock* block) {
306 for (int i = block->code_start(); i < block->code_end(); ++i) { 306 for (int i = block->code_start(); i < block->code_end(); ++i) {
307 Instruction* instr = code()->InstructionAt(i); 307 Instruction* instr = code()->InstructionAt(i);
308 AssembleInstruction(instr, block); 308 AssembleInstruction(instr, block);
309 } 309 }
310 } 310 }
311 311
312 void CodeGenerator::AssembleInstruction(Instruction* instr, 312 void CodeGenerator::AssembleInstruction(Instruction* instr,
313 const InstructionBlock* block) { 313 const InstructionBlock* block) {
314 AssembleGaps(instr); 314 AssembleGaps(instr);
315 DCHECK_IMPLIES(
316 block->must_deconstruct_frame(),
317 instr != code()->InstructionAt(block->last_instruction_index()) ||
318 instr->IsRet() || instr->IsJump());
315 if (instr->IsJump() && block->must_deconstruct_frame()) { 319 if (instr->IsJump() && block->must_deconstruct_frame()) {
316 AssembleDeconstructFrame(); 320 AssembleDeconstructFrame();
317 } 321 }
318 AssembleSourcePosition(instr); 322 AssembleSourcePosition(instr);
319 // Assemble architecture-specific code for the instruction. 323 // Assemble architecture-specific code for the instruction.
320 AssembleArchInstruction(instr); 324 AssembleArchInstruction(instr);
321 325
322 FlagsMode mode = FlagsModeField::decode(instr->opcode()); 326 FlagsMode mode = FlagsModeField::decode(instr->opcode());
323 FlagsCondition condition = FlagsConditionField::decode(instr->opcode()); 327 FlagsCondition condition = FlagsConditionField::decode(instr->opcode());
324 switch (mode) { 328 switch (mode) {
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { 802 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) {
799 gen->ools_ = this; 803 gen->ools_ = this;
800 } 804 }
801 805
802 806
803 OutOfLineCode::~OutOfLineCode() {} 807 OutOfLineCode::~OutOfLineCode() {}
804 808
805 } // namespace compiler 809 } // namespace compiler
806 } // namespace internal 810 } // namespace internal
807 } // namespace v8 811 } // 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