| 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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 check_false->AppendInput(graph()->zone(), if_false); | 995 check_false->AppendInput(graph()->zone(), if_false); |
| 996 check_true = if_true; | 996 check_true = if_true; |
| 997 } | 997 } |
| 998 | 998 |
| 999 // Fast case, because variable is not shadowed. Perform global object load. | 999 // Fast case, because variable is not shadowed. Perform global object load. |
| 1000 Unique<Name> name = Unique<Name>::CreateUninitialized(access.name()); | 1000 Unique<Name> name = Unique<Name>::CreateUninitialized(access.name()); |
| 1001 Node* global = graph()->NewNode( | 1001 Node* global = graph()->NewNode( |
| 1002 javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true), context, | 1002 javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true), context, |
| 1003 context, effect); | 1003 context, effect); |
| 1004 Node* fast = graph()->NewNode( | 1004 Node* fast = graph()->NewNode( |
| 1005 javascript()->LoadGlobal(name, access.feedback(), access.mode()), global, | 1005 javascript()->LoadGlobal(name, access.feedback(), access.mode()), context, |
| 1006 vector, context, state1, state2, global, check_true); | 1006 global, vector, context, state1, state2, global, check_true); |
| 1007 | 1007 |
| 1008 // Slow case, because variable potentially shadowed. Perform dynamic lookup. | 1008 // Slow case, because variable potentially shadowed. Perform dynamic lookup. |
| 1009 uint32_t check_bitset = DynamicGlobalAccess::kFullCheckRequired; | 1009 uint32_t check_bitset = DynamicGlobalAccess::kFullCheckRequired; |
| 1010 Node* slow = graph()->NewNode( | 1010 Node* slow = graph()->NewNode( |
| 1011 javascript()->LoadDynamicGlobal(access.name(), check_bitset, | 1011 javascript()->LoadDynamicGlobal(access.name(), check_bitset, |
| 1012 access.feedback(), access.mode()), | 1012 access.feedback(), access.mode()), |
| 1013 vector, context, context, state1, state2, effect, check_false); | 1013 vector, context, context, state1, state2, effect, check_false); |
| 1014 | 1014 |
| 1015 // Replace value, effect and control uses accordingly. | 1015 // Replace value, effect and control uses accordingly. |
| 1016 Node* new_control = | 1016 Node* new_control = |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1686 } | 1686 } |
| 1687 | 1687 |
| 1688 | 1688 |
| 1689 MachineOperatorBuilder* JSTypedLowering::machine() const { | 1689 MachineOperatorBuilder* JSTypedLowering::machine() const { |
| 1690 return jsgraph()->machine(); | 1690 return jsgraph()->machine(); |
| 1691 } | 1691 } |
| 1692 | 1692 |
| 1693 } // namespace compiler | 1693 } // namespace compiler |
| 1694 } // namespace internal | 1694 } // namespace internal |
| 1695 } // namespace v8 | 1695 } // namespace v8 |
| OLD | NEW |