V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
smi-inl.h
1 // Copyright 2018 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_SMI_INL_H_
6 #define V8_OBJECTS_SMI_INL_H_
7 
8 #include "src/objects/smi.h"
9 
10 // Has to be the last include (doesn't have include guards):
11 #include "src/objects/object-macros.h"
12 
13 namespace v8 {
14 namespace internal {
15 
16 CAST_ACCESSOR2(Smi)
17 
18 int Smi::ToInt(const Object* object) { return Smi::cast(object)->value(); }
19 int Smi::ToInt(ObjectPtr object) { return Smi::cast(object)->value(); }
20 
21 } // namespace internal
22 } // namespace v8
23 
24 #include "src/objects/object-macros-undef.h"
25 
26 #endif // V8_OBJECTS_SMI_INL_H_
Definition: libplatform.h:13