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

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

Issue 26841009: Make TestJSArrayForAllocationMemento less awkward. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments addressed. Created 7 years, 2 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') | 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 4903 matching lines...) Expand 10 before | Expand all | Expand 10 after
4914 FieldOperand(rcx, JSObject::kElementsOffset)); 4914 FieldOperand(rcx, JSObject::kElementsOffset));
4915 j(not_equal, call_runtime); 4915 j(not_equal, call_runtime);
4916 4916
4917 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); 4917 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset));
4918 cmpq(rcx, null_value); 4918 cmpq(rcx, null_value);
4919 j(not_equal, &next); 4919 j(not_equal, &next);
4920 } 4920 }
4921 4921
4922 void MacroAssembler::TestJSArrayForAllocationMemento( 4922 void MacroAssembler::TestJSArrayForAllocationMemento(
4923 Register receiver_reg, 4923 Register receiver_reg,
4924 Register scratch_reg) { 4924 Register scratch_reg,
4925 Label no_memento_available; 4925 Label* no_memento_found) {
4926 ExternalReference new_space_start = 4926 ExternalReference new_space_start =
4927 ExternalReference::new_space_start(isolate()); 4927 ExternalReference::new_space_start(isolate());
4928 ExternalReference new_space_allocation_top = 4928 ExternalReference new_space_allocation_top =
4929 ExternalReference::new_space_allocation_top_address(isolate()); 4929 ExternalReference::new_space_allocation_top_address(isolate());
4930 4930
4931 lea(scratch_reg, Operand(receiver_reg, 4931 lea(scratch_reg, Operand(receiver_reg,
4932 JSArray::kSize + AllocationMemento::kSize - kHeapObjectTag)); 4932 JSArray::kSize + AllocationMemento::kSize - kHeapObjectTag));
4933 movq(kScratchRegister, new_space_start); 4933 movq(kScratchRegister, new_space_start);
4934 cmpq(scratch_reg, kScratchRegister); 4934 cmpq(scratch_reg, kScratchRegister);
4935 j(less, &no_memento_available); 4935 j(less, no_memento_found);
4936 cmpq(scratch_reg, ExternalOperand(new_space_allocation_top)); 4936 cmpq(scratch_reg, ExternalOperand(new_space_allocation_top));
4937 j(greater, &no_memento_available); 4937 j(greater, no_memento_found);
4938 CompareRoot(MemOperand(scratch_reg, -AllocationMemento::kSize), 4938 CompareRoot(MemOperand(scratch_reg, -AllocationMemento::kSize),
4939 Heap::kAllocationMementoMapRootIndex); 4939 Heap::kAllocationMementoMapRootIndex);
4940 bind(&no_memento_available);
4941 } 4940 }
4942 4941
4943 4942
4944 void MacroAssembler::RecordObjectAllocation(Isolate* isolate, 4943 void MacroAssembler::RecordObjectAllocation(Isolate* isolate,
4945 Register object, 4944 Register object,
4946 Register object_size) { 4945 Register object_size) {
4947 FrameScope frame(this, StackFrame::EXIT); 4946 FrameScope frame(this, StackFrame::EXIT);
4948 PushSafepointRegisters(); 4947 PushSafepointRegisters();
4949 PrepareCallCFunction(3); 4948 PrepareCallCFunction(3);
4950 // In case object is rdx 4949 // In case object is rdx
(...skipping 18 matching lines...) Expand all
4969 movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE); 4968 movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE);
4970 CallCFunction( 4969 CallCFunction(
4971 ExternalReference::record_object_allocation_function(isolate), 3); 4970 ExternalReference::record_object_allocation_function(isolate), 3);
4972 PopSafepointRegisters(); 4971 PopSafepointRegisters();
4973 } 4972 }
4974 4973
4975 4974
4976 } } // namespace v8::internal 4975 } } // namespace v8::internal
4977 4976
4978 #endif // V8_TARGET_ARCH_X64 4977 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698