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

Side by Side Diff: src/ia32/ic-ia32.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/builtins.cc ('k') | src/ia32/stub-cache-ia32.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 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 // -- esp[0] : return address 867 // -- esp[0] : return address
868 // ----------------------------------- 868 // -----------------------------------
869 Label slow, fast_object, fast_object_grow; 869 Label slow, fast_object, fast_object_grow;
870 Label fast_double, fast_double_grow; 870 Label fast_double, fast_double_grow;
871 Label array, extra, check_if_double_array; 871 Label array, extra, check_if_double_array;
872 872
873 // Check that the object isn't a smi. 873 // Check that the object isn't a smi.
874 __ JumpIfSmi(edx, &slow); 874 __ JumpIfSmi(edx, &slow);
875 // Get the map from the receiver. 875 // Get the map from the receiver.
876 __ mov(edi, FieldOperand(edx, HeapObject::kMapOffset)); 876 __ mov(edi, FieldOperand(edx, HeapObject::kMapOffset));
877 // Check that the receiver does not require access checks. We need 877 // Check that the receiver does not require access checks and is not observed.
878 // to do this because this generic stub does not perform map checks. 878 // The generic stub does not perform map checks or handle observed objects.
879 __ test_b(FieldOperand(edi, Map::kBitFieldOffset), 879 __ test_b(FieldOperand(edi, Map::kBitFieldOffset),
880 1 << Map::kIsAccessCheckNeeded); 880 1 << Map::kIsAccessCheckNeeded | 1 << Map::kIsObserved);
881 __ j(not_zero, &slow); 881 __ j(not_zero, &slow);
882 // Check that the key is a smi. 882 // Check that the key is a smi.
883 __ JumpIfNotSmi(ecx, &slow); 883 __ JumpIfNotSmi(ecx, &slow);
884 __ CmpInstanceType(edi, JS_ARRAY_TYPE); 884 __ CmpInstanceType(edi, JS_ARRAY_TYPE);
885 __ j(equal, &array); 885 __ j(equal, &array);
886 // Check that the object is some kind of JSObject. 886 // Check that the object is some kind of JSObject.
887 __ CmpInstanceType(edi, FIRST_JS_OBJECT_TYPE); 887 __ CmpInstanceType(edi, FIRST_JS_OBJECT_TYPE);
888 __ j(below, &slow); 888 __ j(below, &slow);
889 889
890 // Object case: Check key against length in the elements array. 890 // Object case: Check key against length in the elements array.
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1681 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1682 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1682 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1683 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1683 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1684 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1684 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1685 } 1685 }
1686 1686
1687 1687
1688 } } // namespace v8::internal 1688 } } // namespace v8::internal
1689 1689
1690 #endif // V8_TARGET_ARCH_IA32 1690 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698