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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 4078 matching lines...) Expand 10 before | Expand all | Expand 10 after
4089 4089
4090 int BytecodeArray::interrupt_budget() const { 4090 int BytecodeArray::interrupt_budget() const {
4091 return READ_INT_FIELD(this, kInterruptBudgetOffset); 4091 return READ_INT_FIELD(this, kInterruptBudgetOffset);
4092 } 4092 }
4093 4093
4094 void BytecodeArray::set_interrupt_budget(int interrupt_budget) { 4094 void BytecodeArray::set_interrupt_budget(int interrupt_budget) {
4095 DCHECK_GE(interrupt_budget, 0); 4095 DCHECK_GE(interrupt_budget, 0);
4096 WRITE_INT_FIELD(this, kInterruptBudgetOffset, interrupt_budget); 4096 WRITE_INT_FIELD(this, kInterruptBudgetOffset, interrupt_budget);
4097 } 4097 }
4098 4098
4099 int BytecodeArray::osr_loop_nesting_level() const {
4100 return READ_INT_FIELD(this, kOSRNestingLevelOffset);
4101 }
4102
4103 void BytecodeArray::set_osr_loop_nesting_level(int depth) {
4104 DCHECK(0 <= depth && depth <= Code::kMaxLoopNestingMarker);
rmcilroy 2016/07/22 09:46:01 Probably not worth the churn, but maybe we could m
Michael Starzinger 2016/07/25 10:24:42 Done.
4105 WRITE_INT_FIELD(this, kOSRNestingLevelOffset, depth);
4106 }
4107
4099 int BytecodeArray::parameter_count() const { 4108 int BytecodeArray::parameter_count() const {
4100 // Parameter count is stored as the size on stack of the parameters to allow 4109 // Parameter count is stored as the size on stack of the parameters to allow
4101 // it to be used directly by generated code. 4110 // it to be used directly by generated code.
4102 return READ_INT_FIELD(this, kParameterSizeOffset) >> kPointerSizeLog2; 4111 return READ_INT_FIELD(this, kParameterSizeOffset) >> kPointerSizeLog2;
4103 } 4112 }
4104 4113
4105 4114
4106 ACCESSORS(BytecodeArray, constant_pool, FixedArray, kConstantPoolOffset) 4115 ACCESSORS(BytecodeArray, constant_pool, FixedArray, kConstantPoolOffset)
4107 ACCESSORS(BytecodeArray, handler_table, FixedArray, kHandlerTableOffset) 4116 ACCESSORS(BytecodeArray, handler_table, FixedArray, kHandlerTableOffset)
4108 ACCESSORS(BytecodeArray, source_position_table, ByteArray, 4117 ACCESSORS(BytecodeArray, source_position_table, ByteArray,
(...skipping 4007 matching lines...) Expand 10 before | Expand all | Expand 10 after
8116 #undef WRITE_INT64_FIELD 8125 #undef WRITE_INT64_FIELD
8117 #undef READ_BYTE_FIELD 8126 #undef READ_BYTE_FIELD
8118 #undef WRITE_BYTE_FIELD 8127 #undef WRITE_BYTE_FIELD
8119 #undef NOBARRIER_READ_BYTE_FIELD 8128 #undef NOBARRIER_READ_BYTE_FIELD
8120 #undef NOBARRIER_WRITE_BYTE_FIELD 8129 #undef NOBARRIER_WRITE_BYTE_FIELD
8121 8130
8122 } // namespace internal 8131 } // namespace internal
8123 } // namespace v8 8132 } // namespace v8
8124 8133
8125 #endif // V8_OBJECTS_INL_H_ 8134 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/objects.h ('K') | « src/objects.h ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698