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

Unified Diff: src/objects-inl.h

Issue 2172583002: [interpreter] Add OSR nesting level to bytecode header. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add TODO. 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') | src/runtime-profiler.cc » ('j') | 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 99cca0ac8c7dd0675bce98baa4881ab06a3cd1b8..4f6ea97009957a787c50f86b3efcec008529f989 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -4095,6 +4095,15 @@ void BytecodeArray::set_interrupt_budget(int interrupt_budget) {
WRITE_INT_FIELD(this, kInterruptBudgetOffset, interrupt_budget);
}
+int BytecodeArray::osr_loop_nesting_level() const {
+ return READ_INT_FIELD(this, kOSRNestingLevelOffset);
+}
+
+void BytecodeArray::set_osr_loop_nesting_level(int depth) {
+ DCHECK(0 <= depth && depth <= AbstractCode::kMaxLoopNestingMarker);
+ WRITE_INT_FIELD(this, kOSRNestingLevelOffset, depth);
+}
+
int BytecodeArray::parameter_count() const {
// Parameter count is stored as the size on stack of the parameters to allow
// it to be used directly by generated code.
@@ -5053,7 +5062,7 @@ int Code::allow_osr_at_loop_nesting_level() {
void Code::set_allow_osr_at_loop_nesting_level(int level) {
DCHECK_EQ(FUNCTION, kind());
- DCHECK(level >= 0 && level <= kMaxLoopNestingMarker);
+ DCHECK(level >= 0 && level <= AbstractCode::kMaxLoopNestingMarker);
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
int updated = AllowOSRAtLoopNestingLevelField::update(previous, level);
WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
« no previous file with comments | « src/objects.h ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698