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

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: Incorporate review comments on patch set 5. 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 4063 matching lines...) Expand 10 before | Expand all | Expand 10 after
4074 DCHECK(IsAligned(frame_size, static_cast<unsigned>(kPointerSize))); 4074 DCHECK(IsAligned(frame_size, static_cast<unsigned>(kPointerSize)));
4075 WRITE_INT_FIELD(this, kFrameSizeOffset, frame_size); 4075 WRITE_INT_FIELD(this, kFrameSizeOffset, frame_size);
4076 } 4076 }
4077 4077
4078 4078
4079 int BytecodeArray::frame_size() const { 4079 int BytecodeArray::frame_size() const {
4080 return READ_INT_FIELD(this, kFrameSizeOffset); 4080 return READ_INT_FIELD(this, kFrameSizeOffset);
4081 } 4081 }
4082 4082
4083 4083
4084 int BytecodeArray::local_count() const { return frame_size() / kPointerSize; }
4085
4086
4084 void BytecodeArray::set_parameter_count(int number_of_parameters) { 4087 void BytecodeArray::set_parameter_count(int number_of_parameters) {
4085 DCHECK_GE(number_of_parameters, 0); 4088 DCHECK_GE(number_of_parameters, 0);
4086 // Parameter count is stored as the size on stack of the parameters to allow 4089 // Parameter count is stored as the size on stack of the parameters to allow
4087 // it to be used directly by generated code. 4090 // it to be used directly by generated code.
4088 WRITE_INT_FIELD(this, kParameterSizeOffset, 4091 WRITE_INT_FIELD(this, kParameterSizeOffset,
4089 (number_of_parameters << kPointerSizeLog2)); 4092 (number_of_parameters << kPointerSizeLog2));
4090 } 4093 }
4091 4094
4092 4095
4093 int BytecodeArray::parameter_count() const { 4096 int BytecodeArray::parameter_count() const {
(...skipping 3792 matching lines...) Expand 10 before | Expand all | Expand 10 after
7886 #undef READ_INT64_FIELD 7889 #undef READ_INT64_FIELD
7887 #undef WRITE_INT64_FIELD 7890 #undef WRITE_INT64_FIELD
7888 #undef READ_BYTE_FIELD 7891 #undef READ_BYTE_FIELD
7889 #undef WRITE_BYTE_FIELD 7892 #undef WRITE_BYTE_FIELD
7890 #undef NOBARRIER_READ_BYTE_FIELD 7893 #undef NOBARRIER_READ_BYTE_FIELD
7891 #undef NOBARRIER_WRITE_BYTE_FIELD 7894 #undef NOBARRIER_WRITE_BYTE_FIELD
7892 7895
7893 } } // namespace v8::internal 7896 } } // namespace v8::internal
7894 7897
7895 #endif // V8_OBJECTS_INL_H_ 7898 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698