| 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/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| (...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1373 | 1373 |
| 1374 // Create nodes to store computed values into the literal. | 1374 // Create nodes to store computed values into the literal. |
| 1375 AccessorTable accessor_table(local_zone()); | 1375 AccessorTable accessor_table(local_zone()); |
| 1376 for (int i = 0; i < expr->properties()->length(); i++) { | 1376 for (int i = 0; i < expr->properties()->length(); i++) { |
| 1377 ObjectLiteral::Property* property = expr->properties()->at(i); | 1377 ObjectLiteral::Property* property = expr->properties()->at(i); |
| 1378 DCHECK(!property->is_computed_name()); | 1378 DCHECK(!property->is_computed_name()); |
| 1379 if (property->IsCompileTimeValue()) continue; | 1379 if (property->IsCompileTimeValue()) continue; |
| 1380 | 1380 |
| 1381 Literal* key = property->key()->AsLiteral(); | 1381 Literal* key = property->key()->AsLiteral(); |
| 1382 switch (property->kind()) { | 1382 switch (property->kind()) { |
| 1383 case ObjectLiteral::Property::SPREAD: |
| 1383 case ObjectLiteral::Property::CONSTANT: | 1384 case ObjectLiteral::Property::CONSTANT: |
| 1384 UNREACHABLE(); | 1385 UNREACHABLE(); |
| 1385 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1386 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 1386 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); | 1387 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); |
| 1387 // Fall through. | 1388 // Fall through. |
| 1388 case ObjectLiteral::Property::COMPUTED: { | 1389 case ObjectLiteral::Property::COMPUTED: { |
| 1389 // It is safe to use [[Put]] here because the boilerplate already | 1390 // It is safe to use [[Put]] here because the boilerplate already |
| 1390 // contains computed properties with an uninitialized value. | 1391 // contains computed properties with an uninitialized value. |
| 1391 if (key->IsStringLiteral()) { | 1392 if (key->IsStringLiteral()) { |
| 1392 DCHECK(key->IsPropertyName()); | 1393 DCHECK(key->IsPropertyName()); |
| (...skipping 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3298 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment, | 3299 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment, |
| 3299 SourcePositionTable* source_positions, int inlining_id) | 3300 SourcePositionTable* source_positions, int inlining_id) |
| 3300 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency, | 3301 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency, |
| 3301 loop_assignment), | 3302 loop_assignment), |
| 3302 source_positions_(source_positions), | 3303 source_positions_(source_positions), |
| 3303 start_position_(info->shared_info()->start_position(), inlining_id) {} | 3304 start_position_(info->shared_info()->start_position(), inlining_id) {} |
| 3304 | 3305 |
| 3305 } // namespace compiler | 3306 } // namespace compiler |
| 3306 } // namespace internal | 3307 } // namespace internal |
| 3307 } // namespace v8 | 3308 } // namespace v8 |
| OLD | NEW |