| OLD | NEW |
| 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 // |>------------ translation_size ------------<| | 585 // |>------------ translation_size ------------<| |
| 586 | 586 |
| 587 int frame_count = 0; | 587 int frame_count = 0; |
| 588 int jsframe_count = 0; | 588 int jsframe_count = 0; |
| 589 for (LEnvironment* e = environment; e != NULL; e = e->outer()) { | 589 for (LEnvironment* e = environment; e != NULL; e = e->outer()) { |
| 590 ++frame_count; | 590 ++frame_count; |
| 591 if (e->frame_type() == JS_FUNCTION) { | 591 if (e->frame_type() == JS_FUNCTION) { |
| 592 ++jsframe_count; | 592 ++jsframe_count; |
| 593 } | 593 } |
| 594 } | 594 } |
| 595 Translation translation(&translations_, frame_count, jsframe_count); | 595 Translation translation(&translations_, frame_count, jsframe_count, zone()); |
| 596 WriteTranslation(environment, &translation); | 596 WriteTranslation(environment, &translation); |
| 597 int deoptimization_index = deoptimizations_.length(); | 597 int deoptimization_index = deoptimizations_.length(); |
| 598 int pc_offset = masm()->pc_offset(); | 598 int pc_offset = masm()->pc_offset(); |
| 599 environment->Register(deoptimization_index, | 599 environment->Register(deoptimization_index, |
| 600 translation.index(), | 600 translation.index(), |
| 601 (mode == Safepoint::kLazyDeopt) ? pc_offset : -1); | 601 (mode == Safepoint::kLazyDeopt) ? pc_offset : -1); |
| 602 deoptimizations_.Add(environment); | 602 deoptimizations_.Add(environment); |
| 603 } | 603 } |
| 604 } | 604 } |
| 605 | 605 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 int arguments, | 717 int arguments, |
| 718 Safepoint::DeoptMode deopt_mode) { | 718 Safepoint::DeoptMode deopt_mode) { |
| 719 ASSERT(expected_safepoint_kind_ == kind); | 719 ASSERT(expected_safepoint_kind_ == kind); |
| 720 | 720 |
| 721 const ZoneList<LOperand*>* operands = pointers->GetNormalizedOperands(); | 721 const ZoneList<LOperand*>* operands = pointers->GetNormalizedOperands(); |
| 722 Safepoint safepoint = safepoints_.DefineSafepoint(masm(), | 722 Safepoint safepoint = safepoints_.DefineSafepoint(masm(), |
| 723 kind, arguments, deopt_mode); | 723 kind, arguments, deopt_mode); |
| 724 for (int i = 0; i < operands->length(); i++) { | 724 for (int i = 0; i < operands->length(); i++) { |
| 725 LOperand* pointer = operands->at(i); | 725 LOperand* pointer = operands->at(i); |
| 726 if (pointer->IsStackSlot()) { | 726 if (pointer->IsStackSlot()) { |
| 727 safepoint.DefinePointerSlot(pointer->index()); | 727 safepoint.DefinePointerSlot(pointer->index(), zone()); |
| 728 } else if (pointer->IsRegister() && (kind & Safepoint::kWithRegisters)) { | 728 } else if (pointer->IsRegister() && (kind & Safepoint::kWithRegisters)) { |
| 729 safepoint.DefinePointerRegister(ToRegister(pointer)); | 729 safepoint.DefinePointerRegister(ToRegister(pointer)); |
| 730 } | 730 } |
| 731 } | 731 } |
| 732 if (kind & Safepoint::kWithRegisters) { | 732 if (kind & Safepoint::kWithRegisters) { |
| 733 // Register cp always contains a pointer to the context. | 733 // Register cp always contains a pointer to the context. |
| 734 safepoint.DefinePointerRegister(cp); | 734 safepoint.DefinePointerRegister(cp); |
| 735 } | 735 } |
| 736 } | 736 } |
| 737 | 737 |
| (...skipping 4437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5175 __ Subu(scratch, result, scratch); | 5175 __ Subu(scratch, result, scratch); |
| 5176 __ lw(result, FieldMemOperand(scratch, | 5176 __ lw(result, FieldMemOperand(scratch, |
| 5177 FixedArray::kHeaderSize - kPointerSize)); | 5177 FixedArray::kHeaderSize - kPointerSize)); |
| 5178 __ bind(&done); | 5178 __ bind(&done); |
| 5179 } | 5179 } |
| 5180 | 5180 |
| 5181 | 5181 |
| 5182 #undef __ | 5182 #undef __ |
| 5183 | 5183 |
| 5184 } } // namespace v8::internal | 5184 } } // namespace v8::internal |
| OLD | NEW |