xref: /third_party/node/deps/v8/src/compiler/common-node-cache.cc (revision 1cb0ef41)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/deps/v8/src/compiler/
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#include "src/compiler/common-node-cache.h"
6
7#include "src/codegen/external-reference.h"
8#include "src/compiler/node.h"
9
10namespace v8 {
11namespace internal {
12namespace compiler {
13
14Node** CommonNodeCache::FindExternalConstant(ExternalReference value) {
15  return external_constants_.Find(bit_cast<intptr_t>(value.address()));
16}
17
18
19Node** CommonNodeCache::FindHeapConstant(Handle<HeapObject> value) {
20  return heap_constants_.Find(bit_cast<intptr_t>(value.address()));
21}
22
23
24void CommonNodeCache::GetCachedNodes(ZoneVector<Node*>* nodes) {
25  int32_constants_.GetCachedNodes(nodes);
26  int64_constants_.GetCachedNodes(nodes);
27  tagged_index_constants_.GetCachedNodes(nodes);
28  float32_constants_.GetCachedNodes(nodes);
29  float64_constants_.GetCachedNodes(nodes);
30  external_constants_.GetCachedNodes(nodes);
31  pointer_constants_.GetCachedNodes(nodes);
32  number_constants_.GetCachedNodes(nodes);
33  heap_constants_.GetCachedNodes(nodes);
34  relocatable_int32_constants_.GetCachedNodes(nodes);
35  relocatable_int64_constants_.GetCachedNodes(nodes);
36}
37
38}  // namespace compiler
39}  // namespace internal
40}  // namespace v8
41

Indexes created Thu Nov 07 10:32:03 CST 2024