| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 is_function_prototype_ = true; | 536 is_function_prototype_ = true; |
| 537 } else { | 537 } else { |
| 538 Literal* lit_key = key()->AsLiteral(); | 538 Literal* lit_key = key()->AsLiteral(); |
| 539 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); | 539 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); |
| 540 Handle<String> name = Handle<String>::cast(lit_key->handle()); | 540 Handle<String> name = Handle<String>::cast(lit_key->handle()); |
| 541 ZoneMapList* types = oracle->LoadReceiverTypes(this, name); | 541 ZoneMapList* types = oracle->LoadReceiverTypes(this, name); |
| 542 receiver_types_ = types; | 542 receiver_types_ = types; |
| 543 } | 543 } |
| 544 } else if (is_monomorphic_) { | 544 } else if (is_monomorphic_) { |
| 545 monomorphic_receiver_type_ = oracle->LoadMonomorphicReceiverType(this); | 545 monomorphic_receiver_type_ = oracle->LoadMonomorphicReceiverType(this); |
| 546 if (monomorphic_receiver_type_->has_external_array_elements()) { |
| 547 SetExternalArrayType(oracle->GetKeyedLoadExternalArrayType(this)); |
| 548 } |
| 546 } | 549 } |
| 547 } | 550 } |
| 548 | 551 |
| 549 | 552 |
| 550 void Assignment::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 553 void Assignment::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
| 551 Property* prop = target()->AsProperty(); | 554 Property* prop = target()->AsProperty(); |
| 552 ASSERT(prop != NULL); | 555 ASSERT(prop != NULL); |
| 553 is_monomorphic_ = oracle->StoreIsMonomorphic(this); | 556 is_monomorphic_ = oracle->StoreIsMonomorphic(this); |
| 554 if (prop->key()->IsPropertyName()) { | 557 if (prop->key()->IsPropertyName()) { |
| 555 Literal* lit_key = prop->key()->AsLiteral(); | 558 Literal* lit_key = prop->key()->AsLiteral(); |
| 556 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); | 559 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); |
| 557 Handle<String> name = Handle<String>::cast(lit_key->handle()); | 560 Handle<String> name = Handle<String>::cast(lit_key->handle()); |
| 558 ZoneMapList* types = oracle->StoreReceiverTypes(this, name); | 561 ZoneMapList* types = oracle->StoreReceiverTypes(this, name); |
| 559 receiver_types_ = types; | 562 receiver_types_ = types; |
| 560 } else if (is_monomorphic_) { | 563 } else if (is_monomorphic_) { |
| 561 // Record receiver type for monomorphic keyed loads. | 564 // Record receiver type for monomorphic keyed loads. |
| 562 monomorphic_receiver_type_ = oracle->StoreMonomorphicReceiverType(this); | 565 monomorphic_receiver_type_ = oracle->StoreMonomorphicReceiverType(this); |
| 566 if (monomorphic_receiver_type_->has_external_array_elements()) { |
| 567 SetExternalArrayType(oracle->GetKeyedStoreExternalArrayType(this)); |
| 568 } |
| 563 } | 569 } |
| 564 } | 570 } |
| 565 | 571 |
| 566 | 572 |
| 567 void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 573 void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
| 568 TypeInfo info = oracle->SwitchType(this); | 574 TypeInfo info = oracle->SwitchType(this); |
| 569 if (info.IsSmi()) { | 575 if (info.IsSmi()) { |
| 570 compare_type_ = SMI_ONLY; | 576 compare_type_ = SMI_ONLY; |
| 571 } else if (info.IsNonPrimitive()) { | 577 } else if (info.IsNonPrimitive()) { |
| 572 compare_type_ = OBJECT_ONLY; | 578 compare_type_ = OBJECT_ONLY; |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1056 } | 1062 } |
| 1057 } | 1063 } |
| 1058 | 1064 |
| 1059 | 1065 |
| 1060 CaseClause::CaseClause(Expression* label, | 1066 CaseClause::CaseClause(Expression* label, |
| 1061 ZoneList<Statement*>* statements, | 1067 ZoneList<Statement*>* statements, |
| 1062 int pos) | 1068 int pos) |
| 1063 : label_(label), | 1069 : label_(label), |
| 1064 statements_(statements), | 1070 statements_(statements), |
| 1065 position_(pos), | 1071 position_(pos), |
| 1066 compare_type_(NONE) {} | 1072 compare_type_(NONE), |
| 1073 entry_id_(AstNode::GetNextId()) { |
| 1074 } |
| 1067 | 1075 |
| 1068 } } // namespace v8::internal | 1076 } } // namespace v8::internal |
| OLD | NEW |