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

Unified Diff: src/objects-inl.h

Issue 2185293004: [interpreter] Reduce size of OSR nesting level field. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add static assert. 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/objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 4f5938abd5b2e7bd5337b48536b48dfc54b4abb5..30e1e17198efe63818fff9192be0b77d6f83be9d 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -4099,12 +4099,13 @@ void BytecodeArray::set_interrupt_budget(int interrupt_budget) {
}
int BytecodeArray::osr_loop_nesting_level() const {
- return READ_INT_FIELD(this, kOSRNestingLevelOffset);
+ return READ_INT8_FIELD(this, kOSRNestingLevelOffset);
}
void BytecodeArray::set_osr_loop_nesting_level(int depth) {
DCHECK(0 <= depth && depth <= AbstractCode::kMaxLoopNestingMarker);
- WRITE_INT_FIELD(this, kOSRNestingLevelOffset, depth);
+ STATIC_ASSERT(AbstractCode::kMaxLoopNestingMarker < kMaxInt8);
+ WRITE_INT8_FIELD(this, kOSRNestingLevelOffset, depth);
}
int BytecodeArray::parameter_count() const {
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698