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

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

Issue 177683002: Mode clean-up pt 1: rename classic/non-strict mode to sloppy mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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
OLDNEW
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 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); 1032 __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
1033 __ ldr(r3, FieldMemOperand(r2, SharedFunctionInfo::kCompilerHintsOffset)); 1033 __ ldr(r3, FieldMemOperand(r2, SharedFunctionInfo::kCompilerHintsOffset));
1034 __ tst(r3, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + 1034 __ tst(r3, Operand(1 << (SharedFunctionInfo::kStrictModeFunction +
1035 kSmiTagSize))); 1035 kSmiTagSize)));
1036 __ b(ne, &shift_arguments); 1036 __ b(ne, &shift_arguments);
1037 1037
1038 // Do not transform the receiver for native (Compilerhints already in r3). 1038 // Do not transform the receiver for native (Compilerhints already in r3).
1039 __ tst(r3, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize))); 1039 __ tst(r3, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize)));
1040 __ b(ne, &shift_arguments); 1040 __ b(ne, &shift_arguments);
1041 1041
1042 // Compute the receiver in non-strict mode. 1042 // Compute the receiver in sloppy mode.
1043 __ add(r2, sp, Operand(r0, LSL, kPointerSizeLog2)); 1043 __ add(r2, sp, Operand(r0, LSL, kPointerSizeLog2));
1044 __ ldr(r2, MemOperand(r2, -kPointerSize)); 1044 __ ldr(r2, MemOperand(r2, -kPointerSize));
1045 // r0: actual number of arguments 1045 // r0: actual number of arguments
1046 // r1: function 1046 // r1: function
1047 // r2: first argument 1047 // r2: first argument
1048 __ JumpIfSmi(r2, &convert_to_object); 1048 __ JumpIfSmi(r2, &convert_to_object);
1049 1049
1050 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); 1050 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex);
1051 __ cmp(r2, r3); 1051 __ cmp(r2, r3);
1052 __ b(eq, &use_global_receiver); 1052 __ b(eq, &use_global_receiver);
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 Label call_to_object, use_global_receiver; 1240 Label call_to_object, use_global_receiver;
1241 __ ldr(r2, FieldMemOperand(r2, SharedFunctionInfo::kCompilerHintsOffset)); 1241 __ ldr(r2, FieldMemOperand(r2, SharedFunctionInfo::kCompilerHintsOffset));
1242 __ tst(r2, Operand(1 << (SharedFunctionInfo::kStrictModeFunction + 1242 __ tst(r2, Operand(1 << (SharedFunctionInfo::kStrictModeFunction +
1243 kSmiTagSize))); 1243 kSmiTagSize)));
1244 __ b(ne, &push_receiver); 1244 __ b(ne, &push_receiver);
1245 1245
1246 // Do not transform the receiver for strict mode functions. 1246 // Do not transform the receiver for strict mode functions.
1247 __ tst(r2, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize))); 1247 __ tst(r2, Operand(1 << (SharedFunctionInfo::kNative + kSmiTagSize)));
1248 __ b(ne, &push_receiver); 1248 __ b(ne, &push_receiver);
1249 1249
1250 // Compute the receiver in non-strict mode. 1250 // Compute the receiver in sloppy mode.
1251 __ JumpIfSmi(r0, &call_to_object); 1251 __ JumpIfSmi(r0, &call_to_object);
1252 __ LoadRoot(r1, Heap::kNullValueRootIndex); 1252 __ LoadRoot(r1, Heap::kNullValueRootIndex);
1253 __ cmp(r0, r1); 1253 __ cmp(r0, r1);
1254 __ b(eq, &use_global_receiver); 1254 __ b(eq, &use_global_receiver);
1255 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex); 1255 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
1256 __ cmp(r0, r1); 1256 __ cmp(r0, r1);
1257 __ b(eq, &use_global_receiver); 1257 __ b(eq, &use_global_receiver);
1258 1258
1259 // Check if the receiver is already a JavaScript object. 1259 // Check if the receiver is already a JavaScript object.
1260 // r0: receiver 1260 // r0: receiver
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 __ bind(&dont_adapt_arguments); 1468 __ bind(&dont_adapt_arguments);
1469 __ Jump(r3); 1469 __ Jump(r3);
1470 } 1470 }
1471 1471
1472 1472
1473 #undef __ 1473 #undef __
1474 1474
1475 } } // namespace v8::internal 1475 } } // namespace v8::internal
1476 1476
1477 #endif // V8_TARGET_ARCH_ARM 1477 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/arm/code-stubs-arm.cc » ('j') | src/globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698