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

Side by Side Diff: src/x64/ic-x64.cc

Issue 68343016: [Object.observe] Don't force normalization of elements for observed objects (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | « src/objects-inl.h ('k') | src/x64/stub-cache-x64.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 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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 // -- rsp[0] : return address 742 // -- rsp[0] : return address
743 // ----------------------------------- 743 // -----------------------------------
744 Label slow, slow_with_tagged_index, fast_object, fast_object_grow; 744 Label slow, slow_with_tagged_index, fast_object, fast_object_grow;
745 Label fast_double, fast_double_grow; 745 Label fast_double, fast_double_grow;
746 Label array, extra, check_if_double_array; 746 Label array, extra, check_if_double_array;
747 747
748 // Check that the object isn't a smi. 748 // Check that the object isn't a smi.
749 __ JumpIfSmi(rdx, &slow_with_tagged_index); 749 __ JumpIfSmi(rdx, &slow_with_tagged_index);
750 // Get the map from the receiver. 750 // Get the map from the receiver.
751 __ movq(r9, FieldOperand(rdx, HeapObject::kMapOffset)); 751 __ movq(r9, FieldOperand(rdx, HeapObject::kMapOffset));
752 // Check that the receiver does not require access checks. We need 752 // Check that the receiver does not require access checks and is not observed.
753 // to do this because this generic stub does not perform map checks. 753 // The generic stub does not perform map checks or handle observed objects.
754 __ testb(FieldOperand(r9, Map::kBitFieldOffset), 754 __ testb(FieldOperand(r9, Map::kBitFieldOffset),
755 Immediate(1 << Map::kIsAccessCheckNeeded)); 755 Immediate(1 << Map::kIsAccessCheckNeeded | 1 << Map::kIsObserved));
756 __ j(not_zero, &slow_with_tagged_index); 756 __ j(not_zero, &slow_with_tagged_index);
757 // Check that the key is a smi. 757 // Check that the key is a smi.
758 __ JumpIfNotSmi(rcx, &slow_with_tagged_index); 758 __ JumpIfNotSmi(rcx, &slow_with_tagged_index);
759 __ SmiToInteger32(rcx, rcx); 759 __ SmiToInteger32(rcx, rcx);
760 760
761 __ CmpInstanceType(r9, JS_ARRAY_TYPE); 761 __ CmpInstanceType(r9, JS_ARRAY_TYPE);
762 __ j(equal, &array); 762 __ j(equal, &array);
763 // Check that the object is some kind of JSObject. 763 // Check that the object is some kind of JSObject.
764 __ CmpInstanceType(r9, FIRST_JS_OBJECT_TYPE); 764 __ CmpInstanceType(r9, FIRST_JS_OBJECT_TYPE);
765 __ j(below, &slow); 765 __ j(below, &slow);
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1702 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1703 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1703 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1704 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1704 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1705 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1705 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1706 } 1706 }
1707 1707
1708 1708
1709 } } // namespace v8::internal 1709 } } // namespace v8::internal
1710 1710
1711 #endif // V8_TARGET_ARCH_X64 1711 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698