| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1207 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); | 1207 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); |
| 1208 | 1208 |
| 1209 // Do not transform the receiver for strict mode functions. | 1209 // Do not transform the receiver for strict mode functions. |
| 1210 __ lw(a2, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); | 1210 __ lw(a2, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
| 1211 __ lw(a3, FieldMemOperand(a2, SharedFunctionInfo::kCompilerHintsOffset)); | 1211 __ lw(a3, FieldMemOperand(a2, SharedFunctionInfo::kCompilerHintsOffset)); |
| 1212 __ And(t0, a3, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + | 1212 __ And(t0, a3, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + |
| 1213 kSmiTagSize))); | 1213 kSmiTagSize))); |
| 1214 __ Branch(&shift_arguments, ne, t0, Operand(zero_reg)); | 1214 __ Branch(&shift_arguments, ne, t0, Operand(zero_reg)); |
| 1215 | 1215 |
| 1216 // Do not transform the receiver for native (Compilerhints already in a3). | 1216 // Do not transform the receiver for native (Compilerhints already in a3). |
| 1217 __ And(t0, a3, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize))); | 1217 __ And(t0, a3, Operand(1 << (SharedFunctionInfo::kES5Native + |
| 1218 kSmiTagSize))); |
| 1218 __ Branch(&shift_arguments, ne, t0, Operand(zero_reg)); | 1219 __ Branch(&shift_arguments, ne, t0, Operand(zero_reg)); |
| 1219 | 1220 |
| 1220 // Compute the receiver in non-strict mode. | 1221 // Compute the receiver in non-strict mode. |
| 1221 // Load first argument in a2. a2 = -kPointerSize(sp + n_args << 2). | 1222 // Load first argument in a2. a2 = -kPointerSize(sp + n_args << 2). |
| 1222 __ sll(at, a0, kPointerSizeLog2); | 1223 __ sll(at, a0, kPointerSizeLog2); |
| 1223 __ addu(a2, sp, at); | 1224 __ addu(a2, sp, at); |
| 1224 __ lw(a2, MemOperand(a2, -kPointerSize)); | 1225 __ lw(a2, MemOperand(a2, -kPointerSize)); |
| 1225 // a0: actual number of arguments | 1226 // a0: actual number of arguments |
| 1226 // a1: function | 1227 // a1: function |
| 1227 // a2: first argument | 1228 // a2: first argument |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1393 Label call_to_object, use_global_receiver, push_receiver; | 1394 Label call_to_object, use_global_receiver, push_receiver; |
| 1394 __ lw(a0, MemOperand(fp, kRecvOffset)); | 1395 __ lw(a0, MemOperand(fp, kRecvOffset)); |
| 1395 | 1396 |
| 1396 // Do not transform the receiver for strict mode functions. | 1397 // Do not transform the receiver for strict mode functions. |
| 1397 __ lw(a2, FieldMemOperand(a1, SharedFunctionInfo::kCompilerHintsOffset)); | 1398 __ lw(a2, FieldMemOperand(a1, SharedFunctionInfo::kCompilerHintsOffset)); |
| 1398 __ And(t0, a2, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + | 1399 __ And(t0, a2, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + |
| 1399 kSmiTagSize))); | 1400 kSmiTagSize))); |
| 1400 __ Branch(&push_receiver, ne, t0, Operand(zero_reg)); | 1401 __ Branch(&push_receiver, ne, t0, Operand(zero_reg)); |
| 1401 | 1402 |
| 1402 // Do not transform the receiver for native (Compilerhints already in a2). | 1403 // Do not transform the receiver for native (Compilerhints already in a2). |
| 1403 __ And(t0, a2, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize))); | 1404 __ And(t0, a2, Operand(1 << (SharedFunctionInfo::kES5Native + |
| 1405 kSmiTagSize))); |
| 1404 __ Branch(&push_receiver, ne, t0, Operand(zero_reg)); | 1406 __ Branch(&push_receiver, ne, t0, Operand(zero_reg)); |
| 1405 | 1407 |
| 1406 // Compute the receiver in non-strict mode. | 1408 // Compute the receiver in non-strict mode. |
| 1407 __ And(t0, a0, Operand(kSmiTagMask)); | 1409 __ And(t0, a0, Operand(kSmiTagMask)); |
| 1408 __ Branch(&call_to_object, eq, t0, Operand(zero_reg)); | 1410 __ Branch(&call_to_object, eq, t0, Operand(zero_reg)); |
| 1409 __ LoadRoot(a1, Heap::kNullValueRootIndex); | 1411 __ LoadRoot(a1, Heap::kNullValueRootIndex); |
| 1410 __ Branch(&use_global_receiver, eq, a0, Operand(a1)); | 1412 __ Branch(&use_global_receiver, eq, a0, Operand(a1)); |
| 1411 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); | 1413 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); |
| 1412 __ Branch(&use_global_receiver, eq, a0, Operand(a2)); | 1414 __ Branch(&use_global_receiver, eq, a0, Operand(a2)); |
| 1413 | 1415 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1617 __ bind(&dont_adapt_arguments); | 1619 __ bind(&dont_adapt_arguments); |
| 1618 __ Jump(a3); | 1620 __ Jump(a3); |
| 1619 } | 1621 } |
| 1620 | 1622 |
| 1621 | 1623 |
| 1622 #undef __ | 1624 #undef __ |
| 1623 | 1625 |
| 1624 } } // namespace v8::internal | 1626 } } // namespace v8::internal |
| 1625 | 1627 |
| 1626 #endif // V8_TARGET_ARCH_MIPS | 1628 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |