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

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

Issue 7071009: Revert "Pass undefined to JS builtins when called with implicit receiver." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 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 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); 1248 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
1249 1249
1250 // Do not transform the receiver for strict mode functions. 1250 // Do not transform the receiver for strict mode functions.
1251 __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); 1251 __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
1252 __ ldr(r3, FieldMemOperand(r2, SharedFunctionInfo::kCompilerHintsOffset)); 1252 __ ldr(r3, FieldMemOperand(r2, SharedFunctionInfo::kCompilerHintsOffset));
1253 __ tst(r3, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + 1253 __ tst(r3, Operand(1 << (SharedFunctionInfo::kStrictModeFunction +
1254 kSmiTagSize))); 1254 kSmiTagSize)));
1255 __ b(ne, &shift_arguments); 1255 __ b(ne, &shift_arguments);
1256 1256
1257 // Do not transform the receiver for native (Compilerhints already in r3). 1257 // Do not transform the receiver for native (Compilerhints already in r3).
1258 __ tst(r3, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize))); 1258 __ tst(r3, Operand(1 << (SharedFunctionInfo::kES5Native +
1259 kSmiTagSize)));
1259 __ b(ne, &shift_arguments); 1260 __ b(ne, &shift_arguments);
1260 1261
1261 // Compute the receiver in non-strict mode. 1262 // Compute the receiver in non-strict mode.
1262 __ add(r2, sp, Operand(r0, LSL, kPointerSizeLog2)); 1263 __ add(r2, sp, Operand(r0, LSL, kPointerSizeLog2));
1263 __ ldr(r2, MemOperand(r2, -kPointerSize)); 1264 __ ldr(r2, MemOperand(r2, -kPointerSize));
1264 // r0: actual number of arguments 1265 // r0: actual number of arguments
1265 // r1: function 1266 // r1: function
1266 // r2: first argument 1267 // r2: first argument
1267 __ tst(r2, Operand(kSmiTagMask)); 1268 __ tst(r2, Operand(kSmiTagMask));
1268 __ b(eq, &convert_to_object); 1269 __ b(eq, &convert_to_object);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1432 Label call_to_object, use_global_receiver, push_receiver; 1433 Label call_to_object, use_global_receiver, push_receiver;
1433 __ ldr(r0, MemOperand(fp, kRecvOffset)); 1434 __ ldr(r0, MemOperand(fp, kRecvOffset));
1434 1435
1435 // Do not transform the receiver for strict mode functions. 1436 // Do not transform the receiver for strict mode functions.
1436 __ ldr(r2, FieldMemOperand(r1, SharedFunctionInfo::kCompilerHintsOffset)); 1437 __ ldr(r2, FieldMemOperand(r1, SharedFunctionInfo::kCompilerHintsOffset));
1437 __ tst(r2, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + 1438 __ tst(r2, Operand(1 << (SharedFunctionInfo::kStrictModeFunction +
1438 kSmiTagSize))); 1439 kSmiTagSize)));
1439 __ b(ne, &push_receiver); 1440 __ b(ne, &push_receiver);
1440 1441
1441 // Do not transform the receiver for strict mode functions. 1442 // Do not transform the receiver for strict mode functions.
1442 __ tst(r2, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize))); 1443 __ tst(r2, Operand(1 << (SharedFunctionInfo::kES5Native +
1444 kSmiTagSize)));
1443 __ b(ne, &push_receiver); 1445 __ b(ne, &push_receiver);
1444 1446
1445 // Compute the receiver in non-strict mode. 1447 // Compute the receiver in non-strict mode.
1446 __ tst(r0, Operand(kSmiTagMask)); 1448 __ tst(r0, Operand(kSmiTagMask));
1447 __ b(eq, &call_to_object); 1449 __ b(eq, &call_to_object);
1448 __ LoadRoot(r1, Heap::kNullValueRootIndex); 1450 __ LoadRoot(r1, Heap::kNullValueRootIndex);
1449 __ cmp(r0, r1); 1451 __ cmp(r0, r1);
1450 __ b(eq, &use_global_receiver); 1452 __ b(eq, &use_global_receiver);
1451 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex); 1453 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
1452 __ cmp(r0, r1); 1454 __ cmp(r0, r1);
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 __ bind(&dont_adapt_arguments); 1649 __ bind(&dont_adapt_arguments);
1648 __ Jump(r3); 1650 __ Jump(r3);
1649 } 1651 }
1650 1652
1651 1653
1652 #undef __ 1654 #undef __
1653 1655
1654 } } // namespace v8::internal 1656 } } // namespace v8::internal
1655 1657
1656 #endif // V8_TARGET_ARCH_ARM 1658 #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