Commit b47c163b authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[codegen] Add two DCHECKs

Change-Id: Id2192cb62d6e0920420a3e988593759f5892a0b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2254026
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68466}
parent 7527169a
......@@ -78,10 +78,16 @@ class JumpOptimizationInfo {
public:
bool is_collecting() const { return stage_ == kCollection; }
bool is_optimizing() const { return stage_ == kOptimization; }
void set_optimizing() { stage_ = kOptimization; }
void set_optimizing() {
DCHECK(is_optimizable());
stage_ = kOptimization;
}
bool is_optimizable() const { return optimizable_; }
void set_optimizable() { optimizable_ = true; }
void set_optimizable() {
DCHECK(is_collecting());
optimizable_ = true;
}
// Used to verify the instruction sequence is always the same in two stages.
size_t hash_code() const { return hash_code_; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment