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

Side by Side Diff: src/compiler/change-lowering.cc

Issue 456843004: Revert 23077 - "Use CommonNodeCache for heap constants in ChangeLowering." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/compiler/common-node-cache.h » ('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 #include "src/compiler/change-lowering.h" 5 #include "src/compiler/change-lowering.h"
6 6
7 #include "src/compiler/common-node-cache.h" 7 #include "src/compiler/common-node-cache.h"
8 #include "src/compiler/graph.h" 8 #include "src/compiler/graph.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 16 matching lines...) Expand all
27 Node* ChangeLoweringBase::ExternalConstant(ExternalReference reference) { 27 Node* ChangeLoweringBase::ExternalConstant(ExternalReference reference) {
28 Node** loc = cache()->FindExternalConstant(reference); 28 Node** loc = cache()->FindExternalConstant(reference);
29 if (*loc == NULL) { 29 if (*loc == NULL) {
30 *loc = graph()->NewNode(common()->ExternalConstant(reference)); 30 *loc = graph()->NewNode(common()->ExternalConstant(reference));
31 } 31 }
32 return *loc; 32 return *loc;
33 } 33 }
34 34
35 35
36 Node* ChangeLoweringBase::HeapConstant(PrintableUnique<HeapObject> value) { 36 Node* ChangeLoweringBase::HeapConstant(PrintableUnique<HeapObject> value) {
37 Node** loc = cache()->FindHeapConstant(value); 37 // TODO(bmeurer): Use common node cache.
38 if (*loc == NULL) { 38 return graph()->NewNode(common()->HeapConstant(value));
39 *loc = graph()->NewNode(common()->HeapConstant(value));
40 }
41 return *loc;
42 } 39 }
43 40
44 41
45 Node* ChangeLoweringBase::ImmovableHeapConstant(Handle<HeapObject> value) { 42 Node* ChangeLoweringBase::ImmovableHeapConstant(Handle<HeapObject> value) {
46 return HeapConstant( 43 return HeapConstant(
47 PrintableUnique<HeapObject>::CreateImmovable(graph()->zone(), value)); 44 PrintableUnique<HeapObject>::CreateImmovable(graph()->zone(), value));
48 } 45 }
49 46
50 47
51 Node* ChangeLoweringBase::Int32Constant(int32_t value) { 48 Node* ChangeLoweringBase::Int32Constant(int32_t value) {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 return Replace(phi); 251 return Replace(phi);
255 } 252 }
256 253
257 254
258 template class ChangeLowering<4>; 255 template class ChangeLowering<4>;
259 template class ChangeLowering<8>; 256 template class ChangeLowering<8>;
260 257
261 } // namespace compiler 258 } // namespace compiler
262 } // namespace internal 259 } // namespace internal
263 } // namespace v8 260 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/common-node-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698