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

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

Issue 369063005: Revert "Remove unnecessary check in RegExpExecStub." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2837 matching lines...) Expand 10 before | Expand all | Expand 10 after
2848 2848
2849 // Return last match info. 2849 // Return last match info.
2850 __ Peek(x0, kLastMatchInfoOffset); 2850 __ Peek(x0, kLastMatchInfoOffset);
2851 __ PopCPURegList(used_callee_saved_registers); 2851 __ PopCPURegList(used_callee_saved_registers);
2852 // Drop the 4 arguments of the stub from the stack. 2852 // Drop the 4 arguments of the stub from the stack.
2853 __ Drop(4); 2853 __ Drop(4);
2854 __ Ret(); 2854 __ Ret();
2855 2855
2856 __ Bind(&exception); 2856 __ Bind(&exception);
2857 Register exception_value = x0; 2857 Register exception_value = x0;
2858 // Result must now be exception. 2858 // A stack overflow (on the backtrack stack) may have occured
2859 // in the RegExp code but no exception has been created yet.
2860 // If there is no pending exception, handle that in the runtime system.
2859 __ Mov(x10, Operand(isolate()->factory()->the_hole_value())); 2861 __ Mov(x10, Operand(isolate()->factory()->the_hole_value()));
2860 __ Mov(x11, 2862 __ Mov(x11,
2861 Operand(ExternalReference(Isolate::kPendingExceptionAddress, 2863 Operand(ExternalReference(Isolate::kPendingExceptionAddress,
2862 isolate()))); 2864 isolate())));
2863 __ Ldr(exception_value, MemOperand(x11)); 2865 __ Ldr(exception_value, MemOperand(x11));
2866 __ Cmp(x10, exception_value);
2867 __ B(eq, &runtime);
2868
2864 __ Str(x10, MemOperand(x11)); // Clear pending exception. 2869 __ Str(x10, MemOperand(x11)); // Clear pending exception.
2865 2870
2866 // Check if the exception is a termination. If so, throw as uncatchable. 2871 // Check if the exception is a termination. If so, throw as uncatchable.
2867 Label termination_exception; 2872 Label termination_exception;
2868 __ JumpIfRoot(exception_value, 2873 __ JumpIfRoot(exception_value,
2869 Heap::kTerminationExceptionRootIndex, 2874 Heap::kTerminationExceptionRootIndex,
2870 &termination_exception); 2875 &termination_exception);
2871 2876
2872 __ Throw(exception_value, x10, x11, x12, x13); 2877 __ Throw(exception_value, x10, x11, x12, x13);
2873 2878
(...skipping 2549 matching lines...) Expand 10 before | Expand all | Expand 10 after
5423 MemOperand(fp, 6 * kPointerSize), 5428 MemOperand(fp, 6 * kPointerSize),
5424 NULL); 5429 NULL);
5425 } 5430 }
5426 5431
5427 5432
5428 #undef __ 5433 #undef __
5429 5434
5430 } } // namespace v8::internal 5435 } } // namespace v8::internal
5431 5436
5432 #endif // V8_TARGET_ARCH_ARM64 5437 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698