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

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

Issue 1168093002: [strong] Implement strong mode restrictions on property access (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix arm64 port Created 5 years, 6 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
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-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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 check_false->AppendInput(graph()->zone(), if_false); 963 check_false->AppendInput(graph()->zone(), if_false);
964 check_true = if_true; 964 check_true = if_true;
965 } 965 }
966 966
967 // Fast case, because variable is not shadowed. Perform global object load. 967 // Fast case, because variable is not shadowed. Perform global object load.
968 Unique<Name> name = Unique<Name>::CreateUninitialized(access.name()); 968 Unique<Name> name = Unique<Name>::CreateUninitialized(access.name());
969 Node* global = graph()->NewNode( 969 Node* global = graph()->NewNode(
970 javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true), context, 970 javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true), context,
971 context, effect); 971 context, effect);
972 Node* fast = graph()->NewNode( 972 Node* fast = graph()->NewNode(
973 javascript()->LoadNamed(name, access.feedback(), access.mode()), global, 973 javascript()->LoadNamed(name, access.feedback(), SLOPPY, access.mode()),
974 context, state1, state2, global, check_true); 974 global, context, state1, state2, global, check_true);
975 975
976 // Slow case, because variable potentially shadowed. Perform dynamic lookup. 976 // Slow case, because variable potentially shadowed. Perform dynamic lookup.
977 uint32_t check_bitset = DynamicGlobalAccess::kFullCheckRequired; 977 uint32_t check_bitset = DynamicGlobalAccess::kFullCheckRequired;
978 Node* slow = graph()->NewNode( 978 Node* slow = graph()->NewNode(
979 javascript()->LoadDynamicGlobal(access.name(), check_bitset, 979 javascript()->LoadDynamicGlobal(access.name(), check_bitset,
980 access.feedback(), access.mode()), 980 access.feedback(), access.mode()),
981 context, context, state1, state2, effect, check_false); 981 context, context, state1, state2, effect, check_false);
982 982
983 // Replace value, effect and control uses accordingly. 983 // Replace value, effect and control uses accordingly.
984 Node* new_control = 984 Node* new_control =
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 } 1611 }
1612 1612
1613 1613
1614 MachineOperatorBuilder* JSTypedLowering::machine() const { 1614 MachineOperatorBuilder* JSTypedLowering::machine() const {
1615 return jsgraph()->machine(); 1615 return jsgraph()->machine();
1616 } 1616 }
1617 1617
1618 } // namespace compiler 1618 } // namespace compiler
1619 } // namespace internal 1619 } // namespace internal
1620 } // namespace v8 1620 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698