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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 135903014: Stay in fast enum case if the empty_slow_element_dictionary is used. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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 | « src/ia32/macro-assembler-ia32.cc ('k') | no next file » | 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 4914 matching lines...) Expand 10 before | Expand all | Expand 10 after
4925 4925
4926 // For all objects but the receiver, check that the cache is empty. 4926 // For all objects but the receiver, check that the cache is empty.
4927 EnumLength(rdx, rbx); 4927 EnumLength(rdx, rbx);
4928 Cmp(rdx, Smi::FromInt(0)); 4928 Cmp(rdx, Smi::FromInt(0));
4929 j(not_equal, call_runtime); 4929 j(not_equal, call_runtime);
4930 4930
4931 bind(&start); 4931 bind(&start);
4932 4932
4933 // Check that there are no elements. Register rcx contains the current JS 4933 // Check that there are no elements. Register rcx contains the current JS
4934 // object we've reached through the prototype chain. 4934 // object we've reached through the prototype chain.
4935 Label no_elements;
4935 cmpq(empty_fixed_array_value, 4936 cmpq(empty_fixed_array_value,
4936 FieldOperand(rcx, JSObject::kElementsOffset)); 4937 FieldOperand(rcx, JSObject::kElementsOffset));
4938 j(equal, &no_elements);
4939
4940 // Second chance, the object may be using the empty slow element dictionary.
4941 LoadRoot(kScratchRegister, Heap::kEmptySlowElementDictionaryRootIndex);
4942 cmpq(kScratchRegister, FieldOperand(rcx, JSObject::kElementsOffset));
4937 j(not_equal, call_runtime); 4943 j(not_equal, call_runtime);
4938 4944
4945 bind(&no_elements);
4939 movp(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); 4946 movp(rcx, FieldOperand(rbx, Map::kPrototypeOffset));
4940 cmpq(rcx, null_value); 4947 cmpq(rcx, null_value);
4941 j(not_equal, &next); 4948 j(not_equal, &next);
4942 } 4949 }
4943 4950
4944 void MacroAssembler::TestJSArrayForAllocationMemento( 4951 void MacroAssembler::TestJSArrayForAllocationMemento(
4945 Register receiver_reg, 4952 Register receiver_reg,
4946 Register scratch_reg, 4953 Register scratch_reg,
4947 Label* no_memento_found) { 4954 Label* no_memento_found) {
4948 ExternalReference new_space_start = 4955 ExternalReference new_space_start =
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
4984 j(equal, found); 4991 j(equal, found);
4985 movp(current, FieldOperand(current, Map::kPrototypeOffset)); 4992 movp(current, FieldOperand(current, Map::kPrototypeOffset));
4986 CompareRoot(current, Heap::kNullValueRootIndex); 4993 CompareRoot(current, Heap::kNullValueRootIndex);
4987 j(not_equal, &loop_again); 4994 j(not_equal, &loop_again);
4988 } 4995 }
4989 4996
4990 4997
4991 } } // namespace v8::internal 4998 } } // namespace v8::internal
4992 4999
4993 #endif // V8_TARGET_ARCH_X64 5000 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698