v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
ic-inl.h
Go to the documentation of this file.
1// Copyright 2012 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_IC_IC_INL_H_
6#define V8_IC_IC_INL_H_
7
8#include "src/ic/ic.h"
9// Include the non-inl header before the rest of the headers.
10
12#include "src/debug/debug.h"
16
17namespace v8 {
18namespace internal {
19
21 if (IsSmi(*object)) {
22 lookup_start_object_map_ = isolate_->factory()->heap_number_map();
23 } else {
25 handle(Cast<HeapObject>(*object)->map(), isolate_);
26 }
27}
28
30 Tagged<HeapObject> heap_object;
31 return (IsSmi(object) && (object.ptr() != kNullAddress)) ||
32 (object.GetHeapObjectIfWeak(&heap_object) &&
33 (IsMap(heap_object) || IsPropertyCell(heap_object) ||
34 IsAccessorPair(heap_object))) ||
35 (object.GetHeapObjectIfStrong(&heap_object) &&
36 (IsDataHandler(heap_object) || IsCode(heap_object)));
37}
38
40 if (state() == InlineCacheState::NO_FEEDBACK) return false;
42 nexus()->GetKeyType() != IcCheckType::kElement));
43}
44
45} // namespace internal
46} // namespace v8
47
48#endif // V8_IC_IC_INL_H_
void update_lookup_start_object_map(DirectHandle< Object > object)
Definition ic-inl.h:20
State state() const
Definition ic.h:38
bool vector_needs_update()
Definition ic-inl.h:39
static bool IsHandler(Tagged< MaybeObject > object)
Definition ic-inl.h:29
Handle< Map > lookup_start_object_map_
Definition ic.h:172
Isolate * isolate_
Definition ic.h:166
bool vector_set_
Definition ic.h:168
const FeedbackNexus * nexus() const
Definition ic.h:156
v8::internal::Factory * factory()
Definition isolate.h:1527
V8_INLINE IndirectHandle< T > handle(Tagged< T > object, Isolate *isolate)
Definition handles-inl.h:72
V8_INLINE constexpr bool IsSmi(TaggedImpl< kRefType, StorageType > obj)
Definition objects.h:665
static constexpr Address kNullAddress
Definition v8-internal.h:53
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
Definition casting.h:150