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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 2051073004: Remove more dead code now that legacy const is gone (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix x64 build, add mips64 Created 4 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
« no previous file with comments | « no previous file | src/full-codegen/arm/full-codegen-arm.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/compiler/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/ast-loop-assignment-analyzer.h" 9 #include "src/compiler/ast-loop-assignment-analyzer.h"
10 #include "src/compiler/control-builders.h" 10 #include "src/compiler/control-builders.h"
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 } 1125 }
1126 break; 1126 break;
1127 case VariableLocation::CONTEXT: 1127 case VariableLocation::CONTEXT:
1128 if (hole_init) { 1128 if (hole_init) {
1129 Node* value = jsgraph()->TheHoleConstant(); 1129 Node* value = jsgraph()->TheHoleConstant();
1130 const Operator* op = javascript()->StoreContext(0, variable->index()); 1130 const Operator* op = javascript()->StoreContext(0, variable->index());
1131 NewNode(op, current_context(), value); 1131 NewNode(op, current_context(), value);
1132 } 1132 }
1133 break; 1133 break;
1134 case VariableLocation::LOOKUP: { 1134 case VariableLocation::LOOKUP: {
1135 DCHECK(!hole_init);
1135 Node* name = jsgraph()->Constant(variable->name()); 1136 Node* name = jsgraph()->Constant(variable->name());
1136 // For variables we must not push an initial value (such as 'undefined') 1137 Node* value = jsgraph()->ZeroConstant(); // Indicates no initial value.
1137 // because we may have a (legal) redeclaration and we must not destroy
1138 // the current value.
1139 Node* value =
1140 hole_init ? jsgraph()->TheHoleConstant()
1141 : jsgraph()->ZeroConstant(); // Indicates no initial value.
1142 Node* attr = 1138 Node* attr =
1143 jsgraph()->Constant(variable->DeclarationPropertyAttributes()); 1139 jsgraph()->Constant(variable->DeclarationPropertyAttributes());
1144 const Operator* op = 1140 const Operator* op =
1145 javascript()->CallRuntime(Runtime::kDeclareLookupSlot); 1141 javascript()->CallRuntime(Runtime::kDeclareLookupSlot);
1146 Node* store = NewNode(op, name, value, attr); 1142 Node* store = NewNode(op, name, value, attr);
1147 PrepareFrameState(store, decl->proxy()->id()); 1143 PrepareFrameState(store, decl->proxy()->id());
1148 break; 1144 break;
1149 } 1145 }
1150 } 1146 }
1151 } 1147 }
(...skipping 3217 matching lines...) Expand 10 before | Expand all | Expand 10 after
4369 // Phi does not exist yet, introduce one. 4365 // Phi does not exist yet, introduce one.
4370 value = NewPhi(inputs, value, control); 4366 value = NewPhi(inputs, value, control);
4371 value->ReplaceInput(inputs - 1, other); 4367 value->ReplaceInput(inputs - 1, other);
4372 } 4368 }
4373 return value; 4369 return value;
4374 } 4370 }
4375 4371
4376 } // namespace compiler 4372 } // namespace compiler
4377 } // namespace internal 4373 } // namespace internal
4378 } // namespace v8 4374 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698