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

Side by Side Diff: src/x64/lithium-codegen-x64.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/x64/lithium-codegen-x64.h ('k') | src/x64/lithium-x64.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 690
691 void LCodeGen::DeoptimizeIf(Condition cc, 691 void LCodeGen::DeoptimizeIf(Condition cc,
692 LEnvironment* environment) { 692 LEnvironment* environment) {
693 Deoptimizer::BailoutType bailout_type = info()->IsStub() 693 Deoptimizer::BailoutType bailout_type = info()->IsStub()
694 ? Deoptimizer::LAZY 694 ? Deoptimizer::LAZY
695 : Deoptimizer::EAGER; 695 : Deoptimizer::EAGER;
696 DeoptimizeIf(cc, environment, bailout_type); 696 DeoptimizeIf(cc, environment, bailout_type);
697 } 697 }
698 698
699 699
700 void LCodeGen::SoftDeoptimize(LEnvironment* environment) {
701 ASSERT(!info()->IsStub());
702 DeoptimizeIf(no_condition, environment, Deoptimizer::SOFT);
703 }
704
705
706 void LCodeGen::RegisterDependentCodeForEmbeddedMaps(Handle<Code> code) { 700 void LCodeGen::RegisterDependentCodeForEmbeddedMaps(Handle<Code> code) {
707 ZoneList<Handle<Map> > maps(1, zone()); 701 ZoneList<Handle<Map> > maps(1, zone());
708 int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); 702 int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT);
709 for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) { 703 for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
710 RelocInfo::Mode mode = it.rinfo()->rmode(); 704 RelocInfo::Mode mode = it.rinfo()->rmode();
711 if (mode == RelocInfo::EMBEDDED_OBJECT && 705 if (mode == RelocInfo::EMBEDDED_OBJECT &&
712 it.rinfo()->target_object()->IsMap()) { 706 it.rinfo()->target_object()->IsMap()) {
713 Handle<Map> map(Map::cast(it.rinfo()->target_object())); 707 Handle<Map> map(Map::cast(it.rinfo()->target_object()));
714 if (map->CanTransition()) { 708 if (map->CanTransition()) {
715 maps.Add(map, zone()); 709 maps.Add(map, zone());
(...skipping 4641 matching lines...) Expand 10 before | Expand all | Expand 10 after
5357 EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); 5351 EnsureSpaceForLazyDeopt(Deoptimizer::patch_size());
5358 last_lazy_deopt_pc_ = masm()->pc_offset(); 5352 last_lazy_deopt_pc_ = masm()->pc_offset();
5359 ASSERT(instr->HasEnvironment()); 5353 ASSERT(instr->HasEnvironment());
5360 LEnvironment* env = instr->environment(); 5354 LEnvironment* env = instr->environment();
5361 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); 5355 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
5362 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 5356 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
5363 } 5357 }
5364 5358
5365 5359
5366 void LCodeGen::DoDeoptimize(LDeoptimize* instr) { 5360 void LCodeGen::DoDeoptimize(LDeoptimize* instr) {
5367 if (instr->hydrogen_value()->IsSoftDeoptimize()) { 5361 Deoptimizer::BailoutType type = instr->hydrogen()->type();
5368 SoftDeoptimize(instr->environment()); 5362 // TODO(danno): Stubs expect all deopts to be lazy for historical reasons (the
5369 } else { 5363 // needed return address), even though the implementation of LAZY and EAGER is
5370 DeoptimizeIf(no_condition, instr->environment()); 5364 // now identical. When LAZY is eventually completely folded into EAGER, remove
5365 // the special case below.
5366 if (info()->IsStub() && type == Deoptimizer::EAGER) {
5367 type = Deoptimizer::LAZY;
5371 } 5368 }
5369 DeoptimizeIf(no_condition, instr->environment(), type);
5372 } 5370 }
5373 5371
5374 5372
5375 void LCodeGen::DoDummyUse(LDummyUse* instr) { 5373 void LCodeGen::DoDummyUse(LDummyUse* instr) {
5376 // Nothing to see here, move on! 5374 // Nothing to see here, move on!
5377 } 5375 }
5378 5376
5379 5377
5380 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { 5378 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) {
5381 PushSafepointRegistersScope scope(this); 5379 PushSafepointRegistersScope scope(this);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
5538 FixedArray::kHeaderSize - kPointerSize)); 5536 FixedArray::kHeaderSize - kPointerSize));
5539 __ bind(&done); 5537 __ bind(&done);
5540 } 5538 }
5541 5539
5542 5540
5543 #undef __ 5541 #undef __
5544 5542
5545 } } // namespace v8::internal 5543 } } // namespace v8::internal
5546 5544
5547 #endif // V8_TARGET_ARCH_X64 5545 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698