OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 // Open a frame scope to indicate that there is a frame on the stack. The | 854 // Open a frame scope to indicate that there is a frame on the stack. The |
855 // MANUAL indicates that the scope shouldn't actually generate code to set up | 855 // MANUAL indicates that the scope shouldn't actually generate code to set up |
856 // the frame (that is done below). | 856 // the frame (that is done below). |
857 FrameScope frame_scope(masm, StackFrame::MANUAL); | 857 FrameScope frame_scope(masm, StackFrame::MANUAL); |
858 __ PushFixedFrame(r1); | 858 __ PushFixedFrame(r1); |
859 __ add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); | 859 __ add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
860 | 860 |
861 // Get the bytecode array from the function object and load the pointer to the | 861 // Get the bytecode array from the function object and load the pointer to the |
862 // first entry into kInterpreterBytecodeRegister. | 862 // first entry into kInterpreterBytecodeRegister. |
863 __ ldr(r0, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); | 863 __ ldr(r0, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); |
| 864 Register debug_info = kInterpreterBytecodeArrayRegister; |
| 865 DCHECK(!debug_info.is(r0)); |
| 866 __ ldr(debug_info, FieldMemOperand(r0, SharedFunctionInfo::kDebugInfoOffset)); |
| 867 __ cmp(debug_info, Operand(DebugInfo::uninitialized())); |
| 868 // Load original bytecode array or the debug copy. |
864 __ ldr(kInterpreterBytecodeArrayRegister, | 869 __ ldr(kInterpreterBytecodeArrayRegister, |
865 FieldMemOperand(r0, SharedFunctionInfo::kFunctionDataOffset)); | 870 FieldMemOperand(r0, SharedFunctionInfo::kFunctionDataOffset), eq); |
| 871 __ ldr(kInterpreterBytecodeArrayRegister, |
| 872 FieldMemOperand(debug_info, DebugInfo::kAbstractCodeIndex), ne); |
866 | 873 |
867 if (FLAG_debug_code) { | 874 if (FLAG_debug_code) { |
868 // Check function data field is actually a BytecodeArray object. | 875 // Check function data field is actually a BytecodeArray object. |
869 __ SmiTst(kInterpreterBytecodeArrayRegister); | 876 __ SmiTst(kInterpreterBytecodeArrayRegister); |
870 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 877 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
871 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r0, no_reg, | 878 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r0, no_reg, |
872 BYTECODE_ARRAY_TYPE); | 879 BYTECODE_ARRAY_TYPE); |
873 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 880 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
874 } | 881 } |
875 | 882 |
(...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2558 } | 2565 } |
2559 } | 2566 } |
2560 | 2567 |
2561 | 2568 |
2562 #undef __ | 2569 #undef __ |
2563 | 2570 |
2564 } // namespace internal | 2571 } // namespace internal |
2565 } // namespace v8 | 2572 } // namespace v8 |
2566 | 2573 |
2567 #endif // V8_TARGET_ARCH_ARM | 2574 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |