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

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

Issue 155723004: A64: Add support for --deopt-every-n-times for n != 2 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | 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 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 Deoptimizer::BailoutType bailout_type = info()->IsStub() ? Deoptimizer::LAZY 951 Deoptimizer::BailoutType bailout_type = info()->IsStub() ? Deoptimizer::LAZY
952 : Deoptimizer::EAGER; 952 : Deoptimizer::EAGER;
953 Address entry = 953 Address entry =
954 Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type); 954 Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type);
955 955
956 if (entry == NULL) { 956 if (entry == NULL) {
957 Abort(kBailoutWasNotPrepared); 957 Abort(kBailoutWasNotPrepared);
958 return false; 958 return false;
959 } 959 }
960 960
961 ASSERT(FLAG_deopt_every_n_times < 2); // Other values not supported on A64. 961 if (FLAG_deopt_every_n_times != 0 && !info()->IsStub()) {
962 TODO_UNIMPLEMENTED("Support for FLAG_deopt_every_n_times >= 2."); 962 Label not_zero;
963 if (FLAG_deopt_every_n_times == 1 && 963 ExternalReference count = ExternalReference::stress_deopt_count(isolate());
964 !info()->IsStub() && 964
965 info()->opt_count() == id) { 965 __ Push(x0, x1);
966 ASSERT(frame_is_built_); 966 __ Mov(x0, Operand(count));
967 __ Ldr(w1, MemOperand(x0));
968 __ Subs(x1, x1, 1);
969 __ B(ge, &not_zero);
970 __ Mov(w1, FLAG_deopt_every_n_times);
971 __ Str(w1, MemOperand(x0));
972 __ Pop(x0, x1);
967 __ Call(entry, RelocInfo::RUNTIME_ENTRY); 973 __ Call(entry, RelocInfo::RUNTIME_ENTRY);
968 return false; 974 return false;
jochen (gone - plz use gerrit) 2014/02/10 14:32:07 It doesn't really matter what we return here, beca
975
976 __ Bind(not_zero);
977 __ Str(w1, MemOperand(x0));
978 __ Pop(x0, x1);
979 return true;
969 } 980 }
970 981
971 return true; 982 return true;
972 } 983 }
973 984
974 985
975 void LCodeGen::Deoptimize(LEnvironment* environment, 986 void LCodeGen::Deoptimize(LEnvironment* environment,
976 Deoptimizer::BailoutType bailout_type) { 987 Deoptimizer::BailoutType bailout_type) {
977 if (!DeoptimizeHeader(environment)) return; 988 if (!DeoptimizeHeader(environment)) return;
978 989
(...skipping 4673 matching lines...) Expand 10 before | Expand all | Expand 10 after
5652 __ Bind(&out_of_object); 5663 __ Bind(&out_of_object);
5653 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5664 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5654 // Index is equal to negated out of object property index plus 1. 5665 // Index is equal to negated out of object property index plus 1.
5655 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5666 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5656 __ Ldr(result, FieldMemOperand(result, 5667 __ Ldr(result, FieldMemOperand(result,
5657 FixedArray::kHeaderSize - kPointerSize)); 5668 FixedArray::kHeaderSize - kPointerSize));
5658 __ Bind(&done); 5669 __ Bind(&done);
5659 } 5670 }
5660 5671
5661 } } // namespace v8::internal 5672 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698