Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: src/mips/builtins-mips.cc

Issue 7085034: Reapply change to Pass undefined to JS builtins when called with (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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::kES5Native + 1217 __ And(t0, a3, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize)));
1218 kSmiTagSize)));
1219 __ Branch(&shift_arguments, ne, t0, Operand(zero_reg)); 1218 __ Branch(&shift_arguments, ne, t0, Operand(zero_reg));
1220 1219
1221 // Compute the receiver in non-strict mode. 1220 // Compute the receiver in non-strict mode.
1222 // Load first argument in a2. a2 = -kPointerSize(sp + n_args << 2). 1221 // Load first argument in a2. a2 = -kPointerSize(sp + n_args << 2).
1223 __ sll(at, a0, kPointerSizeLog2); 1222 __ sll(at, a0, kPointerSizeLog2);
1224 __ addu(a2, sp, at); 1223 __ addu(a2, sp, at);
1225 __ lw(a2, MemOperand(a2, -kPointerSize)); 1224 __ lw(a2, MemOperand(a2, -kPointerSize));
1226 // a0: actual number of arguments 1225 // a0: actual number of arguments
1227 // a1: function 1226 // a1: function
1228 // a2: first argument 1227 // a2: first argument
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 Label call_to_object, use_global_receiver, push_receiver; 1393 Label call_to_object, use_global_receiver, push_receiver;
1395 __ lw(a0, MemOperand(fp, kRecvOffset)); 1394 __ lw(a0, MemOperand(fp, kRecvOffset));
1396 1395
1397 // Do not transform the receiver for strict mode functions. 1396 // Do not transform the receiver for strict mode functions.
1398 __ lw(a2, FieldMemOperand(a1, SharedFunctionInfo::kCompilerHintsOffset)); 1397 __ lw(a2, FieldMemOperand(a1, SharedFunctionInfo::kCompilerHintsOffset));
1399 __ And(t0, a2, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + 1398 __ And(t0, a2, Operand(1 << (SharedFunctionInfo::kStrictModeFunction +
1400 kSmiTagSize))); 1399 kSmiTagSize)));
1401 __ Branch(&push_receiver, ne, t0, Operand(zero_reg)); 1400 __ Branch(&push_receiver, ne, t0, Operand(zero_reg));
1402 1401
1403 // Do not transform the receiver for native (Compilerhints already in a2). 1402 // Do not transform the receiver for native (Compilerhints already in a2).
1404 __ And(t0, a2, Operand(1 << (SharedFunctionInfo::kES5Native + 1403 __ And(t0, a2, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize)));
1405 kSmiTagSize)));
1406 __ Branch(&push_receiver, ne, t0, Operand(zero_reg)); 1404 __ Branch(&push_receiver, ne, t0, Operand(zero_reg));
1407 1405
1408 // Compute the receiver in non-strict mode. 1406 // Compute the receiver in non-strict mode.
1409 __ And(t0, a0, Operand(kSmiTagMask)); 1407 __ And(t0, a0, Operand(kSmiTagMask));
1410 __ Branch(&call_to_object, eq, t0, Operand(zero_reg)); 1408 __ Branch(&call_to_object, eq, t0, Operand(zero_reg));
1411 __ LoadRoot(a1, Heap::kNullValueRootIndex); 1409 __ LoadRoot(a1, Heap::kNullValueRootIndex);
1412 __ Branch(&use_global_receiver, eq, a0, Operand(a1)); 1410 __ Branch(&use_global_receiver, eq, a0, Operand(a1));
1413 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); 1411 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex);
1414 __ Branch(&use_global_receiver, eq, a0, Operand(a2)); 1412 __ Branch(&use_global_receiver, eq, a0, Operand(a2));
1415 1413
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 __ bind(&dont_adapt_arguments); 1617 __ bind(&dont_adapt_arguments);
1620 __ Jump(a3); 1618 __ Jump(a3);
1621 } 1619 }
1622 1620
1623 1621
1624 #undef __ 1622 #undef __
1625 1623
1626 } } // namespace v8::internal 1624 } } // namespace v8::internal
1627 1625
1628 #endif // V8_TARGET_ARCH_MIPS 1626 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698