| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/typing-asm.h" | 7 #include "src/typing-asm.h" |
| 8 | 8 |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 FAIL(expr, "illegal literal"); | 493 FAIL(expr, "illegal literal"); |
| 494 } | 494 } |
| 495 } | 495 } |
| 496 | 496 |
| 497 | 497 |
| 498 void AsmTyper::VisitRegExpLiteral(RegExpLiteral* expr) { | 498 void AsmTyper::VisitRegExpLiteral(RegExpLiteral* expr) { |
| 499 FAIL(expr, "regular expression encountered"); | 499 FAIL(expr, "regular expression encountered"); |
| 500 } | 500 } |
| 501 | 501 |
| 502 | 502 |
| 503 void AsmTyper::VisitAssignmentPattern(AssignmentPattern* expr) { |
| 504 Visit(expr->expression()); |
| 505 } |
| 506 |
| 507 |
| 503 void AsmTyper::VisitObjectLiteral(ObjectLiteral* expr) { | 508 void AsmTyper::VisitObjectLiteral(ObjectLiteral* expr) { |
| 504 if (in_function_) { | 509 if (in_function_) { |
| 505 FAIL(expr, "object literal in function"); | 510 FAIL(expr, "object literal in function"); |
| 506 } | 511 } |
| 507 // Allowed for asm module's export declaration. | 512 // Allowed for asm module's export declaration. |
| 508 ZoneList<ObjectLiteralProperty*>* props = expr->properties(); | 513 ZoneList<ObjectLiteralProperty*>* props = expr->properties(); |
| 509 for (int i = 0; i < props->length(); ++i) { | 514 for (int i = 0; i < props->length(); ++i) { |
| 510 ObjectLiteralProperty* prop = props->at(i); | 515 ObjectLiteralProperty* prop = props->at(i); |
| 511 RECURSE(VisitWithExpectation(prop->value(), Type::Any(zone()), | 516 RECURSE(VisitWithExpectation(prop->value(), Type::Any(zone()), |
| 512 "object property expected to be a function")); | 517 "object property expected to be a function")); |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1124 computed_type_->Print(); | 1129 computed_type_->Print(); |
| 1125 PrintF("Expected type: "); | 1130 PrintF("Expected type: "); |
| 1126 expected_type_->Print(); | 1131 expected_type_->Print(); |
| 1127 #endif | 1132 #endif |
| 1128 FAIL(expr, msg); | 1133 FAIL(expr, msg); |
| 1129 } | 1134 } |
| 1130 expected_type_ = save; | 1135 expected_type_ = save; |
| 1131 } | 1136 } |
| 1132 } // namespace internal | 1137 } // namespace internal |
| 1133 } // namespace v8 | 1138 } // namespace v8 |
| OLD | NEW |