| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_API_ARGUMENTS_H_ | 5 #ifndef V8_API_ARGUMENTS_H_ |
| 6 #define V8_API_ARGUMENTS_H_ | 6 #define V8_API_ARGUMENTS_H_ |
| 7 | 7 |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
| 10 #include "src/visitors.h" | 10 #include "src/visitors.h" |
| 11 | 11 |
| 12 namespace v8 { | 12 namespace v8 { |
| 13 namespace internal { | 13 namespace internal { |
| 14 | 14 |
| 15 // Custom arguments replicate a small segment of stack that can be | 15 // Custom arguments replicate a small segment of stack that can be |
| 16 // accessed through an Arguments object the same way the actual stack | 16 // accessed through an Arguments object the same way the actual stack |
| 17 // can. | 17 // can. |
| 18 template <int kArrayLength> | 18 template <int kArrayLength> |
| 19 class CustomArgumentsBase : public Relocatable { | 19 class CustomArgumentsBase : public Relocatable { |
| 20 public: | 20 public: |
| 21 virtual inline void IterateInstance(RootVisitor* v) { | 21 inline void IterateInstance(RootVisitor* v) override { |
| 22 v->VisitRootPointers(Root::kRelocatable, values_, values_ + kArrayLength); | 22 v->VisitRootPointers(Root::kRelocatable, values_, values_ + kArrayLength); |
| 23 } | 23 } |
| 24 | 24 |
| 25 protected: | 25 protected: |
| 26 inline Object** begin() { return values_; } | 26 inline Object** begin() { return values_; } |
| 27 explicit inline CustomArgumentsBase(Isolate* isolate) | 27 explicit inline CustomArgumentsBase(Isolate* isolate) |
| 28 : Relocatable(isolate) {} | 28 : Relocatable(isolate) {} |
| 29 Object* values_[kArrayLength]; | 29 Object* values_[kArrayLength]; |
| 30 }; | 30 }; |
| 31 | 31 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 192 |
| 193 private: | 193 private: |
| 194 internal::Object** argv_; | 194 internal::Object** argv_; |
| 195 int argc_; | 195 int argc_; |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 } // namespace internal | 198 } // namespace internal |
| 199 } // namespace v8 | 199 } // namespace v8 |
| 200 | 200 |
| 201 #endif // V8_API_ARGUMENTS_H_ | 201 #endif // V8_API_ARGUMENTS_H_ |
| OLD | NEW |