OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 5254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5265 __ Push(rdx); | 5265 __ Push(rdx); |
5266 | 5266 |
5267 // Store result register while executing finally block. | 5267 // Store result register while executing finally block. |
5268 __ Push(result_register()); | 5268 __ Push(result_register()); |
5269 | 5269 |
5270 // Store pending message while executing finally block. | 5270 // Store pending message while executing finally block. |
5271 ExternalReference pending_message_obj = | 5271 ExternalReference pending_message_obj = |
5272 ExternalReference::address_of_pending_message_obj(isolate()); | 5272 ExternalReference::address_of_pending_message_obj(isolate()); |
5273 __ Load(rdx, pending_message_obj); | 5273 __ Load(rdx, pending_message_obj); |
5274 __ Push(rdx); | 5274 __ Push(rdx); |
5275 | |
5276 ExternalReference has_pending_message = | |
5277 ExternalReference::address_of_has_pending_message(isolate()); | |
5278 __ Load(rdx, has_pending_message); | |
5279 __ Integer32ToSmi(rdx, rdx); | |
5280 __ Push(rdx); | |
5281 } | 5275 } |
5282 | 5276 |
5283 | 5277 |
5284 void FullCodeGenerator::ExitFinallyBlock() { | 5278 void FullCodeGenerator::ExitFinallyBlock() { |
5285 DCHECK(!result_register().is(rdx)); | 5279 DCHECK(!result_register().is(rdx)); |
5286 DCHECK(!result_register().is(rcx)); | 5280 DCHECK(!result_register().is(rcx)); |
5287 // Restore pending message from stack. | 5281 // Restore pending message from stack. |
5288 __ Pop(rdx); | 5282 __ Pop(rdx); |
5289 __ SmiToInteger32(rdx, rdx); | |
5290 ExternalReference has_pending_message = | |
5291 ExternalReference::address_of_has_pending_message(isolate()); | |
5292 __ Store(has_pending_message, rdx); | |
5293 | |
5294 __ Pop(rdx); | |
5295 ExternalReference pending_message_obj = | 5283 ExternalReference pending_message_obj = |
5296 ExternalReference::address_of_pending_message_obj(isolate()); | 5284 ExternalReference::address_of_pending_message_obj(isolate()); |
5297 __ Store(pending_message_obj, rdx); | 5285 __ Store(pending_message_obj, rdx); |
5298 | 5286 |
5299 // Restore result register from stack. | 5287 // Restore result register from stack. |
5300 __ Pop(result_register()); | 5288 __ Pop(result_register()); |
5301 | 5289 |
5302 // Uncook return address. | 5290 // Uncook return address. |
5303 __ Pop(rdx); | 5291 __ Pop(rdx); |
5304 __ SmiToInteger32(rdx, rdx); | 5292 __ SmiToInteger32(rdx, rdx); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5412 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5400 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5413 Assembler::target_address_at(call_target_address, | 5401 Assembler::target_address_at(call_target_address, |
5414 unoptimized_code)); | 5402 unoptimized_code)); |
5415 return OSR_AFTER_STACK_CHECK; | 5403 return OSR_AFTER_STACK_CHECK; |
5416 } | 5404 } |
5417 | 5405 |
5418 | 5406 |
5419 } } // namespace v8::internal | 5407 } } // namespace v8::internal |
5420 | 5408 |
5421 #endif // V8_TARGET_ARCH_X64 | 5409 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |