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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/arm64/code-stubs-arm64.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 // 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_ARM 7 #if V8_TARGET_ARCH_ARM
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 2502 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 __ cmp(r0, Operand(1)); 2513 __ cmp(r0, Operand(1));
2514 // We expect exactly one result since we force the called regexp to behave 2514 // We expect exactly one result since we force the called regexp to behave
2515 // as non-global. 2515 // as non-global.
2516 __ b(eq, &success); 2516 __ b(eq, &success);
2517 Label failure; 2517 Label failure;
2518 __ cmp(r0, Operand(NativeRegExpMacroAssembler::FAILURE)); 2518 __ cmp(r0, Operand(NativeRegExpMacroAssembler::FAILURE));
2519 __ b(eq, &failure); 2519 __ b(eq, &failure);
2520 __ cmp(r0, Operand(NativeRegExpMacroAssembler::EXCEPTION)); 2520 __ cmp(r0, Operand(NativeRegExpMacroAssembler::EXCEPTION));
2521 // If not exception it can only be retry. Handle that in the runtime system. 2521 // If not exception it can only be retry. Handle that in the runtime system.
2522 __ b(ne, &runtime); 2522 __ b(ne, &runtime);
2523 2523 // Result must now be exception. If there is no pending exception already a
2524 // Result must now be exception. 2524 // stack overflow (on the backtrack stack) was detected in RegExp code but
2525 // haven't created the exception yet. Handle that in the runtime system.
2526 // TODO(592): Rerunning the RegExp to get the stack overflow exception.
2525 __ mov(r1, Operand(isolate()->factory()->the_hole_value())); 2527 __ mov(r1, Operand(isolate()->factory()->the_hole_value()));
2526 __ mov(r2, Operand(ExternalReference(Isolate::kPendingExceptionAddress, 2528 __ mov(r2, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
2527 isolate()))); 2529 isolate())));
2528 __ ldr(r0, MemOperand(r2, 0)); 2530 __ ldr(r0, MemOperand(r2, 0));
2531 __ cmp(r0, r1);
2532 __ b(eq, &runtime);
2533
2529 __ str(r1, MemOperand(r2, 0)); // Clear pending exception. 2534 __ str(r1, MemOperand(r2, 0)); // Clear pending exception.
2530 2535
2531 // Check if the exception is a termination. If so, throw as uncatchable. 2536 // Check if the exception is a termination. If so, throw as uncatchable.
2532 __ CompareRoot(r0, Heap::kTerminationExceptionRootIndex); 2537 __ CompareRoot(r0, Heap::kTerminationExceptionRootIndex);
2533 2538
2534 Label termination_exception; 2539 Label termination_exception;
2535 __ b(eq, &termination_exception); 2540 __ b(eq, &termination_exception);
2536 2541
2537 __ Throw(r0); 2542 __ Throw(r0);
2538 2543
(...skipping 2532 matching lines...) Expand 10 before | Expand all | Expand 10 after
5071 MemOperand(fp, 6 * kPointerSize), 5076 MemOperand(fp, 6 * kPointerSize),
5072 NULL); 5077 NULL);
5073 } 5078 }
5074 5079
5075 5080
5076 #undef __ 5081 #undef __
5077 5082
5078 } } // namespace v8::internal 5083 } } // namespace v8::internal
5079 5084
5080 #endif // V8_TARGET_ARCH_ARM 5085 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698