| 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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 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 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2182 | 2182 |
| 2183 #if DEBUG | 2183 #if DEBUG |
| 2184 // Check if the function returned a valid JavaScript value. | 2184 // Check if the function returned a valid JavaScript value. |
| 2185 Label ok; | 2185 Label ok; |
| 2186 Register return_value = eax; | 2186 Register return_value = eax; |
| 2187 Register map = ecx; | 2187 Register map = ecx; |
| 2188 | 2188 |
| 2189 JumpIfSmi(return_value, &ok, Label::kNear); | 2189 JumpIfSmi(return_value, &ok, Label::kNear); |
| 2190 mov(map, FieldOperand(return_value, HeapObject::kMapOffset)); | 2190 mov(map, FieldOperand(return_value, HeapObject::kMapOffset)); |
| 2191 | 2191 |
| 2192 CmpInstanceType(map, FIRST_NONSTRING_TYPE); | 2192 CmpInstanceType(map, LAST_NAME_TYPE); |
| 2193 j(below, &ok, Label::kNear); | 2193 j(below_equal, &ok, Label::kNear); |
| 2194 | 2194 |
| 2195 CmpInstanceType(map, FIRST_SPEC_OBJECT_TYPE); | 2195 CmpInstanceType(map, FIRST_SPEC_OBJECT_TYPE); |
| 2196 j(above_equal, &ok, Label::kNear); | 2196 j(above_equal, &ok, Label::kNear); |
| 2197 | 2197 |
| 2198 cmp(map, isolate()->factory()->heap_number_map()); | 2198 cmp(map, isolate()->factory()->heap_number_map()); |
| 2199 j(equal, &ok, Label::kNear); | 2199 j(equal, &ok, Label::kNear); |
| 2200 | 2200 |
| 2201 cmp(return_value, isolate()->factory()->undefined_value()); | 2201 cmp(return_value, isolate()->factory()->undefined_value()); |
| 2202 j(equal, &ok, Label::kNear); | 2202 j(equal, &ok, Label::kNear); |
| 2203 | 2203 |
| (...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3457 if (mag.shift > 0) sar(edx, mag.shift); | 3457 if (mag.shift > 0) sar(edx, mag.shift); |
| 3458 mov(eax, dividend); | 3458 mov(eax, dividend); |
| 3459 shr(eax, 31); | 3459 shr(eax, 31); |
| 3460 add(edx, eax); | 3460 add(edx, eax); |
| 3461 } | 3461 } |
| 3462 | 3462 |
| 3463 | 3463 |
| 3464 } } // namespace v8::internal | 3464 } } // namespace v8::internal |
| 3465 | 3465 |
| 3466 #endif // V8_TARGET_ARCH_IA32 | 3466 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |