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

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

Issue 183803022: Pass a Code object to Assembler::(set_)target_address_at for use by ool constant pool. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/frames-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 4858 matching lines...) Expand 10 before | Expand all | Expand 10 after
4869 // nop 4869 // nop
4870 // nop 4870 // nop
4871 // call <on-stack replacment> 4871 // call <on-stack replacment>
4872 // ok: 4872 // ok:
4873 *jns_instr_address = kNopByteOne; 4873 *jns_instr_address = kNopByteOne;
4874 *jns_offset_address = kNopByteTwo; 4874 *jns_offset_address = kNopByteTwo;
4875 break; 4875 break;
4876 } 4876 }
4877 4877
4878 Assembler::set_target_address_at(call_target_address, 4878 Assembler::set_target_address_at(call_target_address,
4879 unoptimized_code,
4879 replacement_code->entry()); 4880 replacement_code->entry());
4880 unoptimized_code->GetHeap()->incremental_marking()->RecordCodeTargetPatch( 4881 unoptimized_code->GetHeap()->incremental_marking()->RecordCodeTargetPatch(
4881 unoptimized_code, call_target_address, replacement_code); 4882 unoptimized_code, call_target_address, replacement_code);
4882 } 4883 }
4883 4884
4884 4885
4885 BackEdgeTable::BackEdgeState BackEdgeTable::GetBackEdgeState( 4886 BackEdgeTable::BackEdgeState BackEdgeTable::GetBackEdgeState(
4886 Isolate* isolate, 4887 Isolate* isolate,
4887 Code* unoptimized_code, 4888 Code* unoptimized_code,
4888 Address pc) { 4889 Address pc) {
4889 Address call_target_address = pc - kIntSize; 4890 Address call_target_address = pc - kIntSize;
4890 Address jns_instr_address = call_target_address - 3; 4891 Address jns_instr_address = call_target_address - 3;
4891 ASSERT_EQ(kCallInstruction, *(call_target_address - 1)); 4892 ASSERT_EQ(kCallInstruction, *(call_target_address - 1));
4892 4893
4893 if (*jns_instr_address == kJnsInstruction) { 4894 if (*jns_instr_address == kJnsInstruction) {
4894 ASSERT_EQ(kJnsOffset, *(call_target_address - 2)); 4895 ASSERT_EQ(kJnsOffset, *(call_target_address - 2));
4895 ASSERT_EQ(isolate->builtins()->InterruptCheck()->entry(), 4896 ASSERT_EQ(isolate->builtins()->InterruptCheck()->entry(),
4896 Assembler::target_address_at(call_target_address)); 4897 Assembler::target_address_at(call_target_address,
4898 unoptimized_code));
4897 return INTERRUPT; 4899 return INTERRUPT;
4898 } 4900 }
4899 4901
4900 ASSERT_EQ(kNopByteOne, *jns_instr_address); 4902 ASSERT_EQ(kNopByteOne, *jns_instr_address);
4901 ASSERT_EQ(kNopByteTwo, *(call_target_address - 2)); 4903 ASSERT_EQ(kNopByteTwo, *(call_target_address - 2));
4902 4904
4903 if (Assembler::target_address_at(call_target_address) == 4905 if (Assembler::target_address_at(call_target_address,
4906 unoptimized_code) ==
4904 isolate->builtins()->OnStackReplacement()->entry()) { 4907 isolate->builtins()->OnStackReplacement()->entry()) {
4905 return ON_STACK_REPLACEMENT; 4908 return ON_STACK_REPLACEMENT;
4906 } 4909 }
4907 4910
4908 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4911 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4909 Assembler::target_address_at(call_target_address)); 4912 Assembler::target_address_at(call_target_address,
4913 unoptimized_code));
4910 return OSR_AFTER_STACK_CHECK; 4914 return OSR_AFTER_STACK_CHECK;
4911 } 4915 }
4912 4916
4913 4917
4914 } } // namespace v8::internal 4918 } } // namespace v8::internal
4915 4919
4916 #endif // V8_TARGET_ARCH_X64 4920 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/frames-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698