| 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/compiler/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
| 6 | 6 |
| 7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
| 8 #include "src/compiler/control-builders.h" | 8 #include "src/compiler/control-builders.h" |
| 9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
| 10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 893 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 894 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); | 894 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); |
| 895 // Fall through. | 895 // Fall through. |
| 896 case ObjectLiteral::Property::COMPUTED: { | 896 case ObjectLiteral::Property::COMPUTED: { |
| 897 // It is safe to use [[Put]] here because the boilerplate already | 897 // It is safe to use [[Put]] here because the boilerplate already |
| 898 // contains computed properties with an uninitialized value. | 898 // contains computed properties with an uninitialized value. |
| 899 if (key->value()->IsInternalizedString()) { | 899 if (key->value()->IsInternalizedString()) { |
| 900 if (property->emit_store()) { | 900 if (property->emit_store()) { |
| 901 VisitForValue(property->value()); | 901 VisitForValue(property->value()); |
| 902 Node* value = environment()->Pop(); | 902 Node* value = environment()->Pop(); |
| 903 PrintableUnique<Name> name = MakeUnique(key->AsPropertyName()); | 903 Unique<Name> name = MakeUnique(key->AsPropertyName()); |
| 904 Node* store = NewNode(javascript()->StoreNamed(strict_mode(), name), | 904 Node* store = NewNode(javascript()->StoreNamed(strict_mode(), name), |
| 905 literal, value); | 905 literal, value); |
| 906 PrepareFrameState(store, key->id()); | 906 PrepareFrameState(store, key->id()); |
| 907 } else { | 907 } else { |
| 908 VisitForEffect(property->value()); | 908 VisitForEffect(property->value()); |
| 909 } | 909 } |
| 910 break; | 910 break; |
| 911 } | 911 } |
| 912 environment()->Push(literal); // Duplicate receiver. | 912 environment()->Push(literal); // Duplicate receiver. |
| 913 VisitForValue(property->key()); | 913 VisitForValue(property->key()); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 Variable* var = expr->AsVariableProxy()->var(); | 1018 Variable* var = expr->AsVariableProxy()->var(); |
| 1019 // TODO(jarin) Fill in the correct bailout id. | 1019 // TODO(jarin) Fill in the correct bailout id. |
| 1020 BuildVariableAssignment(var, value, Token::ASSIGN, BailoutId::None()); | 1020 BuildVariableAssignment(var, value, Token::ASSIGN, BailoutId::None()); |
| 1021 break; | 1021 break; |
| 1022 } | 1022 } |
| 1023 case NAMED_PROPERTY: { | 1023 case NAMED_PROPERTY: { |
| 1024 environment()->Push(value); | 1024 environment()->Push(value); |
| 1025 VisitForValue(property->obj()); | 1025 VisitForValue(property->obj()); |
| 1026 Node* object = environment()->Pop(); | 1026 Node* object = environment()->Pop(); |
| 1027 value = environment()->Pop(); | 1027 value = environment()->Pop(); |
| 1028 PrintableUnique<Name> name = | 1028 Unique<Name> name = |
| 1029 MakeUnique(property->key()->AsLiteral()->AsPropertyName()); | 1029 MakeUnique(property->key()->AsLiteral()->AsPropertyName()); |
| 1030 Node* store = | 1030 Node* store = |
| 1031 NewNode(javascript()->StoreNamed(strict_mode(), name), object, value); | 1031 NewNode(javascript()->StoreNamed(strict_mode(), name), object, value); |
| 1032 // TODO(jarin) Fill in the correct bailout id. | 1032 // TODO(jarin) Fill in the correct bailout id. |
| 1033 PrepareFrameState(store, BailoutId::None()); | 1033 PrepareFrameState(store, BailoutId::None()); |
| 1034 break; | 1034 break; |
| 1035 } | 1035 } |
| 1036 case KEYED_PROPERTY: { | 1036 case KEYED_PROPERTY: { |
| 1037 environment()->Push(value); | 1037 environment()->Push(value); |
| 1038 VisitForValue(property->obj()); | 1038 VisitForValue(property->obj()); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1077 if (expr->is_compound()) { | 1077 if (expr->is_compound()) { |
| 1078 Node* old_value = NULL; | 1078 Node* old_value = NULL; |
| 1079 switch (assign_type) { | 1079 switch (assign_type) { |
| 1080 case VARIABLE: { | 1080 case VARIABLE: { |
| 1081 Variable* variable = expr->target()->AsVariableProxy()->var(); | 1081 Variable* variable = expr->target()->AsVariableProxy()->var(); |
| 1082 old_value = BuildVariableLoad(variable, expr->target()->id()); | 1082 old_value = BuildVariableLoad(variable, expr->target()->id()); |
| 1083 break; | 1083 break; |
| 1084 } | 1084 } |
| 1085 case NAMED_PROPERTY: { | 1085 case NAMED_PROPERTY: { |
| 1086 Node* object = environment()->Top(); | 1086 Node* object = environment()->Top(); |
| 1087 PrintableUnique<Name> name = | 1087 Unique<Name> name = |
| 1088 MakeUnique(property->key()->AsLiteral()->AsPropertyName()); | 1088 MakeUnique(property->key()->AsLiteral()->AsPropertyName()); |
| 1089 old_value = NewNode(javascript()->LoadNamed(name), object); | 1089 old_value = NewNode(javascript()->LoadNamed(name), object); |
| 1090 PrepareFrameState(old_value, property->LoadId(), kPushOutput); | 1090 PrepareFrameState(old_value, property->LoadId(), kPushOutput); |
| 1091 break; | 1091 break; |
| 1092 } | 1092 } |
| 1093 case KEYED_PROPERTY: { | 1093 case KEYED_PROPERTY: { |
| 1094 Node* key = environment()->Top(); | 1094 Node* key = environment()->Top(); |
| 1095 Node* object = environment()->Peek(1); | 1095 Node* object = environment()->Peek(1); |
| 1096 old_value = NewNode(javascript()->LoadProperty(), object, key); | 1096 old_value = NewNode(javascript()->LoadProperty(), object, key); |
| 1097 PrepareFrameState(old_value, property->LoadId(), kPushOutput); | 1097 PrepareFrameState(old_value, property->LoadId(), kPushOutput); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1113 Node* value = environment()->Pop(); | 1113 Node* value = environment()->Pop(); |
| 1114 switch (assign_type) { | 1114 switch (assign_type) { |
| 1115 case VARIABLE: { | 1115 case VARIABLE: { |
| 1116 Variable* variable = expr->target()->AsVariableProxy()->var(); | 1116 Variable* variable = expr->target()->AsVariableProxy()->var(); |
| 1117 BuildVariableAssignment(variable, value, expr->op(), | 1117 BuildVariableAssignment(variable, value, expr->op(), |
| 1118 expr->AssignmentId()); | 1118 expr->AssignmentId()); |
| 1119 break; | 1119 break; |
| 1120 } | 1120 } |
| 1121 case NAMED_PROPERTY: { | 1121 case NAMED_PROPERTY: { |
| 1122 Node* object = environment()->Pop(); | 1122 Node* object = environment()->Pop(); |
| 1123 PrintableUnique<Name> name = | 1123 Unique<Name> name = |
| 1124 MakeUnique(property->key()->AsLiteral()->AsPropertyName()); | 1124 MakeUnique(property->key()->AsLiteral()->AsPropertyName()); |
| 1125 Node* store = | 1125 Node* store = |
| 1126 NewNode(javascript()->StoreNamed(strict_mode(), name), object, value); | 1126 NewNode(javascript()->StoreNamed(strict_mode(), name), object, value); |
| 1127 PrepareFrameState(store, expr->AssignmentId()); | 1127 PrepareFrameState(store, expr->AssignmentId()); |
| 1128 break; | 1128 break; |
| 1129 } | 1129 } |
| 1130 case KEYED_PROPERTY: { | 1130 case KEYED_PROPERTY: { |
| 1131 Node* key = environment()->Pop(); | 1131 Node* key = environment()->Pop(); |
| 1132 Node* object = environment()->Pop(); | 1132 Node* object = environment()->Pop(); |
| 1133 Node* store = NewNode(javascript()->StoreProperty(strict_mode()), object, | 1133 Node* store = NewNode(javascript()->StoreProperty(strict_mode()), object, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1158 Node* value = NewNode(op, exception); | 1158 Node* value = NewNode(op, exception); |
| 1159 ast_context()->ProduceValue(value); | 1159 ast_context()->ProduceValue(value); |
| 1160 } | 1160 } |
| 1161 | 1161 |
| 1162 | 1162 |
| 1163 void AstGraphBuilder::VisitProperty(Property* expr) { | 1163 void AstGraphBuilder::VisitProperty(Property* expr) { |
| 1164 Node* value; | 1164 Node* value; |
| 1165 if (expr->key()->IsPropertyName()) { | 1165 if (expr->key()->IsPropertyName()) { |
| 1166 VisitForValue(expr->obj()); | 1166 VisitForValue(expr->obj()); |
| 1167 Node* object = environment()->Pop(); | 1167 Node* object = environment()->Pop(); |
| 1168 PrintableUnique<Name> name = | 1168 Unique<Name> name = MakeUnique(expr->key()->AsLiteral()->AsPropertyName()); |
| 1169 MakeUnique(expr->key()->AsLiteral()->AsPropertyName()); | |
| 1170 value = NewNode(javascript()->LoadNamed(name), object); | 1169 value = NewNode(javascript()->LoadNamed(name), object); |
| 1171 } else { | 1170 } else { |
| 1172 VisitForValue(expr->obj()); | 1171 VisitForValue(expr->obj()); |
| 1173 VisitForValue(expr->key()); | 1172 VisitForValue(expr->key()); |
| 1174 Node* key = environment()->Pop(); | 1173 Node* key = environment()->Pop(); |
| 1175 Node* object = environment()->Pop(); | 1174 Node* object = environment()->Pop(); |
| 1176 value = NewNode(javascript()->LoadProperty(), object, key); | 1175 value = NewNode(javascript()->LoadProperty(), object, key); |
| 1177 } | 1176 } |
| 1178 PrepareFrameState(value, expr->id(), ast_context()->GetStateCombine()); | 1177 PrepareFrameState(value, expr->id(), ast_context()->GetStateCombine()); |
| 1179 ast_context()->ProduceValue(value); | 1178 ast_context()->ProduceValue(value); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1205 Node* pair = NewNode(op, current_context(), name); | 1204 Node* pair = NewNode(op, current_context(), name); |
| 1206 callee_value = NewNode(common()->Projection(0), pair); | 1205 callee_value = NewNode(common()->Projection(0), pair); |
| 1207 receiver_value = NewNode(common()->Projection(1), pair); | 1206 receiver_value = NewNode(common()->Projection(1), pair); |
| 1208 break; | 1207 break; |
| 1209 } | 1208 } |
| 1210 case Call::PROPERTY_CALL: { | 1209 case Call::PROPERTY_CALL: { |
| 1211 Property* property = callee->AsProperty(); | 1210 Property* property = callee->AsProperty(); |
| 1212 VisitForValue(property->obj()); | 1211 VisitForValue(property->obj()); |
| 1213 Node* object = environment()->Top(); | 1212 Node* object = environment()->Top(); |
| 1214 if (property->key()->IsPropertyName()) { | 1213 if (property->key()->IsPropertyName()) { |
| 1215 PrintableUnique<Name> name = | 1214 Unique<Name> name = |
| 1216 MakeUnique(property->key()->AsLiteral()->AsPropertyName()); | 1215 MakeUnique(property->key()->AsLiteral()->AsPropertyName()); |
| 1217 callee_value = NewNode(javascript()->LoadNamed(name), object); | 1216 callee_value = NewNode(javascript()->LoadNamed(name), object); |
| 1218 } else { | 1217 } else { |
| 1219 VisitForValue(property->key()); | 1218 VisitForValue(property->key()); |
| 1220 Node* key = environment()->Pop(); | 1219 Node* key = environment()->Pop(); |
| 1221 callee_value = NewNode(javascript()->LoadProperty(), object, key); | 1220 callee_value = NewNode(javascript()->LoadProperty(), object, key); |
| 1222 } | 1221 } |
| 1223 PrepareFrameState(callee_value, property->LoadId(), kPushOutput); | 1222 PrepareFrameState(callee_value, property->LoadId(), kPushOutput); |
| 1224 receiver_value = environment()->Pop(); | 1223 receiver_value = environment()->Pop(); |
| 1225 // Note that a PROPERTY_CALL requires the receiver to be wrapped into an | 1224 // Note that a PROPERTY_CALL requires the receiver to be wrapped into an |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 } | 1294 } |
| 1296 | 1295 |
| 1297 | 1296 |
| 1298 void AstGraphBuilder::VisitCallJSRuntime(CallRuntime* expr) { | 1297 void AstGraphBuilder::VisitCallJSRuntime(CallRuntime* expr) { |
| 1299 Handle<String> name = expr->name(); | 1298 Handle<String> name = expr->name(); |
| 1300 | 1299 |
| 1301 // The callee and the receiver both have to be pushed onto the operand stack | 1300 // The callee and the receiver both have to be pushed onto the operand stack |
| 1302 // before arguments are being evaluated. | 1301 // before arguments are being evaluated. |
| 1303 CallFunctionFlags flags = NO_CALL_FUNCTION_FLAGS; | 1302 CallFunctionFlags flags = NO_CALL_FUNCTION_FLAGS; |
| 1304 Node* receiver_value = BuildLoadBuiltinsObject(); | 1303 Node* receiver_value = BuildLoadBuiltinsObject(); |
| 1305 PrintableUnique<String> unique = MakeUnique(name); | 1304 Unique<String> unique = MakeUnique(name); |
| 1306 Node* callee_value = NewNode(javascript()->LoadNamed(unique), receiver_value); | 1305 Node* callee_value = NewNode(javascript()->LoadNamed(unique), receiver_value); |
| 1307 // TODO(jarin): Find/create a bailout id to deoptimize to (crankshaft | 1306 // TODO(jarin): Find/create a bailout id to deoptimize to (crankshaft |
| 1308 // refuses to optimize functions with jsruntime calls). | 1307 // refuses to optimize functions with jsruntime calls). |
| 1309 PrepareFrameState(callee_value, BailoutId::None(), kPushOutput); | 1308 PrepareFrameState(callee_value, BailoutId::None(), kPushOutput); |
| 1310 environment()->Push(callee_value); | 1309 environment()->Push(callee_value); |
| 1311 environment()->Push(receiver_value); | 1310 environment()->Push(receiver_value); |
| 1312 | 1311 |
| 1313 // Evaluate all arguments to the JS runtime call. | 1312 // Evaluate all arguments to the JS runtime call. |
| 1314 ZoneList<Expression*>* args = expr->arguments(); | 1313 ZoneList<Expression*>* args = expr->arguments(); |
| 1315 VisitForValues(args); | 1314 VisitForValues(args); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1378 switch (assign_type) { | 1377 switch (assign_type) { |
| 1379 case VARIABLE: { | 1378 case VARIABLE: { |
| 1380 Variable* variable = expr->expression()->AsVariableProxy()->var(); | 1379 Variable* variable = expr->expression()->AsVariableProxy()->var(); |
| 1381 old_value = BuildVariableLoad(variable, expr->expression()->id()); | 1380 old_value = BuildVariableLoad(variable, expr->expression()->id()); |
| 1382 stack_depth = 0; | 1381 stack_depth = 0; |
| 1383 break; | 1382 break; |
| 1384 } | 1383 } |
| 1385 case NAMED_PROPERTY: { | 1384 case NAMED_PROPERTY: { |
| 1386 VisitForValue(property->obj()); | 1385 VisitForValue(property->obj()); |
| 1387 Node* object = environment()->Top(); | 1386 Node* object = environment()->Top(); |
| 1388 PrintableUnique<Name> name = | 1387 Unique<Name> name = |
| 1389 MakeUnique(property->key()->AsLiteral()->AsPropertyName()); | 1388 MakeUnique(property->key()->AsLiteral()->AsPropertyName()); |
| 1390 old_value = NewNode(javascript()->LoadNamed(name), object); | 1389 old_value = NewNode(javascript()->LoadNamed(name), object); |
| 1391 PrepareFrameState(old_value, property->LoadId(), kPushOutput); | 1390 PrepareFrameState(old_value, property->LoadId(), kPushOutput); |
| 1392 stack_depth = 1; | 1391 stack_depth = 1; |
| 1393 break; | 1392 break; |
| 1394 } | 1393 } |
| 1395 case KEYED_PROPERTY: { | 1394 case KEYED_PROPERTY: { |
| 1396 VisitForValue(property->obj()); | 1395 VisitForValue(property->obj()); |
| 1397 VisitForValue(property->key()); | 1396 VisitForValue(property->key()); |
| 1398 Node* key = environment()->Top(); | 1397 Node* key = environment()->Top(); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1420 // Store the value. | 1419 // Store the value. |
| 1421 switch (assign_type) { | 1420 switch (assign_type) { |
| 1422 case VARIABLE: { | 1421 case VARIABLE: { |
| 1423 Variable* variable = expr->expression()->AsVariableProxy()->var(); | 1422 Variable* variable = expr->expression()->AsVariableProxy()->var(); |
| 1424 BuildVariableAssignment(variable, value, expr->op(), | 1423 BuildVariableAssignment(variable, value, expr->op(), |
| 1425 expr->AssignmentId()); | 1424 expr->AssignmentId()); |
| 1426 break; | 1425 break; |
| 1427 } | 1426 } |
| 1428 case NAMED_PROPERTY: { | 1427 case NAMED_PROPERTY: { |
| 1429 Node* object = environment()->Pop(); | 1428 Node* object = environment()->Pop(); |
| 1430 PrintableUnique<Name> name = | 1429 Unique<Name> name = |
| 1431 MakeUnique(property->key()->AsLiteral()->AsPropertyName()); | 1430 MakeUnique(property->key()->AsLiteral()->AsPropertyName()); |
| 1432 Node* store = | 1431 Node* store = |
| 1433 NewNode(javascript()->StoreNamed(strict_mode(), name), object, value); | 1432 NewNode(javascript()->StoreNamed(strict_mode(), name), object, value); |
| 1434 PrepareFrameState(store, expr->AssignmentId()); | 1433 PrepareFrameState(store, expr->AssignmentId()); |
| 1435 break; | 1434 break; |
| 1436 } | 1435 } |
| 1437 case KEYED_PROPERTY: { | 1436 case KEYED_PROPERTY: { |
| 1438 Node* key = environment()->Pop(); | 1437 Node* key = environment()->Pop(); |
| 1439 Node* object = environment()->Pop(); | 1438 Node* object = environment()->Pop(); |
| 1440 Node* store = NewNode(javascript()->StoreProperty(strict_mode()), object, | 1439 Node* store = NewNode(javascript()->StoreProperty(strict_mode()), object, |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1739 | 1738 |
| 1740 Node* AstGraphBuilder::BuildVariableLoad(Variable* variable, | 1739 Node* AstGraphBuilder::BuildVariableLoad(Variable* variable, |
| 1741 BailoutId bailout_id, | 1740 BailoutId bailout_id, |
| 1742 ContextualMode contextual_mode) { | 1741 ContextualMode contextual_mode) { |
| 1743 Node* the_hole = jsgraph()->TheHoleConstant(); | 1742 Node* the_hole = jsgraph()->TheHoleConstant(); |
| 1744 VariableMode mode = variable->mode(); | 1743 VariableMode mode = variable->mode(); |
| 1745 switch (variable->location()) { | 1744 switch (variable->location()) { |
| 1746 case Variable::UNALLOCATED: { | 1745 case Variable::UNALLOCATED: { |
| 1747 // Global var, const, or let variable. | 1746 // Global var, const, or let variable. |
| 1748 Node* global = BuildLoadGlobalObject(); | 1747 Node* global = BuildLoadGlobalObject(); |
| 1749 PrintableUnique<Name> name = MakeUnique(variable->name()); | 1748 Unique<Name> name = MakeUnique(variable->name()); |
| 1750 Operator* op = javascript()->LoadNamed(name, contextual_mode); | 1749 Operator* op = javascript()->LoadNamed(name, contextual_mode); |
| 1751 Node* node = NewNode(op, global); | 1750 Node* node = NewNode(op, global); |
| 1752 PrepareFrameState(node, bailout_id, kPushOutput); | 1751 PrepareFrameState(node, bailout_id, kPushOutput); |
| 1753 return node; | 1752 return node; |
| 1754 } | 1753 } |
| 1755 case Variable::PARAMETER: | 1754 case Variable::PARAMETER: |
| 1756 case Variable::LOCAL: { | 1755 case Variable::LOCAL: { |
| 1757 // Local var, const, or let variable. | 1756 // Local var, const, or let variable. |
| 1758 Node* value = environment()->Lookup(variable); | 1757 Node* value = environment()->Lookup(variable); |
| 1759 if (mode == CONST_LEGACY) { | 1758 if (mode == CONST_LEGACY) { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1840 | 1839 |
| 1841 Node* AstGraphBuilder::BuildVariableAssignment(Variable* variable, Node* value, | 1840 Node* AstGraphBuilder::BuildVariableAssignment(Variable* variable, Node* value, |
| 1842 Token::Value op, | 1841 Token::Value op, |
| 1843 BailoutId bailout_id) { | 1842 BailoutId bailout_id) { |
| 1844 Node* the_hole = jsgraph()->TheHoleConstant(); | 1843 Node* the_hole = jsgraph()->TheHoleConstant(); |
| 1845 VariableMode mode = variable->mode(); | 1844 VariableMode mode = variable->mode(); |
| 1846 switch (variable->location()) { | 1845 switch (variable->location()) { |
| 1847 case Variable::UNALLOCATED: { | 1846 case Variable::UNALLOCATED: { |
| 1848 // Global var, const, or let variable. | 1847 // Global var, const, or let variable. |
| 1849 Node* global = BuildLoadGlobalObject(); | 1848 Node* global = BuildLoadGlobalObject(); |
| 1850 PrintableUnique<Name> name = MakeUnique(variable->name()); | 1849 Unique<Name> name = MakeUnique(variable->name()); |
| 1851 Operator* op = javascript()->StoreNamed(strict_mode(), name); | 1850 Operator* op = javascript()->StoreNamed(strict_mode(), name); |
| 1852 Node* store = NewNode(op, global, value); | 1851 Node* store = NewNode(op, global, value); |
| 1853 PrepareFrameState(store, bailout_id); | 1852 PrepareFrameState(store, bailout_id); |
| 1854 return store; | 1853 return store; |
| 1855 } | 1854 } |
| 1856 case Variable::PARAMETER: | 1855 case Variable::PARAMETER: |
| 1857 case Variable::LOCAL: | 1856 case Variable::LOCAL: |
| 1858 // Local var, const, or let variable. | 1857 // Local var, const, or let variable. |
| 1859 if (mode == CONST_LEGACY && op == Token::INIT_CONST_LEGACY) { | 1858 if (mode == CONST_LEGACY && op == Token::INIT_CONST_LEGACY) { |
| 1860 // Perform an initialization check for legacy const variables. | 1859 // Perform an initialization check for legacy const variables. |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2013 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); | 2012 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); |
| 2014 | 2013 |
| 2015 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); | 2014 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); |
| 2016 node->ReplaceInput(frame_state_index, frame_state_node); | 2015 node->ReplaceInput(frame_state_index, frame_state_node); |
| 2017 } | 2016 } |
| 2018 } | 2017 } |
| 2019 | 2018 |
| 2020 } | 2019 } |
| 2021 } | 2020 } |
| 2022 } // namespace v8::internal::compiler | 2021 } // namespace v8::internal::compiler |
| OLD | NEW |