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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 8114032: Clean list of external references from internal objects like the hole value. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 2 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 | « no previous file | src/arm/macro-assembler-arm.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3522 matching lines...) Expand 10 before | Expand all | Expand 10 after
3533 STATIC_ASSERT(Failure::RETRY_AFTER_GC == 0); 3533 STATIC_ASSERT(Failure::RETRY_AFTER_GC == 0);
3534 __ tst(r0, Operand(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize)); 3534 __ tst(r0, Operand(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize));
3535 __ b(eq, &retry); 3535 __ b(eq, &retry);
3536 3536
3537 // Special handling of out of memory exceptions. 3537 // Special handling of out of memory exceptions.
3538 Failure* out_of_memory = Failure::OutOfMemoryException(); 3538 Failure* out_of_memory = Failure::OutOfMemoryException();
3539 __ cmp(r0, Operand(reinterpret_cast<int32_t>(out_of_memory))); 3539 __ cmp(r0, Operand(reinterpret_cast<int32_t>(out_of_memory)));
3540 __ b(eq, throw_out_of_memory_exception); 3540 __ b(eq, throw_out_of_memory_exception);
3541 3541
3542 // Retrieve the pending exception and clear the variable. 3542 // Retrieve the pending exception and clear the variable.
3543 __ mov(ip, Operand(ExternalReference::the_hole_value_location(isolate))); 3543 __ mov(r3, Operand(isolate->factory()->the_hole_value()));
3544 __ ldr(r3, MemOperand(ip));
3545 __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress, 3544 __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
3546 isolate))); 3545 isolate)));
3547 __ ldr(r0, MemOperand(ip)); 3546 __ ldr(r0, MemOperand(ip));
3548 __ str(r3, MemOperand(ip)); 3547 __ str(r3, MemOperand(ip));
3549 3548
3550 // Special handling of termination exceptions which are uncatchable 3549 // Special handling of termination exceptions which are uncatchable
3551 // by javascript code. 3550 // by javascript code.
3552 __ cmp(r0, Operand(isolate->factory()->termination_exception())); 3551 __ cmp(r0, Operand(isolate->factory()->termination_exception()));
3553 __ b(eq, throw_termination_exception); 3552 __ b(eq, throw_termination_exception);
3554 3553
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
3717 // Invoke: Link this frame into the handler chain. 3716 // Invoke: Link this frame into the handler chain.
3718 __ bind(&invoke); 3717 __ bind(&invoke);
3719 // Must preserve r0-r4, r5-r7 are available. 3718 // Must preserve r0-r4, r5-r7 are available.
3720 __ PushTryHandler(IN_JS_ENTRY, JS_ENTRY_HANDLER); 3719 __ PushTryHandler(IN_JS_ENTRY, JS_ENTRY_HANDLER);
3721 // If an exception not caught by another handler occurs, this handler 3720 // If an exception not caught by another handler occurs, this handler
3722 // returns control to the code after the bl(&invoke) above, which 3721 // returns control to the code after the bl(&invoke) above, which
3723 // restores all kCalleeSaved registers (including cp and fp) to their 3722 // restores all kCalleeSaved registers (including cp and fp) to their
3724 // saved values before returning a failure to C. 3723 // saved values before returning a failure to C.
3725 3724
3726 // Clear any pending exceptions. 3725 // Clear any pending exceptions.
3727 __ mov(ip, Operand(ExternalReference::the_hole_value_location(isolate))); 3726 __ mov(r5, Operand(isolate->factory()->the_hole_value()));
3728 __ ldr(r5, MemOperand(ip));
3729 __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress, 3727 __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
3730 isolate))); 3728 isolate)));
3731 __ str(r5, MemOperand(ip)); 3729 __ str(r5, MemOperand(ip));
3732 3730
3733 // Invoke the function by calling through JS entry trampoline builtin. 3731 // Invoke the function by calling through JS entry trampoline builtin.
3734 // Notice that we cannot store a reference to the trampoline code directly in 3732 // Notice that we cannot store a reference to the trampoline code directly in
3735 // this stub, because runtime stubs are not traversed when doing GC. 3733 // this stub, because runtime stubs are not traversed when doing GC.
3736 3734
3737 // Expected registers by Builtins::JSEntryTrampoline 3735 // Expected registers by Builtins::JSEntryTrampoline
3738 // r0: code entry 3736 // r0: code entry
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
4636 Label failure; 4634 Label failure;
4637 __ cmp(r0, Operand(NativeRegExpMacroAssembler::FAILURE)); 4635 __ cmp(r0, Operand(NativeRegExpMacroAssembler::FAILURE));
4638 __ b(eq, &failure); 4636 __ b(eq, &failure);
4639 __ cmp(r0, Operand(NativeRegExpMacroAssembler::EXCEPTION)); 4637 __ cmp(r0, Operand(NativeRegExpMacroAssembler::EXCEPTION));
4640 // If not exception it can only be retry. Handle that in the runtime system. 4638 // If not exception it can only be retry. Handle that in the runtime system.
4641 __ b(ne, &runtime); 4639 __ b(ne, &runtime);
4642 // Result must now be exception. If there is no pending exception already a 4640 // Result must now be exception. If there is no pending exception already a
4643 // stack overflow (on the backtrack stack) was detected in RegExp code but 4641 // stack overflow (on the backtrack stack) was detected in RegExp code but
4644 // haven't created the exception yet. Handle that in the runtime system. 4642 // haven't created the exception yet. Handle that in the runtime system.
4645 // TODO(592): Rerunning the RegExp to get the stack overflow exception. 4643 // TODO(592): Rerunning the RegExp to get the stack overflow exception.
4646 __ mov(r1, Operand(ExternalReference::the_hole_value_location(isolate))); 4644 __ mov(r1, Operand(isolate->factory()->the_hole_value()));
4647 __ ldr(r1, MemOperand(r1, 0));
4648 __ mov(r2, Operand(ExternalReference(Isolate::kPendingExceptionAddress, 4645 __ mov(r2, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
4649 isolate))); 4646 isolate)));
4650 __ ldr(r0, MemOperand(r2, 0)); 4647 __ ldr(r0, MemOperand(r2, 0));
4651 __ cmp(r0, r1); 4648 __ cmp(r0, r1);
4652 __ b(eq, &runtime); 4649 __ b(eq, &runtime);
4653 4650
4654 __ str(r1, MemOperand(r2, 0)); // Clear pending exception. 4651 __ str(r1, MemOperand(r2, 0)); // Clear pending exception.
4655 4652
4656 // Check if the exception is a termination. If so, throw as uncatchable. 4653 // Check if the exception is a termination. If so, throw as uncatchable.
4657 __ CompareRoot(r0, Heap::kTerminationExceptionRootIndex); 4654 __ CompareRoot(r0, Heap::kTerminationExceptionRootIndex);
(...skipping 2442 matching lines...) Expand 10 before | Expand all | Expand 10 after
7100 7097
7101 // Fall through when we need to inform the incremental marker. 7098 // Fall through when we need to inform the incremental marker.
7102 } 7099 }
7103 7100
7104 7101
7105 #undef __ 7102 #undef __
7106 7103
7107 } } // namespace v8::internal 7104 } } // namespace v8::internal
7108 7105
7109 #endif // V8_TARGET_ARCH_ARM 7106 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698