blob: ee1fa0ff24952c20f4edc021479cfbc31c72f1e6 [file] [log] [blame]
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001// 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/assembler.h"
8
9namespace v8 {
10namespace internal {
11namespace compiler {
12
13Node** CommonNodeCache::FindExternalConstant(ExternalReference value) {
14 return external_constants_.Find(zone(), bit_cast<intptr_t>(value.address()));
15}
16
17
18void CommonNodeCache::GetCachedNodes(ZoneVector<Node*>* nodes) {
19 int32_constants_.GetCachedNodes(nodes);
20 int64_constants_.GetCachedNodes(nodes);
21 float32_constants_.GetCachedNodes(nodes);
22 float64_constants_.GetCachedNodes(nodes);
23 external_constants_.GetCachedNodes(nodes);
24 number_constants_.GetCachedNodes(nodes);
25}
26
27} // namespace compiler
28} // namespace internal
29} // namespace v8