| OLD | NEW |
| 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 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 | 974 |
| 975 if (entry == NULL) { | 975 if (entry == NULL) { |
| 976 Abort(kBailoutWasNotPrepared); | 976 Abort(kBailoutWasNotPrepared); |
| 977 return bailout_type; | 977 return bailout_type; |
| 978 } | 978 } |
| 979 | 979 |
| 980 if (FLAG_deopt_every_n_times != 0 && !info()->IsStub()) { | 980 if (FLAG_deopt_every_n_times != 0 && !info()->IsStub()) { |
| 981 Label not_zero; | 981 Label not_zero; |
| 982 ExternalReference count = ExternalReference::stress_deopt_count(isolate()); | 982 ExternalReference count = ExternalReference::stress_deopt_count(isolate()); |
| 983 | 983 |
| 984 __ Push(x0, x1); | 984 __ Push(x0, x1, x2); |
| 985 __ Mrs(x2, NZCV); |
| 985 __ Mov(x0, Operand(count)); | 986 __ Mov(x0, Operand(count)); |
| 986 __ Ldr(w1, MemOperand(x0)); | 987 __ Ldr(w1, MemOperand(x0)); |
| 987 __ Subs(x1, x1, 1); | 988 __ Subs(x1, x1, 1); |
| 988 __ B(gt, ¬_zero); | 989 __ B(gt, ¬_zero); |
| 989 __ Mov(w1, FLAG_deopt_every_n_times); | 990 __ Mov(w1, FLAG_deopt_every_n_times); |
| 990 __ Str(w1, MemOperand(x0)); | 991 __ Str(w1, MemOperand(x0)); |
| 991 __ Pop(x0, x1); | 992 __ Pop(x0, x1, x2); |
| 992 ASSERT(frame_is_built_); | 993 ASSERT(frame_is_built_); |
| 993 __ Call(entry, RelocInfo::RUNTIME_ENTRY); | 994 __ Call(entry, RelocInfo::RUNTIME_ENTRY); |
| 994 __ Unreachable(); | 995 __ Unreachable(); |
| 995 | 996 |
| 996 __ Bind(¬_zero); | 997 __ Bind(¬_zero); |
| 997 __ Str(w1, MemOperand(x0)); | 998 __ Str(w1, MemOperand(x0)); |
| 998 __ Pop(x0, x1); | 999 __ Msr(NZCV, x2); |
| 1000 __ Pop(x0, x1, x2); |
| 999 } | 1001 } |
| 1000 | 1002 |
| 1001 return bailout_type; | 1003 return bailout_type; |
| 1002 } | 1004 } |
| 1003 | 1005 |
| 1004 | 1006 |
| 1005 void LCodeGen::Deoptimize(LEnvironment* environment, | 1007 void LCodeGen::Deoptimize(LEnvironment* environment, |
| 1006 Deoptimizer::BailoutType bailout_type) { | 1008 Deoptimizer::BailoutType bailout_type) { |
| 1007 ASSERT(environment->HasBeenRegistered()); | 1009 ASSERT(environment->HasBeenRegistered()); |
| 1008 ASSERT(info()->IsOptimizing() || info()->IsStub()); | 1010 ASSERT(info()->IsOptimizing() || info()->IsStub()); |
| (...skipping 4684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5693 __ Bind(&out_of_object); | 5695 __ Bind(&out_of_object); |
| 5694 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5696 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 5695 // Index is equal to negated out of object property index plus 1. | 5697 // Index is equal to negated out of object property index plus 1. |
| 5696 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5698 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5697 __ Ldr(result, FieldMemOperand(result, | 5699 __ Ldr(result, FieldMemOperand(result, |
| 5698 FixedArray::kHeaderSize - kPointerSize)); | 5700 FixedArray::kHeaderSize - kPointerSize)); |
| 5699 __ Bind(&done); | 5701 __ Bind(&done); |
| 5700 } | 5702 } |
| 5701 | 5703 |
| 5702 } } // namespace v8::internal | 5704 } } // namespace v8::internal |
| OLD | NEW |