Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 466 Node* context = NodeProperties::GetContextInput(node); | 466 Node* context = NodeProperties::GetContextInput(node); |
| 467 Node* effect = NodeProperties::GetEffectInput(node); | 467 Node* effect = NodeProperties::GetEffectInput(node); |
| 468 Node* control = NodeProperties::GetControlInput(node); | 468 Node* control = NodeProperties::GetControlInput(node); |
| 469 | 469 |
| 470 // Extract transition and tenuring feedback from the {site} and add | 470 // Extract transition and tenuring feedback from the {site} and add |
| 471 // appropriate code dependencies on the {site} if deoptimization is | 471 // appropriate code dependencies on the {site} if deoptimization is |
| 472 // enabled. | 472 // enabled. |
| 473 PretenureFlag pretenure = site->GetPretenureMode(); | 473 PretenureFlag pretenure = site->GetPretenureMode(); |
| 474 ElementsKind elements_kind = site->GetElementsKind(); | 474 ElementsKind elements_kind = site->GetElementsKind(); |
| 475 DCHECK(IsFastElementsKind(elements_kind)); | 475 DCHECK(IsFastElementsKind(elements_kind)); |
| 476 if (NodeProperties::GetType(length)->Max() > 0) { | |
|
Jarin
2016/07/06 04:39:59
Not sure whether we should thread through the type
| |
| 477 elements_kind = GetHoleyElementsKind(elements_kind); | |
| 478 } | |
| 476 dependencies()->AssumeTenuringDecision(site); | 479 dependencies()->AssumeTenuringDecision(site); |
| 477 dependencies()->AssumeTransitionStable(site); | 480 dependencies()->AssumeTransitionStable(site); |
| 478 | 481 |
| 479 // Retrieve the initial map for the array from the appropriate native context. | 482 // Retrieve the initial map for the array from the appropriate native context. |
| 480 Node* native_context = effect = graph()->NewNode( | 483 Node* native_context = effect = graph()->NewNode( |
| 481 javascript()->LoadContext(0, Context::NATIVE_CONTEXT_INDEX, true), | 484 javascript()->LoadContext(0, Context::NATIVE_CONTEXT_INDEX, true), |
| 482 context, context, effect); | 485 context, context, effect); |
| 483 Node* js_array_map = effect = graph()->NewNode( | 486 Node* js_array_map = effect = graph()->NewNode( |
| 484 javascript()->LoadContext(0, Context::ArrayMapIndex(elements_kind), true), | 487 javascript()->LoadContext(0, Context::ArrayMapIndex(elements_kind), true), |
| 485 native_context, native_context, effect); | 488 native_context, native_context, effect); |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1127 return jsgraph()->simplified(); | 1130 return jsgraph()->simplified(); |
| 1128 } | 1131 } |
| 1129 | 1132 |
| 1130 MachineOperatorBuilder* JSCreateLowering::machine() const { | 1133 MachineOperatorBuilder* JSCreateLowering::machine() const { |
| 1131 return jsgraph()->machine(); | 1134 return jsgraph()->machine(); |
| 1132 } | 1135 } |
| 1133 | 1136 |
| 1134 } // namespace compiler | 1137 } // namespace compiler |
| 1135 } // namespace internal | 1138 } // namespace internal |
| 1136 } // namespace v8 | 1139 } // namespace v8 |
| OLD | NEW |