Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Side by Side Diff: src/compiler/common-node-cache.h

Issue 1759383003: [compiler] Add relocatable pointer constants for wasm memory references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix uninitialized variable causing msan failure Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/common-node-cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_COMMON_NODE_CACHE_H_ 5 #ifndef V8_COMPILER_COMMON_NODE_CACHE_H_
6 #define V8_COMPILER_COMMON_NODE_CACHE_H_ 6 #define V8_COMPILER_COMMON_NODE_CACHE_H_
7 7
8 #include "src/compiler/node-cache.h" 8 #include "src/compiler/node-cache.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 Node** FindExternalConstant(ExternalReference value); 46 Node** FindExternalConstant(ExternalReference value);
47 47
48 Node** FindNumberConstant(double value) { 48 Node** FindNumberConstant(double value) {
49 // We canonicalize double constants at the bit representation level. 49 // We canonicalize double constants at the bit representation level.
50 return number_constants_.Find(zone(), bit_cast<int64_t>(value)); 50 return number_constants_.Find(zone(), bit_cast<int64_t>(value));
51 } 51 }
52 52
53 Node** FindHeapConstant(Handle<HeapObject> value); 53 Node** FindHeapConstant(Handle<HeapObject> value);
54 54
55 Node** FindRelocatableInt32Constant(int32_t value) {
56 return relocatable_int32_constants_.Find(zone(), value);
57 }
58
59 Node** FindRelocatableInt64Constant(int64_t value) {
60 return relocatable_int64_constants_.Find(zone(), value);
61 }
62
55 // Return all nodes from the cache. 63 // Return all nodes from the cache.
56 void GetCachedNodes(ZoneVector<Node*>* nodes); 64 void GetCachedNodes(ZoneVector<Node*>* nodes);
57 65
58 Zone* zone() const { return zone_; } 66 Zone* zone() const { return zone_; }
59 67
60 private: 68 private:
61 Int32NodeCache int32_constants_; 69 Int32NodeCache int32_constants_;
62 Int64NodeCache int64_constants_; 70 Int64NodeCache int64_constants_;
63 Int32NodeCache float32_constants_; 71 Int32NodeCache float32_constants_;
64 Int64NodeCache float64_constants_; 72 Int64NodeCache float64_constants_;
65 IntPtrNodeCache external_constants_; 73 IntPtrNodeCache external_constants_;
66 Int64NodeCache number_constants_; 74 Int64NodeCache number_constants_;
67 IntPtrNodeCache heap_constants_; 75 IntPtrNodeCache heap_constants_;
76 Int32NodeCache relocatable_int32_constants_;
77 Int64NodeCache relocatable_int64_constants_;
68 Zone* const zone_; 78 Zone* const zone_;
69 79
70 DISALLOW_COPY_AND_ASSIGN(CommonNodeCache); 80 DISALLOW_COPY_AND_ASSIGN(CommonNodeCache);
71 }; 81 };
72 82
73 } // namespace compiler 83 } // namespace compiler
74 } // namespace internal 84 } // namespace internal
75 } // namespace v8 85 } // namespace v8
76 86
77 #endif // V8_COMPILER_COMMON_NODE_CACHE_H_ 87 #endif // V8_COMPILER_COMMON_NODE_CACHE_H_
OLDNEW
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/common-node-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698