| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 Token::Value op, | 130 Token::Value op, |
| 131 Expression* target, | 131 Expression* target, |
| 132 Expression* value, | 132 Expression* value, |
| 133 int pos) | 133 int pos) |
| 134 : Expression(isolate, pos), | 134 : Expression(isolate, pos), |
| 135 op_(op), | 135 op_(op), |
| 136 target_(target), | 136 target_(target), |
| 137 value_(value), | 137 value_(value), |
| 138 binary_operation_(NULL), | 138 binary_operation_(NULL), |
| 139 assignment_id_(GetNextId(isolate)), | 139 assignment_id_(GetNextId(isolate)), |
| 140 is_monomorphic_(false), | |
| 141 is_uninitialized_(false), | 140 is_uninitialized_(false), |
| 142 is_pre_monomorphic_(false), | 141 is_pre_monomorphic_(false), |
| 143 store_mode_(STANDARD_STORE) { } | 142 store_mode_(STANDARD_STORE) { } |
| 144 | 143 |
| 145 | 144 |
| 146 Token::Value Assignment::binary_op() const { | 145 Token::Value Assignment::binary_op() const { |
| 147 switch (op_) { | 146 switch (op_) { |
| 148 case Token::ASSIGN_BIT_OR: return Token::BIT_OR; | 147 case Token::ASSIGN_BIT_OR: return Token::BIT_OR; |
| 149 case Token::ASSIGN_BIT_XOR: return Token::BIT_XOR; | 148 case Token::ASSIGN_BIT_XOR: return Token::BIT_XOR; |
| 150 case Token::ASSIGN_BIT_AND: return Token::BIT_AND; | 149 case Token::ASSIGN_BIT_AND: return Token::BIT_AND; |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 if (value->IsAllocationSite()) { | 734 if (value->IsAllocationSite()) { |
| 736 AllocationSite* site = AllocationSite::cast(value); | 735 AllocationSite* site = AllocationSite::cast(value); |
| 737 elements_kind_ = site->GetElementsKind(); | 736 elements_kind_ = site->GetElementsKind(); |
| 738 } | 737 } |
| 739 } | 738 } |
| 740 } | 739 } |
| 741 | 740 |
| 742 | 741 |
| 743 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 742 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
| 744 TypeFeedbackId id = key()->LiteralFeedbackId(); | 743 TypeFeedbackId id = key()->LiteralFeedbackId(); |
| 745 receiver_type_ = oracle->ObjectLiteralStoreIsMonomorphic(id) | 744 SmallMapList maps; |
| 746 ? oracle->GetObjectLiteralStoreMap(id) : Handle<Map>::null(); | 745 oracle->CollectReceiverTypes(id, &maps); |
| 746 receiver_type_ = maps.length() == 1 ? maps.at(0) |
| 747 : Handle<Map>::null(); |
| 747 } | 748 } |
| 748 | 749 |
| 749 | 750 |
| 750 // ---------------------------------------------------------------------------- | 751 // ---------------------------------------------------------------------------- |
| 751 // Implementation of AstVisitor | 752 // Implementation of AstVisitor |
| 752 | 753 |
| 753 void AstVisitor::VisitDeclarations(ZoneList<Declaration*>* declarations) { | 754 void AstVisitor::VisitDeclarations(ZoneList<Declaration*>* declarations) { |
| 754 for (int i = 0; i < declarations->length(); i++) { | 755 for (int i = 0; i < declarations->length(); i++) { |
| 755 Visit(declarations->at(i)); | 756 Visit(declarations->at(i)); |
| 756 } | 757 } |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); | 1245 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); |
| 1245 str = arr; | 1246 str = arr; |
| 1246 } else { | 1247 } else { |
| 1247 str = DoubleToCString(value_->Number(), buffer); | 1248 str = DoubleToCString(value_->Number(), buffer); |
| 1248 } | 1249 } |
| 1249 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); | 1250 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); |
| 1250 } | 1251 } |
| 1251 | 1252 |
| 1252 | 1253 |
| 1253 } } // namespace v8::internal | 1254 } } // namespace v8::internal |
| OLD | NEW |