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

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

Issue 11663005: Adapt Danno's Track Allocation Info idea to fast literals. When allocating a literal array, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: A few more review comments Created 7 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/x64/macro-assembler-x64.h ('k') | test/mjsunit/array-natives-elements.js » ('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 4591 matching lines...) Expand 10 before | Expand all | Expand 10 after
4602 // object we've reached through the prototype chain. 4602 // object we've reached through the prototype chain.
4603 cmpq(empty_fixed_array_value, 4603 cmpq(empty_fixed_array_value,
4604 FieldOperand(rcx, JSObject::kElementsOffset)); 4604 FieldOperand(rcx, JSObject::kElementsOffset));
4605 j(not_equal, call_runtime); 4605 j(not_equal, call_runtime);
4606 4606
4607 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); 4607 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset));
4608 cmpq(rcx, null_value); 4608 cmpq(rcx, null_value);
4609 j(not_equal, &next); 4609 j(not_equal, &next);
4610 } 4610 }
4611 4611
4612 void MacroAssembler::TestJSArrayForAllocationSiteInfo(
4613 Register receiver_reg,
4614 Register scratch_reg,
4615 Label* allocation_info_present) {
4616 Label no_info_available;
4617 ExternalReference new_space_start =
4618 ExternalReference::new_space_start(isolate());
4619 ExternalReference new_space_allocation_top =
4620 ExternalReference::new_space_allocation_top_address(isolate());
4621
4622 lea(scratch_reg, Operand(receiver_reg,
4623 JSArray::kSize + AllocationSiteInfo::kSize));
4624 movq(kScratchRegister, new_space_start);
4625 cmpq(scratch_reg, kScratchRegister);
4626 j(less, &no_info_available);
4627 cmpq(scratch_reg, ExternalOperand(new_space_allocation_top));
4628 j(greater_equal, &no_info_available);
4629 CompareRoot(MemOperand(scratch_reg, 0),
4630 Heap::kAllocationSiteInfoMapRootIndex);
4631 j(equal, allocation_info_present);
4632 bind(&no_info_available);
4633 }
4634
4612 4635
4613 } } // namespace v8::internal 4636 } } // namespace v8::internal
4614 4637
4615 #endif // V8_TARGET_ARCH_X64 4638 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/mjsunit/array-natives-elements.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698