V8 Project
property-details-inl.h
Go to the documentation of this file.
1 // Copyright 2014 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_PROPERTY_DETAILS_INL_H_
6 #define V8_PROPERTY_DETAILS_INL_H_
7 
8 #include "src/conversions.h"
9 #include "src/objects.h"
10 #include "src/property-details.h"
11 #include "src/types.h"
12 
13 namespace v8 {
14 namespace internal {
15 
17  DisallowHeapAllocation no_allocation;
18  if (type->Is(Type::None())) return Representation::None();
19  if (type->Is(Type::SignedSmall())) return Representation::Smi();
20  if (type->Is(Type::Signed32())) return Representation::Integer32();
21  if (type->Is(Type::Number())) return Representation::Double();
22  return Representation::Tagged();
23 }
24 
25 } } // namespace v8::internal
26 
27 #endif // V8_PROPERTY_DETAILS_INL_H_
static Representation FromType(Type *type)
static Representation Double()
static Representation Smi()
static Representation Integer32()
static Representation Tagged()
static Representation None()
bool Is(TypeImpl *that)
Definition: types.h:390
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20
@ None
Definition: v8.h:2211