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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 19528003: Unify SoftDeoptimize and Deoptimize hydrogen instructions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback 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/arm/lithium-codegen-arm.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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 801
802 void LCodeGen::DeoptimizeIf(Condition cc, 802 void LCodeGen::DeoptimizeIf(Condition cc,
803 LEnvironment* environment) { 803 LEnvironment* environment) {
804 Deoptimizer::BailoutType bailout_type = info()->IsStub() 804 Deoptimizer::BailoutType bailout_type = info()->IsStub()
805 ? Deoptimizer::LAZY 805 ? Deoptimizer::LAZY
806 : Deoptimizer::EAGER; 806 : Deoptimizer::EAGER;
807 DeoptimizeIf(cc, environment, bailout_type); 807 DeoptimizeIf(cc, environment, bailout_type);
808 } 808 }
809 809
810 810
811 void LCodeGen::SoftDeoptimize(LEnvironment* environment) {
812 ASSERT(!info()->IsStub());
813 DeoptimizeIf(al, environment, Deoptimizer::SOFT);
814 }
815
816
817 void LCodeGen::RegisterDependentCodeForEmbeddedMaps(Handle<Code> code) { 811 void LCodeGen::RegisterDependentCodeForEmbeddedMaps(Handle<Code> code) {
818 ZoneList<Handle<Map> > maps(1, zone()); 812 ZoneList<Handle<Map> > maps(1, zone());
819 int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); 813 int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT);
820 for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) { 814 for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
821 RelocInfo::Mode mode = it.rinfo()->rmode(); 815 RelocInfo::Mode mode = it.rinfo()->rmode();
822 if (mode == RelocInfo::EMBEDDED_OBJECT && 816 if (mode == RelocInfo::EMBEDDED_OBJECT &&
823 it.rinfo()->target_object()->IsMap()) { 817 it.rinfo()->target_object()->IsMap()) {
824 Handle<Map> map(Map::cast(it.rinfo()->target_object())); 818 Handle<Map> map(Map::cast(it.rinfo()->target_object()));
825 if (map->CanTransition()) { 819 if (map->CanTransition()) {
826 maps.Add(map, zone()); 820 maps.Add(map, zone());
(...skipping 4809 matching lines...) Expand 10 before | Expand all | Expand 10 after
5636 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { 5630 void LCodeGen::DoLazyBailout(LLazyBailout* instr) {
5637 EnsureSpaceForLazyDeopt(); 5631 EnsureSpaceForLazyDeopt();
5638 ASSERT(instr->HasEnvironment()); 5632 ASSERT(instr->HasEnvironment());
5639 LEnvironment* env = instr->environment(); 5633 LEnvironment* env = instr->environment();
5640 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); 5634 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
5641 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 5635 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
5642 } 5636 }
5643 5637
5644 5638
5645 void LCodeGen::DoDeoptimize(LDeoptimize* instr) { 5639 void LCodeGen::DoDeoptimize(LDeoptimize* instr) {
5646 if (instr->hydrogen_value()->IsSoftDeoptimize()) { 5640 Deoptimizer::BailoutType type = instr->hydrogen()->type();
5647 SoftDeoptimize(instr->environment()); 5641 // TODO(danno): Stubs expect all deopts to be lazy for historical reasons (the
5648 } else { 5642 // needed return address), even though the implementation of LAZY and EAGER is
5649 DeoptimizeIf(al, instr->environment()); 5643 // now identical. When LAZY is eventually completely folded into EAGER, remove
5644 // the special case below.
5645 if (info()->IsStub() && type == Deoptimizer::EAGER) {
5646 type = Deoptimizer::LAZY;
5650 } 5647 }
5648 DeoptimizeIf(al, instr->environment(), type);
5651 } 5649 }
5652 5650
5653 5651
5654 void LCodeGen::DoDummyUse(LDummyUse* instr) { 5652 void LCodeGen::DoDummyUse(LDummyUse* instr) {
5655 // Nothing to see here, move on! 5653 // Nothing to see here, move on!
5656 } 5654 }
5657 5655
5658 5656
5659 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { 5657 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) {
5660 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); 5658 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
5821 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5819 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5822 __ ldr(result, FieldMemOperand(scratch, 5820 __ ldr(result, FieldMemOperand(scratch,
5823 FixedArray::kHeaderSize - kPointerSize)); 5821 FixedArray::kHeaderSize - kPointerSize));
5824 __ bind(&done); 5822 __ bind(&done);
5825 } 5823 }
5826 5824
5827 5825
5828 #undef __ 5826 #undef __
5829 5827
5830 } } // namespace v8::internal 5828 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698