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

Side by Side Diff: src/x64/deoptimizer-x64.cc

Issue 23480013: Turn interrupt and stack check into builtins. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix mips Created 7 years, 3 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/code-stubs-x64.cc ('k') | src/x64/full-codegen-x64.cc » ('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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 ASSERT_EQ(kCallInstruction, *(call_target_address - 1)); 144 ASSERT_EQ(kCallInstruction, *(call_target_address - 1));
145 if (*(call_target_address - 3) == kNopByteOne) { 145 if (*(call_target_address - 3) == kNopByteOne) {
146 ASSERT_EQ(kNopByteTwo, *(call_target_address - 2)); 146 ASSERT_EQ(kNopByteTwo, *(call_target_address - 2));
147 Code* osr_builtin = 147 Code* osr_builtin =
148 isolate->builtins()->builtin(Builtins::kOnStackReplacement); 148 isolate->builtins()->builtin(Builtins::kOnStackReplacement);
149 ASSERT_EQ(osr_builtin->entry(), 149 ASSERT_EQ(osr_builtin->entry(),
150 Assembler::target_address_at(call_target_address)); 150 Assembler::target_address_at(call_target_address));
151 return PATCHED_FOR_OSR; 151 return PATCHED_FOR_OSR;
152 } else { 152 } else {
153 // Get the interrupt stub code object to match against from cache. 153 // Get the interrupt stub code object to match against from cache.
154 Code* interrupt_code = NULL; 154 Code* interrupt_builtin =
155 InterruptStub stub; 155 isolate->builtins()->builtin(Builtins::kInterruptCheck);
156 if (!stub.FindCodeInCache(&interrupt_code, isolate)) UNREACHABLE(); 156 ASSERT_EQ(interrupt_builtin->entry(),
157 ASSERT_EQ(interrupt_code->entry(),
158 Assembler::target_address_at(call_target_address)); 157 Assembler::target_address_at(call_target_address));
159 ASSERT_EQ(kJnsInstruction, *(call_target_address - 3)); 158 ASSERT_EQ(kJnsInstruction, *(call_target_address - 3));
160 ASSERT_EQ(kJnsOffset, *(call_target_address - 2)); 159 ASSERT_EQ(kJnsOffset, *(call_target_address - 2));
161 return NOT_PATCHED; 160 return NOT_PATCHED;
162 } 161 }
163 } 162 }
164 #endif // DEBUG 163 #endif // DEBUG
165 164
166 165
167 static int LookupBailoutId(DeoptimizationInputData* data, BailoutId ast_id) { 166 static int LookupBailoutId(DeoptimizationInputData* data, BailoutId ast_id) {
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 SetFrameSlot(offset, value); 582 SetFrameSlot(offset, value);
584 } 583 }
585 584
586 585
587 #undef __ 586 #undef __
588 587
589 588
590 } } // namespace v8::internal 589 } } // namespace v8::internal
591 590
592 #endif // V8_TARGET_ARCH_X64 591 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698