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

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 2840004: Push AccessorInfo data directly if they reside in old space. (Closed)
Patch Set: 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 | « no previous file | 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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 809
810 Register other = reg.is(scratch1) ? scratch2 : scratch1; 810 Register other = reg.is(scratch1) ? scratch2 : scratch1;
811 __ EnterInternalFrame(); 811 __ EnterInternalFrame();
812 __ PushHandleScope(other); 812 __ PushHandleScope(other);
813 // Push the stack address where the list of arguments ends 813 // Push the stack address where the list of arguments ends
814 __ mov(other, esp); 814 __ mov(other, esp);
815 __ sub(Operand(other), Immediate(2 * kPointerSize)); 815 __ sub(Operand(other), Immediate(2 * kPointerSize));
816 __ push(other); 816 __ push(other);
817 __ push(receiver); // receiver 817 __ push(receiver); // receiver
818 __ push(reg); // holder 818 __ push(reg); // holder
819 __ mov(other, Immediate(callback_handle)); 819 // Push data from AccessorInfo.
820 __ push(FieldOperand(other, AccessorInfo::kDataOffset)); // data 820 if (Heap::InNewSpace(callback_handle->data())) {
821 __ mov(other, Immediate(callback_handle));
822 __ push(FieldOperand(other, AccessorInfo::kDataOffset));
823 } else {
824 __ push(Immediate(Handle<Object>(callback_handle->data())));
825 }
821 __ push(name_reg); // name 826 __ push(name_reg); // name
822 // Save a pointer to where we pushed the arguments pointer. 827 // Save a pointer to where we pushed the arguments pointer.
823 // This will be passed as the const AccessorInfo& to the C++ callback. 828 // This will be passed as the const AccessorInfo& to the C++ callback.
824 __ mov(eax, esp); 829 __ mov(eax, esp);
825 __ add(Operand(eax), Immediate(4 * kPointerSize)); 830 __ add(Operand(eax), Immediate(4 * kPointerSize));
826 __ mov(ebx, esp); 831 __ mov(ebx, esp);
827 832
828 // Do call through the api. 833 // Do call through the api.
829 ASSERT_EQ(5, ApiGetterEntryStub::kStackSpace); 834 ASSERT_EQ(5, ApiGetterEntryStub::kStackSpace);
830 Address getter_address = v8::ToCData<Address>(callback->getter()); 835 Address getter_address = v8::ToCData<Address>(callback->getter());
(...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after
2495 // Return the generated code. 2500 // Return the generated code.
2496 return GetCode(); 2501 return GetCode();
2497 } 2502 }
2498 2503
2499 2504
2500 #undef __ 2505 #undef __
2501 2506
2502 } } // namespace v8::internal 2507 } } // namespace v8::internal
2503 2508
2504 #endif // V8_TARGET_ARCH_IA32 2509 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698