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

Side by Side Diff: src/compiler/js-create-lowering.cc

Issue 2570843002: Fix usage of literal cloning for large double arrays. (Closed)
Patch Set: Addressed comments. Created 4 years 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/code-stubs.cc ('k') | src/compiler/js-generic-lowering.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/js-create-lowering.h" 5 #include "src/compiler/js-create-lowering.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/compilation-dependencies.h" 9 #include "src/compilation-dependencies.h"
10 #include "src/compiler/access-builder.h" 10 #include "src/compiler/access-builder.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 for (int i = 0; i < length; i++) { 155 for (int i = 0; i < length; i++) {
156 if ((*max_properties)-- == 0) return false; 156 if ((*max_properties)-- == 0) return false;
157 Handle<Object> value(fast_elements->get(i), isolate); 157 Handle<Object> value(fast_elements->get(i), isolate);
158 if (value->IsJSObject()) { 158 if (value->IsJSObject()) {
159 Handle<JSObject> value_object = Handle<JSObject>::cast(value); 159 Handle<JSObject> value_object = Handle<JSObject>::cast(value);
160 if (!IsFastLiteral(value_object, max_depth - 1, max_properties)) { 160 if (!IsFastLiteral(value_object, max_depth - 1, max_properties)) {
161 return false; 161 return false;
162 } 162 }
163 } 163 }
164 } 164 }
165 } else if (!boilerplate->HasFastDoubleElements()) { 165 } else if (boilerplate->HasFastDoubleElements()) {
166 if (elements->Size() > kMaxRegularHeapObjectSize) return false;
167 } else {
166 return false; 168 return false;
167 } 169 }
168 } 170 }
169 171
170 // TODO(turbofan): Do we want to support out-of-object properties? 172 // TODO(turbofan): Do we want to support out-of-object properties?
171 Handle<FixedArray> properties(boilerplate->properties(), isolate); 173 Handle<FixedArray> properties(boilerplate->properties(), isolate);
172 if (properties->length() > 0) return false; 174 if (properties->length() > 0) return false;
173 175
174 // Check the in-object properties. 176 // Check the in-object properties.
175 Handle<DescriptorArray> descriptors( 177 Handle<DescriptorArray> descriptors(
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 return jsgraph()->simplified(); 1363 return jsgraph()->simplified();
1362 } 1364 }
1363 1365
1364 MachineOperatorBuilder* JSCreateLowering::machine() const { 1366 MachineOperatorBuilder* JSCreateLowering::machine() const {
1365 return jsgraph()->machine(); 1367 return jsgraph()->machine();
1366 } 1368 }
1367 1369
1368 } // namespace compiler 1370 } // namespace compiler
1369 } // namespace internal 1371 } // namespace internal
1370 } // namespace v8 1372 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698