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

Side by Side Diff: src/a64/builtins-a64.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, 10 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/a64/code-stubs-a64.cc » ('j') | src/globals.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 __ Ldr(scratch1, 1038 __ Ldr(scratch1,
1039 FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset)); 1039 FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset));
1040 __ Ldr(scratch2.W(), 1040 __ Ldr(scratch2.W(),
1041 FieldMemOperand(scratch1, SharedFunctionInfo::kCompilerHintsOffset)); 1041 FieldMemOperand(scratch1, SharedFunctionInfo::kCompilerHintsOffset));
1042 __ TestAndBranchIfAnySet( 1042 __ TestAndBranchIfAnySet(
1043 scratch2.W(), 1043 scratch2.W(),
1044 (1 << SharedFunctionInfo::kStrictModeFunction) | 1044 (1 << SharedFunctionInfo::kStrictModeFunction) |
1045 (1 << SharedFunctionInfo::kNative), 1045 (1 << SharedFunctionInfo::kNative),
1046 &shift_arguments); 1046 &shift_arguments);
1047 1047
1048 // Compute the receiver in non-strict mode. 1048 // Compute the receiver in sloppy mode.
1049 Register receiver = x2; 1049 Register receiver = x2;
1050 __ Sub(scratch1, argc, 1); 1050 __ Sub(scratch1, argc, 1);
1051 __ Peek(receiver, Operand(scratch1, LSL, kXRegSizeInBytesLog2)); 1051 __ Peek(receiver, Operand(scratch1, LSL, kXRegSizeInBytesLog2));
1052 __ JumpIfSmi(receiver, &convert_to_object); 1052 __ JumpIfSmi(receiver, &convert_to_object);
1053 1053
1054 __ JumpIfRoot(receiver, Heap::kUndefinedValueRootIndex, 1054 __ JumpIfRoot(receiver, Heap::kUndefinedValueRootIndex,
1055 &use_global_receiver); 1055 &use_global_receiver);
1056 __ JumpIfRoot(receiver, Heap::kNullValueRootIndex, &use_global_receiver); 1056 __ JumpIfRoot(receiver, Heap::kNullValueRootIndex, &use_global_receiver);
1057 1057
1058 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); 1058 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE);
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 JSFunction::kSharedFunctionInfoOffset)); 1240 JSFunction::kSharedFunctionInfoOffset));
1241 1241
1242 // Compute and push the receiver. 1242 // Compute and push the receiver.
1243 // Do not transform the receiver for strict mode functions. 1243 // Do not transform the receiver for strict mode functions.
1244 Label convert_receiver_to_object, use_global_receiver; 1244 Label convert_receiver_to_object, use_global_receiver;
1245 __ Ldr(w10, FieldMemOperand(x2, SharedFunctionInfo::kCompilerHintsOffset)); 1245 __ Ldr(w10, FieldMemOperand(x2, SharedFunctionInfo::kCompilerHintsOffset));
1246 __ Tbnz(x10, SharedFunctionInfo::kStrictModeFunction, &push_receiver); 1246 __ Tbnz(x10, SharedFunctionInfo::kStrictModeFunction, &push_receiver);
1247 // Do not transform the receiver for native functions. 1247 // Do not transform the receiver for native functions.
1248 __ Tbnz(x10, SharedFunctionInfo::kNative, &push_receiver); 1248 __ Tbnz(x10, SharedFunctionInfo::kNative, &push_receiver);
1249 1249
1250 // Compute the receiver in non-strict mode. 1250 // Compute the receiver in sloppy mode.
1251 __ JumpIfSmi(receiver, &convert_receiver_to_object); 1251 __ JumpIfSmi(receiver, &convert_receiver_to_object);
1252 __ JumpIfRoot(receiver, Heap::kNullValueRootIndex, &use_global_receiver); 1252 __ JumpIfRoot(receiver, Heap::kNullValueRootIndex, &use_global_receiver);
1253 __ JumpIfRoot(receiver, Heap::kUndefinedValueRootIndex, 1253 __ JumpIfRoot(receiver, Heap::kUndefinedValueRootIndex,
1254 &use_global_receiver); 1254 &use_global_receiver);
1255 1255
1256 // Check if the receiver is already a JavaScript object. 1256 // Check if the receiver is already a JavaScript object.
1257 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); 1257 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE);
1258 __ JumpIfObjectType(receiver, x10, x11, FIRST_SPEC_OBJECT_TYPE, 1258 __ JumpIfObjectType(receiver, x10, x11, FIRST_SPEC_OBJECT_TYPE,
1259 &push_receiver, ge); 1259 &push_receiver, ge);
1260 1260
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 __ Bind(&dont_adapt_arguments); 1470 __ Bind(&dont_adapt_arguments);
1471 __ Jump(x3); 1471 __ Jump(x3);
1472 } 1472 }
1473 1473
1474 1474
1475 #undef __ 1475 #undef __
1476 1476
1477 } } // namespace v8::internal 1477 } } // namespace v8::internal
1478 1478
1479 #endif // V8_TARGET_ARCH_ARM 1479 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/a64/code-stubs-a64.cc » ('j') | src/globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698