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

Side by Side Diff: src/ia32/full-codegen-ia32.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/ia32/frames-ia32.h ('k') | src/ic.h » ('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 4863 matching lines...) Expand 10 before | Expand all | Expand 10 after
4874 // nop 4874 // nop
4875 // nop 4875 // nop
4876 // call <on-stack replacment> 4876 // call <on-stack replacment>
4877 // ok: 4877 // ok:
4878 *jns_instr_address = kNopByteOne; 4878 *jns_instr_address = kNopByteOne;
4879 *jns_offset_address = kNopByteTwo; 4879 *jns_offset_address = kNopByteTwo;
4880 break; 4880 break;
4881 } 4881 }
4882 4882
4883 Assembler::set_target_address_at(call_target_address, 4883 Assembler::set_target_address_at(call_target_address,
4884 unoptimized_code,
4884 replacement_code->entry()); 4885 replacement_code->entry());
4885 unoptimized_code->GetHeap()->incremental_marking()->RecordCodeTargetPatch( 4886 unoptimized_code->GetHeap()->incremental_marking()->RecordCodeTargetPatch(
4886 unoptimized_code, call_target_address, replacement_code); 4887 unoptimized_code, call_target_address, replacement_code);
4887 } 4888 }
4888 4889
4889 4890
4890 BackEdgeTable::BackEdgeState BackEdgeTable::GetBackEdgeState( 4891 BackEdgeTable::BackEdgeState BackEdgeTable::GetBackEdgeState(
4891 Isolate* isolate, 4892 Isolate* isolate,
4892 Code* unoptimized_code, 4893 Code* unoptimized_code,
4893 Address pc) { 4894 Address pc) {
4894 Address call_target_address = pc - kIntSize; 4895 Address call_target_address = pc - kIntSize;
4895 Address jns_instr_address = call_target_address - 3; 4896 Address jns_instr_address = call_target_address - 3;
4896 ASSERT_EQ(kCallInstruction, *(call_target_address - 1)); 4897 ASSERT_EQ(kCallInstruction, *(call_target_address - 1));
4897 4898
4898 if (*jns_instr_address == kJnsInstruction) { 4899 if (*jns_instr_address == kJnsInstruction) {
4899 ASSERT_EQ(kJnsOffset, *(call_target_address - 2)); 4900 ASSERT_EQ(kJnsOffset, *(call_target_address - 2));
4900 ASSERT_EQ(isolate->builtins()->InterruptCheck()->entry(), 4901 ASSERT_EQ(isolate->builtins()->InterruptCheck()->entry(),
4901 Assembler::target_address_at(call_target_address)); 4902 Assembler::target_address_at(call_target_address,
4903 unoptimized_code));
4902 return INTERRUPT; 4904 return INTERRUPT;
4903 } 4905 }
4904 4906
4905 ASSERT_EQ(kNopByteOne, *jns_instr_address); 4907 ASSERT_EQ(kNopByteOne, *jns_instr_address);
4906 ASSERT_EQ(kNopByteTwo, *(call_target_address - 2)); 4908 ASSERT_EQ(kNopByteTwo, *(call_target_address - 2));
4907 4909
4908 if (Assembler::target_address_at(call_target_address) == 4910 if (Assembler::target_address_at(call_target_address, unoptimized_code) ==
4909 isolate->builtins()->OnStackReplacement()->entry()) { 4911 isolate->builtins()->OnStackReplacement()->entry()) {
4910 return ON_STACK_REPLACEMENT; 4912 return ON_STACK_REPLACEMENT;
4911 } 4913 }
4912 4914
4913 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4915 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4914 Assembler::target_address_at(call_target_address)); 4916 Assembler::target_address_at(call_target_address,
4917 unoptimized_code));
4915 return OSR_AFTER_STACK_CHECK; 4918 return OSR_AFTER_STACK_CHECK;
4916 } 4919 }
4917 4920
4918 4921
4919 } } // namespace v8::internal 4922 } } // namespace v8::internal
4920 4923
4921 #endif // V8_TARGET_ARCH_IA32 4924 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/frames-ia32.h ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698