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

Side by Side Diff: src/objects.h

Issue 1254873002: [interpreter] A couple of minor tweaks to BytecodeArray. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/interpreter/interpreter.h ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 4236 matching lines...) Expand 10 before | Expand all | Expand 10 after
4247 // Setter and getter 4247 // Setter and getter
4248 inline byte get(int index); 4248 inline byte get(int index);
4249 inline void set(int index, byte value); 4249 inline void set(int index, byte value);
4250 4250
4251 // Returns data start address. 4251 // Returns data start address.
4252 inline Address GetFirstBytecodeAddress(); 4252 inline Address GetFirstBytecodeAddress();
4253 4253
4254 // Accessors for frame size and the number of locals 4254 // Accessors for frame size and the number of locals
4255 inline int frame_size() const; 4255 inline int frame_size() const;
4256 inline void set_frame_size(int value); 4256 inline void set_frame_size(int value);
4257 inline int number_of_locals() const;
4258 inline void set_number_of_locals(int value);
4259 4257
4260 DECLARE_CAST(BytecodeArray) 4258 DECLARE_CAST(BytecodeArray)
4261 4259
4262 // Dispatched behavior. 4260 // Dispatched behavior.
4263 inline int BytecodeArraySize() { return SizeFor(this->length()); } 4261 inline int BytecodeArraySize() { return SizeFor(this->length()); }
4264 4262
4265 DECLARE_PRINTER(BytecodeArray) 4263 DECLARE_PRINTER(BytecodeArray)
4266 DECLARE_VERIFIER(BytecodeArray) 4264 DECLARE_VERIFIER(BytecodeArray)
4267 4265
4268 void Disassemble(std::ostream& os); 4266 void Disassemble(std::ostream& os);
4269 4267
4270 // Layout description. 4268 // Layout description.
4271 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; 4269 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize;
4272 static const int kNumberOfLocalsOffset = kFrameSizeOffset + kIntSize; 4270 static const int kHeaderSize = kFrameSizeOffset + kIntSize;
4273 static const int kHeaderSize = kNumberOfLocalsOffset + kIntSize;
4274 4271
4275 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); 4272 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize);
4276 4273
4277 // Maximal memory consumption for a single BytecodeArray. 4274 // Maximal memory consumption for a single BytecodeArray.
4278 static const int kMaxSize = 512 * MB; 4275 static const int kMaxSize = 512 * MB;
4279 // Maximal length of a single BytecodeArray. 4276 // Maximal length of a single BytecodeArray.
4280 static const int kMaxLength = kMaxSize - kHeaderSize; 4277 static const int kMaxLength = kMaxSize - kHeaderSize;
4281 4278
4282 private: 4279 private:
4283 DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeArray); 4280 DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeArray);
(...skipping 6571 matching lines...) Expand 10 before | Expand all | Expand 10 after
10855 } else { 10852 } else {
10856 value &= ~(1 << bit_position); 10853 value &= ~(1 << bit_position);
10857 } 10854 }
10858 return value; 10855 return value;
10859 } 10856 }
10860 }; 10857 };
10861 10858
10862 } } // namespace v8::internal 10859 } } // namespace v8::internal
10863 10860
10864 #endif // V8_OBJECTS_H_ 10861 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/interpreter/interpreter.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698