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

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: Platform ports and perf bugfix 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
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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 handler_table->set(0, Smi::FromInt(handler_offset_)); 544 handler_table->set(0, Smi::FromInt(handler_offset_));
545 code->set_handler_table(*handler_table); 545 code->set_handler_table(*handler_table);
546 } 546 }
547 547
548 548
549 void KeyedLoadDictionaryElementStub::Generate(MacroAssembler* masm) { 549 void KeyedLoadDictionaryElementStub::Generate(MacroAssembler* masm) {
550 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm); 550 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm);
551 } 551 }
552 552
553 553
554 void CreateAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
555 CreateAllocationSiteStub stub;
556 stub.GetCode(isolate)->set_is_pregenerated(true);
557 }
558
559
554 void KeyedStoreElementStub::Generate(MacroAssembler* masm) { 560 void KeyedStoreElementStub::Generate(MacroAssembler* masm) {
555 switch (elements_kind_) { 561 switch (elements_kind_) {
556 case FAST_ELEMENTS: 562 case FAST_ELEMENTS:
557 case FAST_HOLEY_ELEMENTS: 563 case FAST_HOLEY_ELEMENTS:
558 case FAST_SMI_ELEMENTS: 564 case FAST_SMI_ELEMENTS:
559 case FAST_HOLEY_SMI_ELEMENTS: { 565 case FAST_HOLEY_SMI_ELEMENTS: {
560 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, 566 KeyedStoreStubCompiler::GenerateStoreFastElement(masm,
561 is_js_array_, 567 is_js_array_,
562 elements_kind_, 568 elements_kind_,
563 store_mode_); 569 store_mode_);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 712
707 713
708 bool ToBooleanStub::Types::CanBeUndetectable() const { 714 bool ToBooleanStub::Types::CanBeUndetectable() const {
709 return Contains(ToBooleanStub::SPEC_OBJECT) 715 return Contains(ToBooleanStub::SPEC_OBJECT)
710 || Contains(ToBooleanStub::STRING); 716 || Contains(ToBooleanStub::STRING);
711 } 717 }
712 718
713 719
714 void ElementsTransitionAndStoreStub::Generate(MacroAssembler* masm) { 720 void ElementsTransitionAndStoreStub::Generate(MacroAssembler* masm) {
715 Label fail; 721 Label fail;
716 AllocationSiteMode mode = AllocationSiteInfo::GetMode(from_, to_); 722 AllocationSiteMode mode = AllocationSite::GetMode(from_, to_);
717 ASSERT(!IsFastHoleyElementsKind(from_) || IsFastHoleyElementsKind(to_)); 723 ASSERT(!IsFastHoleyElementsKind(from_) || IsFastHoleyElementsKind(to_));
718 if (!FLAG_trace_elements_transitions) { 724 if (!FLAG_trace_elements_transitions) {
719 if (IsFastSmiOrObjectElementsKind(to_)) { 725 if (IsFastSmiOrObjectElementsKind(to_)) {
720 if (IsFastSmiOrObjectElementsKind(from_)) { 726 if (IsFastSmiOrObjectElementsKind(from_)) {
721 ElementsTransitionGenerator:: 727 ElementsTransitionGenerator::
722 GenerateMapChangeElementsTransition(masm, mode, &fail); 728 GenerateMapChangeElementsTransition(masm, mode, &fail);
723 } else if (IsFastDoubleElementsKind(from_)) { 729 } else if (IsFastDoubleElementsKind(from_)) {
724 ASSERT(!IsFastSmiElementsKind(to_)); 730 ASSERT(!IsFastSmiElementsKind(to_));
725 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail); 731 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail);
726 } else { 732 } else {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 InstallDescriptor(isolate, &stub3); 821 InstallDescriptor(isolate, &stub3);
816 } 822 }
817 823
818 InternalArrayConstructorStub::InternalArrayConstructorStub( 824 InternalArrayConstructorStub::InternalArrayConstructorStub(
819 Isolate* isolate) { 825 Isolate* isolate) {
820 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 826 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
821 } 827 }
822 828
823 829
824 } } // namespace v8::internal 830 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698