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

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

Issue 11817017: Additional work to get array literal allocation tracking working, even with --always-opt (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code cleanup Created 7 years, 11 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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 } 568 }
569 569
570 570
571 void ElementsTransitionAndStoreStub::Generate(MacroAssembler* masm) { 571 void ElementsTransitionAndStoreStub::Generate(MacroAssembler* masm) {
572 Label fail; 572 Label fail;
573 ASSERT(!IsFastHoleyElementsKind(from_) || IsFastHoleyElementsKind(to_)); 573 ASSERT(!IsFastHoleyElementsKind(from_) || IsFastHoleyElementsKind(to_));
574 if (!FLAG_trace_elements_transitions) { 574 if (!FLAG_trace_elements_transitions) {
575 if (IsFastSmiOrObjectElementsKind(to_)) { 575 if (IsFastSmiOrObjectElementsKind(to_)) {
576 if (IsFastSmiOrObjectElementsKind(from_)) { 576 if (IsFastSmiOrObjectElementsKind(from_)) {
577 ElementsTransitionGenerator:: 577 ElementsTransitionGenerator::
578 GenerateMapChangeElementsTransition(masm); 578 GenerateMapChangeElementsTransition(masm, &fail);
579 } else if (IsFastDoubleElementsKind(from_)) { 579 } else if (IsFastDoubleElementsKind(from_)) {
580 ASSERT(!IsFastSmiElementsKind(to_)); 580 ASSERT(!IsFastSmiElementsKind(to_));
581 ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail); 581 ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail);
582 } else { 582 } else {
583 UNREACHABLE(); 583 UNREACHABLE();
584 } 584 }
585 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, 585 KeyedStoreStubCompiler::GenerateStoreFastElement(masm,
586 is_jsarray_, 586 is_jsarray_,
587 to_, 587 to_,
588 grow_mode_); 588 grow_mode_);
589 } else if (IsFastSmiElementsKind(from_) && 589 } else if (IsFastSmiElementsKind(from_) &&
590 IsFastDoubleElementsKind(to_)) { 590 IsFastDoubleElementsKind(to_)) {
591 ElementsTransitionGenerator::GenerateSmiToDouble(masm, &fail); 591 ElementsTransitionGenerator::GenerateSmiToDouble(masm, &fail);
592 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, 592 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm,
593 is_jsarray_, 593 is_jsarray_,
594 grow_mode_); 594 grow_mode_);
595 } else if (IsFastDoubleElementsKind(from_)) { 595 } else if (IsFastDoubleElementsKind(from_)) {
596 ASSERT(to_ == FAST_HOLEY_DOUBLE_ELEMENTS); 596 ASSERT(to_ == FAST_HOLEY_DOUBLE_ELEMENTS);
597 // Don't pass the fail label because we don't want to
598 // record allocation site info changes for the double->fast
599 // transition.
597 ElementsTransitionGenerator:: 600 ElementsTransitionGenerator::
598 GenerateMapChangeElementsTransition(masm); 601 GenerateMapChangeElementsTransition(masm);
599 } else { 602 } else {
600 UNREACHABLE(); 603 UNREACHABLE();
601 } 604 }
602 } 605 }
603 masm->bind(&fail); 606 masm->bind(&fail);
604 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode_); 607 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode_);
605 } 608 }
606 609
(...skipping 13 matching lines...) Expand all
620 // already active, as the hooks won't stack. 623 // already active, as the hooks won't stack.
621 if (entry_hook != 0 && entry_hook_ != 0) 624 if (entry_hook != 0 && entry_hook_ != 0)
622 return false; 625 return false;
623 626
624 entry_hook_ = entry_hook; 627 entry_hook_ = entry_hook;
625 return true; 628 return true;
626 } 629 }
627 630
628 631
629 } } // namespace v8::internal 632 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698