Line data Source code
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 1985 : CAST_ACCESSOR(Smi)
17 :
18 3746 : int Smi::ToInt(const Object object) { return Smi::cast(object)->value(); }
19 :
20 : } // namespace internal
21 : } // namespace v8
22 :
23 : #include "src/objects/object-macros-undef.h"
24 :
25 : #endif // V8_OBJECTS_SMI_INL_H_
|