• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_OBJECTS_DATA_HANDLER_INL_H_
6 #define V8_OBJECTS_DATA_HANDLER_INL_H_
7 
8 #include "src/objects/data-handler.h"
9 #include "src/objects/objects-inl.h"  // Needed for write barriers
10 
11 // Has to be the last include (doesn't have include guards):
12 #include "src/objects/object-macros.h"
13 
14 namespace v8 {
15 namespace internal {
16 
17 #include "torque-generated/src/objects/data-handler-tq-inl.inc"
18 
TQ_OBJECT_CONSTRUCTORS_IMPL(DataHandler)19 TQ_OBJECT_CONSTRUCTORS_IMPL(DataHandler)
20 
21 int DataHandler::data_field_count() const {
22   return (map().instance_size() - kSizeWithData0) / kTaggedSize;
23 }
24 
25 WEAK_ACCESSORS_CHECKED(DataHandler, data1, kData1Offset,
26                        map().instance_size() >= kSizeWithData1)
27 WEAK_ACCESSORS_CHECKED(DataHandler, data2, kData2Offset,
28                        map().instance_size() >= kSizeWithData2)
29 WEAK_ACCESSORS_CHECKED(DataHandler, data3, kData3Offset,
30                        map().instance_size() >= kSizeWithData3)
31 
32 }  // namespace internal
33 }  // namespace v8
34 
35 #include "src/objects/object-macros-undef.h"
36 
37 #endif  // V8_OBJECTS_DATA_HANDLER_INL_H_
38