Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/ast.h" | 5 #include "src/ast.h" |
| 6 | 6 |
| 7 #include <cmath> // For isfinite. | 7 #include <cmath> // For isfinite. |
| 8 #include "src/builtins.h" | 8 #include "src/builtins.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/contexts.h" | 10 #include "src/contexts.h" |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 608 | 608 |
| 609 void CallNew::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 609 void CallNew::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
| 610 int allocation_site_feedback_slot = FLAG_pretenuring_call_new | 610 int allocation_site_feedback_slot = FLAG_pretenuring_call_new |
| 611 ? AllocationSiteFeedbackSlot() | 611 ? AllocationSiteFeedbackSlot() |
| 612 : CallNewFeedbackSlot(); | 612 : CallNewFeedbackSlot(); |
| 613 allocation_site_ = | 613 allocation_site_ = |
| 614 oracle->GetCallNewAllocationSite(allocation_site_feedback_slot); | 614 oracle->GetCallNewAllocationSite(allocation_site_feedback_slot); |
| 615 is_monomorphic_ = oracle->CallNewIsMonomorphic(CallNewFeedbackSlot()); | 615 is_monomorphic_ = oracle->CallNewIsMonomorphic(CallNewFeedbackSlot()); |
| 616 if (is_monomorphic_) { | 616 if (is_monomorphic_) { |
| 617 target_ = oracle->GetCallNewTarget(CallNewFeedbackSlot()); | 617 target_ = oracle->GetCallNewTarget(CallNewFeedbackSlot()); |
| 618 if (!allocation_site_.is_null()) { | |
|
mvstanton
2014/09/24 15:13:52
ah, thanks!
| |
| 619 elements_kind_ = allocation_site_->GetElementsKind(); | |
| 620 } | |
| 621 } | 618 } |
| 622 } | 619 } |
| 623 | 620 |
| 624 | 621 |
| 625 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 622 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
| 626 TypeFeedbackId id = key()->LiteralFeedbackId(); | 623 TypeFeedbackId id = key()->LiteralFeedbackId(); |
| 627 SmallMapList maps; | 624 SmallMapList maps; |
| 628 oracle->CollectReceiverTypes(id, &maps); | 625 oracle->CollectReceiverTypes(id, &maps); |
| 629 receiver_type_ = maps.length() == 1 ? maps.at(0) | 626 receiver_type_ = maps.length() == 1 ? maps.at(0) |
| 630 : Handle<Map>::null(); | 627 : Handle<Map>::null(); |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1140 SNPrintF(buffer, "%d", Smi::cast(*value())->value()); | 1137 SNPrintF(buffer, "%d", Smi::cast(*value())->value()); |
| 1141 str = arr; | 1138 str = arr; |
| 1142 } else { | 1139 } else { |
| 1143 str = DoubleToCString(value()->Number(), buffer); | 1140 str = DoubleToCString(value()->Number(), buffer); |
| 1144 } | 1141 } |
| 1145 return isolate_->factory()->NewStringFromAsciiChecked(str); | 1142 return isolate_->factory()->NewStringFromAsciiChecked(str); |
| 1146 } | 1143 } |
| 1147 | 1144 |
| 1148 | 1145 |
| 1149 } } // namespace v8::internal | 1146 } } // namespace v8::internal |
| OLD | NEW |