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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2135573002: Address compilation warnings for android build. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update comment. Created 4 years, 5 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/simplified-lowering.cc ('k') | src/parsing/scanner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index bdc5370f5a30ac5779f65f6999c3470256a712cf..37ef95ce5bfe4368ff4d90b1904a19adb0bc9adf 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -633,14 +633,13 @@ void BytecodeGenerator::BuildIndexedJump(Register index, size_t start_index,
size_t size,
ZoneVector<BytecodeLabel>& targets) {
// TODO(neis): Optimize this by using a proper jump table.
+ DCHECK_LE(start_index + size, targets.size());
for (size_t i = start_index; i < start_index + size; i++) {
- DCHECK(0 <= i && i < targets.size());
builder()
->LoadLiteral(Smi::FromInt(static_cast<int>(i)))
.CompareOperation(Token::Value::EQ_STRICT, index)
.JumpIfTrue(&(targets[i]));
}
-
BuildAbort(BailoutReason::kInvalidJumpTableIndex);
}
@@ -654,8 +653,8 @@ void BytecodeGenerator::VisitIterationHeader(IterationStatement* stmt,
// for these resume points, to be used inside the loop.
ZoneVector<BytecodeLabel> resume_points_in_loop(zone());
size_t first_yield = stmt->first_yield_id();
+ DCHECK_LE(first_yield + stmt->yield_count(), generator_resume_points_.size());
for (size_t id = first_yield; id < first_yield + stmt->yield_count(); id++) {
- DCHECK(0 <= id && id < generator_resume_points_.size());
auto& label = generator_resume_points_[id];
resume_points_in_loop.push_back(label);
generator_resume_points_[id] = BytecodeLabel();
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/parsing/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698