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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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/ia32/frames-ia32.h" | 9 #include "src/ia32/frames-ia32.h" |
10 | 10 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 // We do not know our frame height, but set esp based on ebp. | 119 // We do not know our frame height, but set esp based on ebp. |
120 __ lea(esp, Operand(ebp, -1 * kPointerSize)); | 120 __ lea(esp, Operand(ebp, -1 * kPointerSize)); |
121 | 121 |
122 __ pop(edi); // Function. | 122 __ pop(edi); // Function. |
123 __ pop(ebp); | 123 __ pop(ebp); |
124 | 124 |
125 // Load context from the function. | 125 // Load context from the function. |
126 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); | 126 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); |
127 | 127 |
| 128 // Clear new.target register as a safety measure. |
| 129 __ mov(edx, masm->isolate()->factory()->undefined_value()); |
| 130 |
128 // Get function code. | 131 // Get function code. |
129 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 132 __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
130 __ mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset)); | 133 __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kCodeOffset)); |
131 __ lea(edx, FieldOperand(edx, Code::kHeaderSize)); | 134 __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize)); |
132 | 135 |
133 // Re-run JSFunction, edi is function, esi is context. | 136 // Re-run JSFunction, edi is function, esi is context. |
134 __ jmp(edx); | 137 __ jmp(ebx); |
135 } | 138 } |
136 | 139 |
137 | 140 |
138 const bool LiveEdit::kFrameDropperSupported = true; | 141 const bool LiveEdit::kFrameDropperSupported = true; |
139 | 142 |
140 #undef __ | 143 #undef __ |
141 | 144 |
142 } // namespace internal | 145 } // namespace internal |
143 } // namespace v8 | 146 } // namespace v8 |
144 | 147 |
145 #endif // V8_TARGET_ARCH_IA32 | 148 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |