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

Side by Side Diff: src/compiler/js-graph.cc

Issue 1413373002: [turbofan] We cannot unconditionally flatten cons strings in the JSGraph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | test/mjsunit/regress/regress-crbug-545364.js » ('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/code-stubs.h" 5 #include "src/code-stubs.h"
6 #include "src/compiler/js-graph.h" 6 #include "src/compiler/js-graph.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 #include "src/compiler/typer.h" 8 #include "src/compiler/typer.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 namespace compiler { 12 namespace compiler {
13 13
14 Node* JSGraph::ImmovableHeapConstant(Handle<HeapObject> value) { 14 Node* JSGraph::ImmovableHeapConstant(Handle<HeapObject> value) {
15 if (value->IsConsString()) { 15 // TODO(bmeurer): Flatten cons strings here before we canonicalize them?
16 value = String::Flatten(Handle<String>::cast(value), TENURED);
17 }
18 return graph()->NewNode(common()->HeapConstant(value)); 16 return graph()->NewNode(common()->HeapConstant(value));
19 } 17 }
20 18
21 19
22 #define CACHED(name, expr) \ 20 #define CACHED(name, expr) \
23 cached_nodes_[name] ? cached_nodes_[name] : (cached_nodes_[name] = (expr)) 21 cached_nodes_[name] ? cached_nodes_[name] : (cached_nodes_[name] = (expr))
24 22
25 23
26 Node* JSGraph::CEntryStubConstant(int result_size) { 24 Node* JSGraph::CEntryStubConstant(int result_size) {
27 if (result_size == 1) { 25 if (result_size == 1) {
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 for (size_t i = 0; i < arraysize(cached_nodes_); i++) { 202 for (size_t i = 0; i < arraysize(cached_nodes_); i++) {
205 if (Node* node = cached_nodes_[i]) { 203 if (Node* node = cached_nodes_[i]) {
206 if (!node->IsDead()) nodes->push_back(node); 204 if (!node->IsDead()) nodes->push_back(node);
207 } 205 }
208 } 206 }
209 } 207 }
210 208
211 } // namespace compiler 209 } // namespace compiler
212 } // namespace internal 210 } // namespace internal
213 } // namespace v8 211 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-545364.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698