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

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

Issue 1227893005: TypeofMode replaces TypeofState and ContextualMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 5 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
« no previous file with comments | « src/compiler/js-operator.cc ('k') | src/disassembler.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 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 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 check_false->AppendInput(graph()->zone(), if_false); 1016 check_false->AppendInput(graph()->zone(), if_false);
1017 check_true = if_true; 1017 check_true = if_true;
1018 } 1018 }
1019 1019
1020 // Fast case, because variable is not shadowed. Perform global object load. 1020 // Fast case, because variable is not shadowed. Perform global object load.
1021 Unique<Name> name = Unique<Name>::CreateUninitialized(access.name()); 1021 Unique<Name> name = Unique<Name>::CreateUninitialized(access.name());
1022 Node* global = graph()->NewNode( 1022 Node* global = graph()->NewNode(
1023 javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true), context, 1023 javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true), context,
1024 context, effect); 1024 context, effect);
1025 Node* fast = graph()->NewNode( 1025 Node* fast = graph()->NewNode(
1026 javascript()->LoadGlobal(name, access.feedback(), access.mode()), context, 1026 javascript()->LoadGlobal(name, access.feedback(), access.typeof_mode()),
1027 global, vector, context, state1, state2, global, check_true); 1027 context, global, vector, context, state1, state2, global, check_true);
1028 1028
1029 // Slow case, because variable potentially shadowed. Perform dynamic lookup. 1029 // Slow case, because variable potentially shadowed. Perform dynamic lookup.
1030 uint32_t check_bitset = DynamicGlobalAccess::kFullCheckRequired; 1030 uint32_t check_bitset = DynamicGlobalAccess::kFullCheckRequired;
1031 Node* slow = graph()->NewNode( 1031 Node* slow = graph()->NewNode(
1032 javascript()->LoadDynamicGlobal(access.name(), check_bitset, 1032 javascript()->LoadDynamicGlobal(access.name(), check_bitset,
1033 access.feedback(), access.mode()), 1033 access.feedback(), access.typeof_mode()),
1034 vector, context, context, state1, state2, effect, check_false); 1034 vector, context, context, state1, state2, effect, check_false);
1035 1035
1036 // Replace value, effect and control uses accordingly. 1036 // Replace value, effect and control uses accordingly.
1037 Node* new_control = 1037 Node* new_control =
1038 graph()->NewNode(common()->Merge(2), check_true, check_false); 1038 graph()->NewNode(common()->Merge(2), check_true, check_false);
1039 Node* new_effect = 1039 Node* new_effect =
1040 graph()->NewNode(common()->EffectPhi(2), fast, slow, new_control); 1040 graph()->NewNode(common()->EffectPhi(2), fast, slow, new_control);
1041 Node* new_value = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), fast, 1041 Node* new_value = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), fast,
1042 slow, new_control); 1042 slow, new_control);
1043 ReplaceWithValue(node, new_value, new_effect, new_control); 1043 ReplaceWithValue(node, new_value, new_effect, new_control);
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 } 1709 }
1710 1710
1711 1711
1712 MachineOperatorBuilder* JSTypedLowering::machine() const { 1712 MachineOperatorBuilder* JSTypedLowering::machine() const {
1713 return jsgraph()->machine(); 1713 return jsgraph()->machine();
1714 } 1714 }
1715 1715
1716 } // namespace compiler 1716 } // namespace compiler
1717 } // namespace internal 1717 } // namespace internal
1718 } // namespace v8 1718 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-operator.cc ('k') | src/disassembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698