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

Side by Side Diff: src/objects-inl.h

Issue 1291693004: [Interpreter] Bytecode graph builder (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More fixes for bots (tests w/ ASAN and tests w/ slow asserts enabled). Created 5 years, 3 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 4073 matching lines...) Expand 10 before | Expand all | Expand 10 after
4084 DCHECK(IsAligned(frame_size, static_cast<unsigned>(kPointerSize))); 4084 DCHECK(IsAligned(frame_size, static_cast<unsigned>(kPointerSize)));
4085 WRITE_INT_FIELD(this, kFrameSizeOffset, frame_size); 4085 WRITE_INT_FIELD(this, kFrameSizeOffset, frame_size);
4086 } 4086 }
4087 4087
4088 4088
4089 int BytecodeArray::frame_size() const { 4089 int BytecodeArray::frame_size() const {
4090 return READ_INT_FIELD(this, kFrameSizeOffset); 4090 return READ_INT_FIELD(this, kFrameSizeOffset);
4091 } 4091 }
4092 4092
4093 4093
4094 int BytecodeArray::register_count() const {
4095 return frame_size() / kPointerSize;
4096 }
4097
4098
4094 void BytecodeArray::set_parameter_count(int number_of_parameters) { 4099 void BytecodeArray::set_parameter_count(int number_of_parameters) {
4095 DCHECK_GE(number_of_parameters, 0); 4100 DCHECK_GE(number_of_parameters, 0);
4096 // Parameter count is stored as the size on stack of the parameters to allow 4101 // Parameter count is stored as the size on stack of the parameters to allow
4097 // it to be used directly by generated code. 4102 // it to be used directly by generated code.
4098 WRITE_INT_FIELD(this, kParameterSizeOffset, 4103 WRITE_INT_FIELD(this, kParameterSizeOffset,
4099 (number_of_parameters << kPointerSizeLog2)); 4104 (number_of_parameters << kPointerSizeLog2));
4100 } 4105 }
4101 4106
4102 4107
4103 int BytecodeArray::parameter_count() const { 4108 int BytecodeArray::parameter_count() const {
(...skipping 3796 matching lines...) Expand 10 before | Expand all | Expand 10 after
7900 #undef READ_INT64_FIELD 7905 #undef READ_INT64_FIELD
7901 #undef WRITE_INT64_FIELD 7906 #undef WRITE_INT64_FIELD
7902 #undef READ_BYTE_FIELD 7907 #undef READ_BYTE_FIELD
7903 #undef WRITE_BYTE_FIELD 7908 #undef WRITE_BYTE_FIELD
7904 #undef NOBARRIER_READ_BYTE_FIELD 7909 #undef NOBARRIER_READ_BYTE_FIELD
7905 #undef NOBARRIER_WRITE_BYTE_FIELD 7910 #undef NOBARRIER_WRITE_BYTE_FIELD
7906 7911
7907 } } // namespace v8::internal 7912 } } // namespace v8::internal
7908 7913
7909 #endif // V8_OBJECTS_INL_H_ 7914 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698