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

Side by Side Diff: src/interpreter/bytecode-register.h

Issue 2143133004: [interpreter] Fix Register const declarations. (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
« no previous file with comments | « no previous file | src/interpreter/bytecode-register.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_INTERPRETER_BYTECODE_REGISTER_H_ 5 #ifndef V8_INTERPRETER_BYTECODE_REGISTER_H_
6 #define V8_INTERPRETER_BYTECODE_REGISTER_H_ 6 #define V8_INTERPRETER_BYTECODE_REGISTER_H_
7 7
8 #include "src/frames.h"
8 #include "src/interpreter/bytecodes.h" 9 #include "src/interpreter/bytecodes.h"
9 10
10 namespace v8 { 11 namespace v8 {
11 namespace internal { 12 namespace internal {
12 namespace interpreter { 13 namespace interpreter {
13 14
14 // An interpreter Register which is located in the function's Register file 15 // An interpreter Register which is located in the function's Register file
15 // in its stack-frame. Register hold parameters, this, and expression values. 16 // in its stack-frame. Register hold parameters, this, and expression values.
16 class Register final { 17 class Register final {
17 public: 18 public:
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return index() <= other.index(); 80 return index() <= other.index();
80 } 81 }
81 bool operator>(const Register& other) const { 82 bool operator>(const Register& other) const {
82 return index() > other.index(); 83 return index() > other.index();
83 } 84 }
84 bool operator>=(const Register& other) const { 85 bool operator>=(const Register& other) const {
85 return index() >= other.index(); 86 return index() >= other.index();
86 } 87 }
87 88
88 private: 89 private:
89 static const int kInvalidIndex; 90 static const int kInvalidIndex = kMaxInt;
90 static const int kRegisterFileStartOffset; 91 static const int kRegisterFileStartOffset =
92 InterpreterFrameConstants::kRegisterFileFromFp / kPointerSize;
91 93
92 void* operator new(size_t size) = delete; 94 void* operator new(size_t size) = delete;
93 void operator delete(void* p) = delete; 95 void operator delete(void* p) = delete;
94 96
95 int index_; 97 int index_;
96 }; 98 };
97 99
98 } // namespace interpreter 100 } // namespace interpreter
99 } // namespace internal 101 } // namespace internal
100 } // namespace v8 102 } // namespace v8
101 103
102 #endif // V8_INTERPRETER_BYTECODE_REGISTER_H_ 104 #endif // V8_INTERPRETER_BYTECODE_REGISTER_H_
OLDNEW
« no previous file with comments | « no previous file | src/interpreter/bytecode-register.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698