OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 | 381 |
382 | 382 |
383 void AstTyper::VisitAssignment(Assignment* expr) { | 383 void AstTyper::VisitAssignment(Assignment* expr) { |
384 // TODO(rossberg): Can we clean this up? | 384 // TODO(rossberg): Can we clean this up? |
385 if (expr->is_compound()) { | 385 if (expr->is_compound()) { |
386 // Collect type feedback. | 386 // Collect type feedback. |
387 Expression* target = expr->target(); | 387 Expression* target = expr->target(); |
388 Property* prop = target->AsProperty(); | 388 Property* prop = target->AsProperty(); |
389 if (prop != NULL) { | 389 if (prop != NULL) { |
390 prop->RecordTypeFeedback(oracle(), zone()); | 390 prop->RecordTypeFeedback(oracle(), zone()); |
391 if (!prop->key()->IsPropertyName()) { // i.e., keyed | 391 expr->RecordTypeFeedback(oracle(), zone()); |
392 expr->RecordTypeFeedback(oracle(), zone()); | |
393 } | |
394 } | 392 } |
395 | 393 |
396 RECURSE(Visit(expr->binary_operation())); | 394 RECURSE(Visit(expr->binary_operation())); |
397 | 395 |
398 NarrowType(expr, expr->binary_operation()->bounds()); | 396 NarrowType(expr, expr->binary_operation()->bounds()); |
399 } else { | 397 } else { |
400 // Collect type feedback. | 398 // Collect type feedback. |
401 if (expr->target()->IsProperty()) { | 399 if (expr->target()->IsProperty()) { |
402 expr->RecordTypeFeedback(oracle(), zone()); | 400 expr->RecordTypeFeedback(oracle(), zone()); |
403 } | 401 } |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 695 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
698 } | 696 } |
699 | 697 |
700 | 698 |
701 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 699 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
702 RECURSE(Visit(stmt->body())); | 700 RECURSE(Visit(stmt->body())); |
703 } | 701 } |
704 | 702 |
705 | 703 |
706 } } // namespace v8::internal | 704 } } // namespace v8::internal |
OLD | NEW |