| OLD | NEW |
| 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-factory.h" | 5 #include "src/code-factory.h" |
| 6 #include "src/compiler/access-builder.h" | 6 #include "src/compiler/access-builder.h" |
| 7 #include "src/compiler/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
| 8 #include "src/compiler/js-typed-lowering.h" | 8 #include "src/compiler/js-typed-lowering.h" |
| 9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 check_false->AppendInput(graph()->zone(), if_false); | 1018 check_false->AppendInput(graph()->zone(), if_false); |
| 1019 check_true = if_true; | 1019 check_true = if_true; |
| 1020 } | 1020 } |
| 1021 | 1021 |
| 1022 // Fast case, because variable is not shadowed. Perform global object load. | 1022 // Fast case, because variable is not shadowed. Perform global object load. |
| 1023 Unique<Name> name = Unique<Name>::CreateUninitialized(access.name()); | 1023 Unique<Name> name = Unique<Name>::CreateUninitialized(access.name()); |
| 1024 Node* global = graph()->NewNode( | 1024 Node* global = graph()->NewNode( |
| 1025 javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true), context, | 1025 javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true), context, |
| 1026 context, effect); | 1026 context, effect); |
| 1027 Node* fast = graph()->NewNode( | 1027 Node* fast = graph()->NewNode( |
| 1028 javascript()->LoadNamed(name, access.feedback(), access.mode()), global, | 1028 javascript()->LoadNamed(name, access.feedback(), SLOPPY, access.mode()), |
| 1029 vector, context, state1, state2, global, check_true); | 1029 global, vector, context, state1, state2, global, check_true); |
| 1030 | 1030 |
| 1031 // Slow case, because variable potentially shadowed. Perform dynamic lookup. | 1031 // Slow case, because variable potentially shadowed. Perform dynamic lookup. |
| 1032 uint32_t check_bitset = DynamicGlobalAccess::kFullCheckRequired; | 1032 uint32_t check_bitset = DynamicGlobalAccess::kFullCheckRequired; |
| 1033 Node* slow = graph()->NewNode( | 1033 Node* slow = graph()->NewNode( |
| 1034 javascript()->LoadDynamicGlobal(access.name(), check_bitset, | 1034 javascript()->LoadDynamicGlobal(access.name(), check_bitset, |
| 1035 access.feedback(), access.mode()), | 1035 access.feedback(), access.mode()), |
| 1036 vector, context, context, state1, state2, effect, check_false); | 1036 vector, context, context, state1, state2, effect, check_false); |
| 1037 | 1037 |
| 1038 // Replace value, effect and control uses accordingly. | 1038 // Replace value, effect and control uses accordingly. |
| 1039 Node* new_control = | 1039 Node* new_control = |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1707 } | 1707 } |
| 1708 | 1708 |
| 1709 | 1709 |
| 1710 MachineOperatorBuilder* JSTypedLowering::machine() const { | 1710 MachineOperatorBuilder* JSTypedLowering::machine() const { |
| 1711 return jsgraph()->machine(); | 1711 return jsgraph()->machine(); |
| 1712 } | 1712 } |
| 1713 | 1713 |
| 1714 } // namespace compiler | 1714 } // namespace compiler |
| 1715 } // namespace internal | 1715 } // namespace internal |
| 1716 } // namespace v8 | 1716 } // namespace v8 |
| OLD | NEW |