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

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

Issue 6992072: Implement set trap for proxies, and revamp class hierarchy in preparation (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Renamed range constants for InstanceType enum. 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
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 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 941
942 // If the result is a smi, it is *not* an object in the ECMA sense. 942 // If the result is a smi, it is *not* an object in the ECMA sense.
943 // r0: result 943 // r0: result
944 // sp[0]: receiver (newly allocated object) 944 // sp[0]: receiver (newly allocated object)
945 // sp[1]: constructor function 945 // sp[1]: constructor function
946 // sp[2]: number of arguments (smi-tagged) 946 // sp[2]: number of arguments (smi-tagged)
947 __ tst(r0, Operand(kSmiTagMask)); 947 __ tst(r0, Operand(kSmiTagMask));
948 __ b(eq, &use_receiver); 948 __ b(eq, &use_receiver);
949 949
950 // If the type of the result (stored in its map) is less than 950 // If the type of the result (stored in its map) is less than
951 // FIRST_JS_OBJECT_TYPE, it is not an object in the ECMA sense. 951 // FIRST_SPEC_OBJECT_TYPE, it is not an object in the ECMA sense.
952 __ CompareObjectType(r0, r3, r3, FIRST_JS_OBJECT_TYPE); 952 __ CompareObjectType(r0, r3, r3, FIRST_SPEC_OBJECT_TYPE);
953 __ b(ge, &exit); 953 __ b(ge, &exit);
Kevin Millikin (Chromium) 2011/05/26 13:30:10 Not your code, but these comparisons should all be
Kevin Millikin (Chromium) 2011/05/30 16:32:29 Scratch that. The byte is zero extended and it's
954 954
955 // Throw away the result of the constructor invocation and use the 955 // Throw away the result of the constructor invocation and use the
956 // on-stack receiver as the result. 956 // on-stack receiver as the result.
957 __ bind(&use_receiver); 957 __ bind(&use_receiver);
958 __ ldr(r0, MemOperand(sp)); 958 __ ldr(r0, MemOperand(sp));
959 959
960 // Remove receiver from the stack, remove caller arguments, and 960 // Remove receiver from the stack, remove caller arguments, and
961 // return. 961 // return.
962 __ bind(&exit); 962 __ bind(&exit);
963 // r0: result 963 // r0: result
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 __ tst(r2, Operand(kSmiTagMask)); 1257 __ tst(r2, Operand(kSmiTagMask));
1258 __ b(eq, &convert_to_object); 1258 __ b(eq, &convert_to_object);
1259 1259
1260 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); 1260 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex);
1261 __ cmp(r2, r3); 1261 __ cmp(r2, r3);
1262 __ b(eq, &use_global_receiver); 1262 __ b(eq, &use_global_receiver);
1263 __ LoadRoot(r3, Heap::kNullValueRootIndex); 1263 __ LoadRoot(r3, Heap::kNullValueRootIndex);
1264 __ cmp(r2, r3); 1264 __ cmp(r2, r3);
1265 __ b(eq, &use_global_receiver); 1265 __ b(eq, &use_global_receiver);
1266 1266
1267 __ CompareObjectType(r2, r3, r3, FIRST_JS_OBJECT_TYPE); 1267 __ CompareObjectType(r2, r3, r3, FIRST_SPEC_OBJECT_TYPE);
1268 __ b(lt, &convert_to_object); 1268 __ b(lt, &convert_to_object);
1269 __ cmp(r3, Operand(LAST_JS_OBJECT_TYPE)); 1269 __ cmp(r3, Operand(LAST_SPEC_OBJECT_TYPE));
1270 __ b(le, &shift_arguments); 1270 __ b(le, &shift_arguments);
1271 1271
1272 __ bind(&convert_to_object); 1272 __ bind(&convert_to_object);
1273 __ EnterInternalFrame(); // In order to preserve argument count. 1273 __ EnterInternalFrame(); // In order to preserve argument count.
1274 __ mov(r0, Operand(r0, LSL, kSmiTagSize)); // Smi-tagged. 1274 __ mov(r0, Operand(r0, LSL, kSmiTagSize)); // Smi-tagged.
1275 __ push(r0); 1275 __ push(r0);
1276 1276
1277 __ push(r2); 1277 __ push(r2);
1278 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); 1278 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION);
1279 __ mov(r2, r0); 1279 __ mov(r2, r0);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 __ b(eq, &call_to_object); 1436 __ b(eq, &call_to_object);
1437 __ LoadRoot(r1, Heap::kNullValueRootIndex); 1437 __ LoadRoot(r1, Heap::kNullValueRootIndex);
1438 __ cmp(r0, r1); 1438 __ cmp(r0, r1);
1439 __ b(eq, &use_global_receiver); 1439 __ b(eq, &use_global_receiver);
1440 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex); 1440 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
1441 __ cmp(r0, r1); 1441 __ cmp(r0, r1);
1442 __ b(eq, &use_global_receiver); 1442 __ b(eq, &use_global_receiver);
1443 1443
1444 // Check if the receiver is already a JavaScript object. 1444 // Check if the receiver is already a JavaScript object.
1445 // r0: receiver 1445 // r0: receiver
1446 __ CompareObjectType(r0, r1, r1, FIRST_JS_OBJECT_TYPE); 1446 __ CompareObjectType(r0, r1, r1, FIRST_SPEC_OBJECT_TYPE);
1447 __ b(lt, &call_to_object); 1447 __ b(lt, &call_to_object);
1448 __ cmp(r1, Operand(LAST_JS_OBJECT_TYPE)); 1448 __ cmp(r1, Operand(LAST_SPEC_OBJECT_TYPE));
1449 __ b(le, &push_receiver); 1449 __ b(le, &push_receiver);
1450 1450
1451 // Convert the receiver to a regular object. 1451 // Convert the receiver to a regular object.
1452 // r0: receiver 1452 // r0: receiver
1453 __ bind(&call_to_object); 1453 __ bind(&call_to_object);
1454 __ push(r0); 1454 __ push(r0);
1455 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); 1455 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION);
1456 __ b(&push_receiver); 1456 __ b(&push_receiver);
1457 1457
1458 // Use the current global receiver object as the receiver. 1458 // Use the current global receiver object as the receiver.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1635 __ bind(&dont_adapt_arguments); 1635 __ bind(&dont_adapt_arguments);
1636 __ Jump(r3); 1636 __ Jump(r3);
1637 } 1637 }
1638 1638
1639 1639
1640 #undef __ 1640 #undef __
1641 1641
1642 } } // namespace v8::internal 1642 } } // namespace v8::internal
1643 1643
1644 #endif // V8_TARGET_ARCH_ARM 1644 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/arm/code-stubs-arm.cc » ('j') | src/arm/full-codegen-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698