Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(591)

Side by Side Diff: src/ast.cc

Issue 16408005: CallNewArray sites need the original feedback cell at crankshaft time. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ast.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 holder_ = GetPrototypeForPrimitiveCheck(check_type_, oracle->isolate()); 648 holder_ = GetPrototypeForPrimitiveCheck(check_type_, oracle->isolate());
649 map = Handle<Map>(holder_->map()); 649 map = Handle<Map>(holder_->map());
650 } 650 }
651 is_monomorphic_ = ComputeTarget(map, name); 651 is_monomorphic_ = ComputeTarget(map, name);
652 } 652 }
653 } 653 }
654 } 654 }
655 655
656 656
657 void CallNew::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 657 void CallNew::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
658 allocation_info_cell_ = oracle->GetCallNewAllocationInfoCell(this);
658 is_monomorphic_ = oracle->CallNewIsMonomorphic(this); 659 is_monomorphic_ = oracle->CallNewIsMonomorphic(this);
659 if (is_monomorphic_) { 660 if (is_monomorphic_) {
660 target_ = oracle->GetCallNewTarget(this); 661 target_ = oracle->GetCallNewTarget(this);
661 elements_kind_ = oracle->GetCallNewElementsKind(this); 662 Object* value = allocation_info_cell_->value();
663 if (value->IsSmi()) {
rossberg 2013/06/06 09:24:19 I'm not sure how this can ever be true, given that
rossberg 2013/06/06 10:36:49 Never mind, I was overlooking the value method...
664 elements_kind_ = static_cast<ElementsKind>(Smi::cast(value)->value());
665 }
662 } 666 }
663 Handle<Object> alloc_elements_kind = oracle->GetInfo(CallNewFeedbackId());
664 // if (alloc_elements_kind->IsSmi())
665 // alloc_elements_kind_ = Handle<Smi>::cast(alloc_elements_kind);
666 alloc_elements_kind_ = alloc_elements_kind->IsSmi()
667 ? Handle<Smi>::cast(alloc_elements_kind)
668 : handle(Smi::FromInt(GetInitialFastElementsKind()), oracle->isolate());
669 } 667 }
670 668
671 669
672 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 670 void ObjectLiteral::Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
673 receiver_type_ = oracle->ObjectLiteralStoreIsMonomorphic(this) 671 receiver_type_ = oracle->ObjectLiteralStoreIsMonomorphic(this)
674 ? oracle->GetObjectLiteralStoreMap(this) 672 ? oracle->GetObjectLiteralStoreMap(this)
675 : Handle<Map>::null(); 673 : Handle<Map>::null();
676 } 674 }
677 675
678 676
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); 1192 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value());
1195 str = arr; 1193 str = arr;
1196 } else { 1194 } else {
1197 str = DoubleToCString(handle_->Number(), buffer); 1195 str = DoubleToCString(handle_->Number(), buffer);
1198 } 1196 }
1199 return factory->NewStringFromAscii(CStrVector(str)); 1197 return factory->NewStringFromAscii(CStrVector(str));
1200 } 1198 }
1201 1199
1202 1200
1203 } } // namespace v8::internal 1201 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698