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

Side by Side Diff: src/arm/builtins-arm.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 | « no previous file | src/arm/full-codegen-arm.cc » ('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 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); 1250 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
1251 1251
1252 // Do not transform the receiver for strict mode functions. 1252 // Do not transform the receiver for strict mode functions.
1253 __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); 1253 __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
1254 __ ldr(r3, FieldMemOperand(r2, SharedFunctionInfo::kCompilerHintsOffset)); 1254 __ ldr(r3, FieldMemOperand(r2, SharedFunctionInfo::kCompilerHintsOffset));
1255 __ tst(r3, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + 1255 __ tst(r3, Operand(1 << (SharedFunctionInfo::kStrictModeFunction +
1256 kSmiTagSize))); 1256 kSmiTagSize)));
1257 __ b(ne, &shift_arguments); 1257 __ b(ne, &shift_arguments);
1258 1258
1259 // Do not transform the receiver for native (Compilerhints already in r3). 1259 // Do not transform the receiver for native (Compilerhints already in r3).
1260 __ tst(r3, Operand(1 << (SharedFunctionInfo::kES5Native + 1260 __ tst(r3, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize)));
1261 kSmiTagSize)));
1262 __ b(ne, &shift_arguments); 1261 __ b(ne, &shift_arguments);
1263 1262
1264 // Compute the receiver in non-strict mode. 1263 // Compute the receiver in non-strict mode.
1265 __ add(r2, sp, Operand(r0, LSL, kPointerSizeLog2)); 1264 __ add(r2, sp, Operand(r0, LSL, kPointerSizeLog2));
1266 __ ldr(r2, MemOperand(r2, -kPointerSize)); 1265 __ ldr(r2, MemOperand(r2, -kPointerSize));
1267 // r0: actual number of arguments 1266 // r0: actual number of arguments
1268 // r1: function 1267 // r1: function
1269 // r2: first argument 1268 // r2: first argument
1270 __ tst(r2, Operand(kSmiTagMask)); 1269 __ tst(r2, Operand(kSmiTagMask));
1271 __ b(eq, &convert_to_object); 1270 __ b(eq, &convert_to_object);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 Label call_to_object, use_global_receiver, push_receiver; 1435 Label call_to_object, use_global_receiver, push_receiver;
1437 __ ldr(r0, MemOperand(fp, kRecvOffset)); 1436 __ ldr(r0, MemOperand(fp, kRecvOffset));
1438 1437
1439 // Do not transform the receiver for strict mode functions. 1438 // Do not transform the receiver for strict mode functions.
1440 __ ldr(r2, FieldMemOperand(r1, SharedFunctionInfo::kCompilerHintsOffset)); 1439 __ ldr(r2, FieldMemOperand(r1, SharedFunctionInfo::kCompilerHintsOffset));
1441 __ tst(r2, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + 1440 __ tst(r2, Operand(1 << (SharedFunctionInfo::kStrictModeFunction +
1442 kSmiTagSize))); 1441 kSmiTagSize)));
1443 __ b(ne, &push_receiver); 1442 __ b(ne, &push_receiver);
1444 1443
1445 // Do not transform the receiver for strict mode functions. 1444 // Do not transform the receiver for strict mode functions.
1446 __ tst(r2, Operand(1 << (SharedFunctionInfo::kES5Native + 1445 __ tst(r2, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize)));
1447 kSmiTagSize)));
1448 __ b(ne, &push_receiver); 1446 __ b(ne, &push_receiver);
1449 1447
1450 // Compute the receiver in non-strict mode. 1448 // Compute the receiver in non-strict mode.
1451 __ tst(r0, Operand(kSmiTagMask)); 1449 __ tst(r0, Operand(kSmiTagMask));
1452 __ b(eq, &call_to_object); 1450 __ b(eq, &call_to_object);
1453 __ LoadRoot(r1, Heap::kNullValueRootIndex); 1451 __ LoadRoot(r1, Heap::kNullValueRootIndex);
1454 __ cmp(r0, r1); 1452 __ cmp(r0, r1);
1455 __ b(eq, &use_global_receiver); 1453 __ b(eq, &use_global_receiver);
1456 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex); 1454 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
1457 __ cmp(r0, r1); 1455 __ cmp(r0, r1);
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 __ bind(&dont_adapt_arguments); 1651 __ bind(&dont_adapt_arguments);
1654 __ Jump(r3); 1652 __ Jump(r3);
1655 } 1653 }
1656 1654
1657 1655
1658 #undef __ 1656 #undef __
1659 1657
1660 } } // namespace v8::internal 1658 } } // namespace v8::internal
1661 1659
1662 #endif // V8_TARGET_ARCH_ARM 1660 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698