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

Side by Side Diff: src/code-stubs.cc

Issue 15094018: Create AllocationSite objects, pointed to by AllocationSiteInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comment response Created 7 years, 5 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/code-stubs.h ('k') | src/code-stubs-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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 handler_table->set(0, Smi::FromInt(handler_offset_)); 656 handler_table->set(0, Smi::FromInt(handler_offset_));
657 code->set_handler_table(*handler_table); 657 code->set_handler_table(*handler_table);
658 } 658 }
659 659
660 660
661 void KeyedLoadDictionaryElementStub::Generate(MacroAssembler* masm) { 661 void KeyedLoadDictionaryElementStub::Generate(MacroAssembler* masm) {
662 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm); 662 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm);
663 } 663 }
664 664
665 665
666 void CreateAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
667 CreateAllocationSiteStub stub;
668 stub.GetCode(isolate)->set_is_pregenerated(true);
669 }
670
671
666 void KeyedStoreElementStub::Generate(MacroAssembler* masm) { 672 void KeyedStoreElementStub::Generate(MacroAssembler* masm) {
667 switch (elements_kind_) { 673 switch (elements_kind_) {
668 case FAST_ELEMENTS: 674 case FAST_ELEMENTS:
669 case FAST_HOLEY_ELEMENTS: 675 case FAST_HOLEY_ELEMENTS:
670 case FAST_SMI_ELEMENTS: 676 case FAST_SMI_ELEMENTS:
671 case FAST_HOLEY_SMI_ELEMENTS: { 677 case FAST_HOLEY_SMI_ELEMENTS: {
672 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, 678 KeyedStoreStubCompiler::GenerateStoreFastElement(masm,
673 is_js_array_, 679 is_js_array_,
674 elements_kind_, 680 elements_kind_,
675 store_mode_); 681 store_mode_);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 806
801 807
802 bool ToBooleanStub::Types::CanBeUndetectable() const { 808 bool ToBooleanStub::Types::CanBeUndetectable() const {
803 return Contains(ToBooleanStub::SPEC_OBJECT) 809 return Contains(ToBooleanStub::SPEC_OBJECT)
804 || Contains(ToBooleanStub::STRING); 810 || Contains(ToBooleanStub::STRING);
805 } 811 }
806 812
807 813
808 void ElementsTransitionAndStoreStub::Generate(MacroAssembler* masm) { 814 void ElementsTransitionAndStoreStub::Generate(MacroAssembler* masm) {
809 Label fail; 815 Label fail;
810 AllocationSiteMode mode = AllocationSiteInfo::GetMode(from_, to_); 816 AllocationSiteMode mode = AllocationSite::GetMode(from_, to_);
811 ASSERT(!IsFastHoleyElementsKind(from_) || IsFastHoleyElementsKind(to_)); 817 ASSERT(!IsFastHoleyElementsKind(from_) || IsFastHoleyElementsKind(to_));
812 if (!FLAG_trace_elements_transitions) { 818 if (!FLAG_trace_elements_transitions) {
813 if (IsFastSmiOrObjectElementsKind(to_)) { 819 if (IsFastSmiOrObjectElementsKind(to_)) {
814 if (IsFastSmiOrObjectElementsKind(from_)) { 820 if (IsFastSmiOrObjectElementsKind(from_)) {
815 ElementsTransitionGenerator:: 821 ElementsTransitionGenerator::
816 GenerateMapChangeElementsTransition(masm, mode, &fail); 822 GenerateMapChangeElementsTransition(masm, mode, &fail);
817 } else if (IsFastDoubleElementsKind(from_)) { 823 } else if (IsFastDoubleElementsKind(from_)) {
818 ASSERT(!IsFastSmiElementsKind(to_)); 824 ASSERT(!IsFastSmiElementsKind(to_));
819 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail); 825 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail);
820 } else { 826 } else {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 InstallDescriptor(isolate, &stub3); 915 InstallDescriptor(isolate, &stub3);
910 } 916 }
911 917
912 InternalArrayConstructorStub::InternalArrayConstructorStub( 918 InternalArrayConstructorStub::InternalArrayConstructorStub(
913 Isolate* isolate) { 919 Isolate* isolate) {
914 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 920 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
915 } 921 }
916 922
917 923
918 } } // namespace v8::internal 924 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698