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

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

Issue 1303403004: [Interpreter] Add support for parameter variables. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_add_bytecodes
Patch Set: Fix Windows build Created 5 years, 4 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 4034 matching lines...) Expand 10 before | Expand all | Expand 10 after
4045 DCHECK(IsAligned(frame_size, static_cast<unsigned>(kPointerSize))); 4045 DCHECK(IsAligned(frame_size, static_cast<unsigned>(kPointerSize)));
4046 WRITE_INT_FIELD(this, kFrameSizeOffset, frame_size); 4046 WRITE_INT_FIELD(this, kFrameSizeOffset, frame_size);
4047 } 4047 }
4048 4048
4049 4049
4050 int BytecodeArray::frame_size() const { 4050 int BytecodeArray::frame_size() const {
4051 return READ_INT_FIELD(this, kFrameSizeOffset); 4051 return READ_INT_FIELD(this, kFrameSizeOffset);
4052 } 4052 }
4053 4053
4054 4054
4055 void BytecodeArray::set_parameter_count(int number_of_parameters) {
4056 DCHECK_GE(number_of_parameters, 0);
4057 WRITE_INT_FIELD(this, kParameterSizeOffset,
4058 (number_of_parameters << kPointerSizeLog2));
4059 }
4060
4061
4062 int BytecodeArray::parameter_count() const {
4063 return READ_INT_FIELD(this, kParameterSizeOffset) >> kPointerSizeLog2;
Michael Starzinger 2015/08/26 13:44:36 Can we leave a short one-liner comment here that t
rmcilroy 2015/08/27 09:54:39 Done.
4064 }
4065
4066
4055 Address BytecodeArray::GetFirstBytecodeAddress() { 4067 Address BytecodeArray::GetFirstBytecodeAddress() {
4056 return reinterpret_cast<Address>(this) - kHeapObjectTag + kHeaderSize; 4068 return reinterpret_cast<Address>(this) - kHeapObjectTag + kHeaderSize;
4057 } 4069 }
4058 4070
4059 4071
4060 int BytecodeArray::BytecodeArraySize() { return SizeFor(this->length()); } 4072 int BytecodeArray::BytecodeArraySize() { return SizeFor(this->length()); }
4061 4073
4062 4074
4063 ACCESSORS(FixedTypedArrayBase, base_pointer, Object, kBasePointerOffset) 4075 ACCESSORS(FixedTypedArrayBase, base_pointer, Object, kBasePointerOffset)
4064 4076
(...skipping 3787 matching lines...) Expand 10 before | Expand all | Expand 10 after
7852 #undef READ_INT64_FIELD 7864 #undef READ_INT64_FIELD
7853 #undef WRITE_INT64_FIELD 7865 #undef WRITE_INT64_FIELD
7854 #undef READ_BYTE_FIELD 7866 #undef READ_BYTE_FIELD
7855 #undef WRITE_BYTE_FIELD 7867 #undef WRITE_BYTE_FIELD
7856 #undef NOBARRIER_READ_BYTE_FIELD 7868 #undef NOBARRIER_READ_BYTE_FIELD
7857 #undef NOBARRIER_WRITE_BYTE_FIELD 7869 #undef NOBARRIER_WRITE_BYTE_FIELD
7858 7870
7859 } } // namespace v8::internal 7871 } } // namespace v8::internal
7860 7872
7861 #endif // V8_OBJECTS_INL_H_ 7873 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/frames.h ('K') | « src/objects.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698