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

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

Issue 2870018: Add "has fast elements" bit to maps and use it in inlined keyed loads. (Closed)
Patch Set: More ARM fixes. Created 10 years, 6 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
« no previous file with comments | « src/runtime.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 7511 matching lines...) Expand 10 before | Expand all | Expand 10 after
7522 kScratchRegister); 7522 kScratchRegister);
7523 deferred->Branch(not_equal); 7523 deferred->Branch(not_equal);
7524 7524
7525 // Check that the key is a non-negative smi. 7525 // Check that the key is a non-negative smi.
7526 __ JumpIfNotPositiveSmi(key.reg(), deferred->entry_label()); 7526 __ JumpIfNotPositiveSmi(key.reg(), deferred->entry_label());
7527 7527
7528 // Get the elements array from the receiver and check that it 7528 // Get the elements array from the receiver and check that it
7529 // is not a dictionary. 7529 // is not a dictionary.
7530 __ movq(elements.reg(), 7530 __ movq(elements.reg(),
7531 FieldOperand(receiver.reg(), JSObject::kElementsOffset)); 7531 FieldOperand(receiver.reg(), JSObject::kElementsOffset));
7532 __ Cmp(FieldOperand(elements.reg(), HeapObject::kMapOffset), 7532 if (FLAG_debug_code) {
7533 Factory::fixed_array_map()); 7533 __ Cmp(FieldOperand(elements.reg(), HeapObject::kMapOffset),
7534 deferred->Branch(not_equal); 7534 Factory::fixed_array_map());
7535 __ Assert(equal, "JSObject with fast elements map has slow elements");
7536 }
7535 7537
7536 // Check that key is within bounds. 7538 // Check that key is within bounds.
7537 __ SmiCompare(key.reg(), 7539 __ SmiCompare(key.reg(),
7538 FieldOperand(elements.reg(), FixedArray::kLengthOffset)); 7540 FieldOperand(elements.reg(), FixedArray::kLengthOffset));
7539 deferred->Branch(above_equal); 7541 deferred->Branch(above_equal);
7540 7542
7541 // Load and check that the result is not the hole. We could 7543 // Load and check that the result is not the hole. We could
7542 // reuse the index or elements register for the value. 7544 // reuse the index or elements register for the value.
7543 // 7545 //
7544 // TODO(206): Consider whether it makes sense to try some 7546 // TODO(206): Consider whether it makes sense to try some
(...skipping 4346 matching lines...) Expand 10 before | Expand all | Expand 10 after
11891 } 11893 }
11892 11894
11893 #endif 11895 #endif
11894 11896
11895 11897
11896 #undef __ 11898 #undef __
11897 11899
11898 } } // namespace v8::internal 11900 } } // namespace v8::internal
11899 11901
11900 #endif // V8_TARGET_ARCH_X64 11902 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698