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

Unified Diff: src/compiler/code-generator.cc

Issue 1928903002: [turbofan] Abort compilation when the max deoptimization table size is exceeded. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Uhm, re-enable verifier 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/code-generator.h ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-generator.cc
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index 098e2257bbc5aa0921f5db746b620a3dae87c175..e5e2bccda6cd8596c8dda10ca2b93a82600bb069 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -156,12 +156,14 @@ Handle<Code> CodeGenerator::GenerateCode() {
}
}
+ CodeGenResult result;
if (FLAG_enable_embedded_constant_pool && !block->needs_frame()) {
ConstantPoolUnavailableScope constant_pool_unavailable(masm());
- AssembleBlock(block);
+ result = AssembleBlock(block);
} else {
- AssembleBlock(block);
+ result = AssembleBlock(block);
}
+ if (result != kSuccess) return Handle<Code>();
}
}
@@ -304,15 +306,18 @@ bool CodeGenerator::IsMaterializableFromRoot(
return false;
}
-void CodeGenerator::AssembleBlock(const InstructionBlock* block) {
+CodeGenerator::CodeGenResult CodeGenerator::AssembleBlock(
+ const InstructionBlock* block) {
for (int i = block->code_start(); i < block->code_end(); ++i) {
Instruction* instr = code()->InstructionAt(i);
- AssembleInstruction(instr, block);
+ CodeGenResult result = AssembleInstruction(instr, block);
+ if (result != kSuccess) return result;
}
+ return kSuccess;
}
-void CodeGenerator::AssembleInstruction(Instruction* instr,
- const InstructionBlock* block) {
+CodeGenerator::CodeGenResult CodeGenerator::AssembleInstruction(
+ Instruction* instr, const InstructionBlock* block) {
AssembleGaps(instr);
DCHECK_IMPLIES(
block->must_deconstruct_frame(),
@@ -323,7 +328,8 @@ void CodeGenerator::AssembleInstruction(Instruction* instr,
}
AssembleSourcePosition(instr);
// Assemble architecture-specific code for the instruction.
- AssembleArchInstruction(instr);
+ CodeGenResult result = AssembleArchInstruction(instr);
+ if (result != kSuccess) return result;
FlagsMode mode = FlagsModeField::decode(instr->opcode());
FlagsCondition condition = FlagsConditionField::decode(instr->opcode());
@@ -339,7 +345,7 @@ void CodeGenerator::AssembleInstruction(Instruction* instr,
if (!IsNextInAssemblyOrder(true_rpo)) {
AssembleArchJump(true_rpo);
}
- return;
+ return kSuccess;
}
if (IsNextInAssemblyOrder(true_rpo)) {
// true block is next, can fall through if condition negated.
@@ -381,6 +387,7 @@ void CodeGenerator::AssembleInstruction(Instruction* instr,
break;
}
}
+ return kSuccess;
}
« no previous file with comments | « src/compiler/code-generator.h ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698