| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
| (...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2140 bind(&leave_exit_frame); | 2140 bind(&leave_exit_frame); |
| 2141 | 2141 |
| 2142 // Check if the function scheduled an exception. | 2142 // Check if the function scheduled an exception. |
| 2143 ExternalReference scheduled_exception_address = | 2143 ExternalReference scheduled_exception_address = |
| 2144 ExternalReference::scheduled_exception_address(isolate()); | 2144 ExternalReference::scheduled_exception_address(isolate()); |
| 2145 cmp(Operand::StaticVariable(scheduled_exception_address), | 2145 cmp(Operand::StaticVariable(scheduled_exception_address), |
| 2146 Immediate(isolate()->factory()->the_hole_value())); | 2146 Immediate(isolate()->factory()->the_hole_value())); |
| 2147 j(not_equal, &promote_scheduled_exception); | 2147 j(not_equal, &promote_scheduled_exception); |
| 2148 bind(&exception_handled); | 2148 bind(&exception_handled); |
| 2149 | 2149 |
| 2150 #if ENABLE_EXTRA_CHECKS | 2150 #if DEBUG |
| 2151 // Check if the function returned a valid JavaScript value. | 2151 // Check if the function returned a valid JavaScript value. |
| 2152 Label ok; | 2152 Label ok; |
| 2153 Register return_value = eax; | 2153 Register return_value = eax; |
| 2154 Register map = ecx; | 2154 Register map = ecx; |
| 2155 | 2155 |
| 2156 JumpIfSmi(return_value, &ok, Label::kNear); | 2156 JumpIfSmi(return_value, &ok, Label::kNear); |
| 2157 mov(map, FieldOperand(return_value, HeapObject::kMapOffset)); | 2157 mov(map, FieldOperand(return_value, HeapObject::kMapOffset)); |
| 2158 | 2158 |
| 2159 CmpInstanceType(map, FIRST_NONSTRING_TYPE); | 2159 CmpInstanceType(map, FIRST_NONSTRING_TYPE); |
| 2160 j(below, &ok, Label::kNear); | 2160 j(below, &ok, Label::kNear); |
| (...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3365 if (mag.shift > 0) sar(edx, mag.shift); | 3365 if (mag.shift > 0) sar(edx, mag.shift); |
| 3366 mov(eax, dividend); | 3366 mov(eax, dividend); |
| 3367 shr(eax, 31); | 3367 shr(eax, 31); |
| 3368 add(edx, eax); | 3368 add(edx, eax); |
| 3369 } | 3369 } |
| 3370 | 3370 |
| 3371 | 3371 |
| 3372 } } // namespace v8::internal | 3372 } } // namespace v8::internal |
| 3373 | 3373 |
| 3374 #endif // V8_TARGET_ARCH_X87 | 3374 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |