| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 __ lw(a2, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); | 1059 __ lw(a2, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
| 1060 __ lw(a3, FieldMemOperand(a2, SharedFunctionInfo::kCompilerHintsOffset)); | 1060 __ lw(a3, FieldMemOperand(a2, SharedFunctionInfo::kCompilerHintsOffset)); |
| 1061 __ And(t3, a3, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + | 1061 __ And(t3, a3, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + |
| 1062 kSmiTagSize))); | 1062 kSmiTagSize))); |
| 1063 __ Branch(&shift_arguments, ne, t3, Operand(zero_reg)); | 1063 __ Branch(&shift_arguments, ne, t3, Operand(zero_reg)); |
| 1064 | 1064 |
| 1065 // Do not transform the receiver for native (Compilerhints already in a3). | 1065 // Do not transform the receiver for native (Compilerhints already in a3). |
| 1066 __ And(t3, a3, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize))); | 1066 __ And(t3, a3, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize))); |
| 1067 __ Branch(&shift_arguments, ne, t3, Operand(zero_reg)); | 1067 __ Branch(&shift_arguments, ne, t3, Operand(zero_reg)); |
| 1068 | 1068 |
| 1069 // Compute the receiver in non-strict mode. | 1069 // Compute the receiver in sloppy mode. |
| 1070 // Load first argument in a2. a2 = -kPointerSize(sp + n_args << 2). | 1070 // Load first argument in a2. a2 = -kPointerSize(sp + n_args << 2). |
| 1071 __ sll(at, a0, kPointerSizeLog2); | 1071 __ sll(at, a0, kPointerSizeLog2); |
| 1072 __ addu(a2, sp, at); | 1072 __ addu(a2, sp, at); |
| 1073 __ lw(a2, MemOperand(a2, -kPointerSize)); | 1073 __ lw(a2, MemOperand(a2, -kPointerSize)); |
| 1074 // a0: actual number of arguments | 1074 // a0: actual number of arguments |
| 1075 // a1: function | 1075 // a1: function |
| 1076 // a2: first argument | 1076 // a2: first argument |
| 1077 __ JumpIfSmi(a2, &convert_to_object, t2); | 1077 __ JumpIfSmi(a2, &convert_to_object, t2); |
| 1078 | 1078 |
| 1079 __ LoadRoot(a3, Heap::kUndefinedValueRootIndex); | 1079 __ LoadRoot(a3, Heap::kUndefinedValueRootIndex); |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1262 Label call_to_object, use_global_receiver; | 1262 Label call_to_object, use_global_receiver; |
| 1263 __ lw(a2, FieldMemOperand(a2, SharedFunctionInfo::kCompilerHintsOffset)); | 1263 __ lw(a2, FieldMemOperand(a2, SharedFunctionInfo::kCompilerHintsOffset)); |
| 1264 __ And(t3, a2, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + | 1264 __ And(t3, a2, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + |
| 1265 kSmiTagSize))); | 1265 kSmiTagSize))); |
| 1266 __ Branch(&push_receiver, ne, t3, Operand(zero_reg)); | 1266 __ Branch(&push_receiver, ne, t3, Operand(zero_reg)); |
| 1267 | 1267 |
| 1268 // Do not transform the receiver for native (Compilerhints already in a2). | 1268 // Do not transform the receiver for native (Compilerhints already in a2). |
| 1269 __ And(t3, a2, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize))); | 1269 __ And(t3, a2, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize))); |
| 1270 __ Branch(&push_receiver, ne, t3, Operand(zero_reg)); | 1270 __ Branch(&push_receiver, ne, t3, Operand(zero_reg)); |
| 1271 | 1271 |
| 1272 // Compute the receiver in non-strict mode. | 1272 // Compute the receiver in sloppy mode. |
| 1273 __ JumpIfSmi(a0, &call_to_object); | 1273 __ JumpIfSmi(a0, &call_to_object); |
| 1274 __ LoadRoot(a1, Heap::kNullValueRootIndex); | 1274 __ LoadRoot(a1, Heap::kNullValueRootIndex); |
| 1275 __ Branch(&use_global_receiver, eq, a0, Operand(a1)); | 1275 __ Branch(&use_global_receiver, eq, a0, Operand(a1)); |
| 1276 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); | 1276 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); |
| 1277 __ Branch(&use_global_receiver, eq, a0, Operand(a2)); | 1277 __ Branch(&use_global_receiver, eq, a0, Operand(a2)); |
| 1278 | 1278 |
| 1279 // Check if the receiver is already a JavaScript object. | 1279 // Check if the receiver is already a JavaScript object. |
| 1280 // a0: receiver | 1280 // a0: receiver |
| 1281 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); | 1281 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); |
| 1282 __ GetObjectType(a0, a1, a1); | 1282 __ GetObjectType(a0, a1, a1); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1499 __ bind(&dont_adapt_arguments); | 1499 __ bind(&dont_adapt_arguments); |
| 1500 __ Jump(a3); | 1500 __ Jump(a3); |
| 1501 } | 1501 } |
| 1502 | 1502 |
| 1503 | 1503 |
| 1504 #undef __ | 1504 #undef __ |
| 1505 | 1505 |
| 1506 } } // namespace v8::internal | 1506 } } // namespace v8::internal |
| 1507 | 1507 |
| 1508 #endif // V8_TARGET_ARCH_MIPS | 1508 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |