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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 3314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3325 __ JumpIfSmi(v0, &null); | 3325 __ JumpIfSmi(v0, &null); |
3326 | 3326 |
3327 // Check that the object is a JS object but take special care of JS | 3327 // Check that the object is a JS object but take special care of JS |
3328 // functions to make sure they have 'Function' as their class. | 3328 // functions to make sure they have 'Function' as their class. |
3329 // Assume that there are only two callable types, and one of them is at | 3329 // Assume that there are only two callable types, and one of them is at |
3330 // either end of the type range for JS object types. Saves extra comparisons. | 3330 // either end of the type range for JS object types. Saves extra comparisons. |
3331 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); | 3331 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); |
3332 __ GetObjectType(v0, v0, a1); // Map is now in v0. | 3332 __ GetObjectType(v0, v0, a1); // Map is now in v0. |
3333 __ Branch(&null, lt, a1, Operand(FIRST_JS_RECEIVER_TYPE)); | 3333 __ Branch(&null, lt, a1, Operand(FIRST_JS_RECEIVER_TYPE)); |
3334 | 3334 |
3335 STATIC_ASSERT(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE == | |
3336 FIRST_JS_RECEIVER_TYPE + 1); | |
3337 __ Branch(&function, eq, a1, Operand(FIRST_JS_RECEIVER_TYPE)); | |
3338 | |
3339 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == | 3335 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == |
3340 LAST_JS_RECEIVER_TYPE - 1); | 3336 LAST_JS_RECEIVER_TYPE - 1); |
3341 __ Branch(&function, eq, a1, Operand(LAST_JS_RECEIVER_TYPE)); | 3337 __ Branch(&function, eq, a1, Operand(LAST_JS_RECEIVER_TYPE)); |
3342 // Assume that there is no larger type. | 3338 // Assume that there is no larger type. |
3343 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); | 3339 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); |
3344 | 3340 |
3345 // Check if the constructor in the map is a JS function. | 3341 // Check if the constructor in the map is a JS function. |
3346 Register instance_type = a2; | 3342 Register instance_type = a2; |
3347 __ GetMapConstructor(v0, v0, a1, instance_type); | 3343 __ GetMapConstructor(v0, v0, a1, instance_type); |
3348 __ Branch(&non_function_constructor, ne, instance_type, | 3344 __ Branch(&non_function_constructor, ne, instance_type, |
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4913 reinterpret_cast<uint32_t>( | 4909 reinterpret_cast<uint32_t>( |
4914 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4910 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4915 return OSR_AFTER_STACK_CHECK; | 4911 return OSR_AFTER_STACK_CHECK; |
4916 } | 4912 } |
4917 | 4913 |
4918 | 4914 |
4919 } // namespace internal | 4915 } // namespace internal |
4920 } // namespace v8 | 4916 } // namespace v8 |
4921 | 4917 |
4922 #endif // V8_TARGET_ARCH_MIPS | 4918 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |