Chromium Code Reviews

Side by Side Diff: src/arm/regexp-macro-assembler-arm.cc

Issue 14429003: Refactor ExternalReference::isolate_address() to not rely on Isolate::Current(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
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 362 matching lines...)
373 373
374 // Address of start of capture. 374 // Address of start of capture.
375 __ add(r0, r0, Operand(end_of_input_address())); 375 __ add(r0, r0, Operand(end_of_input_address()));
376 // Length of capture. 376 // Length of capture.
377 __ mov(r2, Operand(r1)); 377 __ mov(r2, Operand(r1));
378 // Save length in callee-save register for use on return. 378 // Save length in callee-save register for use on return.
379 __ mov(r4, Operand(r1)); 379 __ mov(r4, Operand(r1));
380 // Address of current input position. 380 // Address of current input position.
381 __ add(r1, current_input_offset(), Operand(end_of_input_address())); 381 __ add(r1, current_input_offset(), Operand(end_of_input_address()));
382 // Isolate. 382 // Isolate.
383 __ mov(r3, Operand(ExternalReference::isolate_address())); 383 __ mov(r3, Operand(ExternalReference::isolate_address(masm_->isolate())));
Sven Panne 2013/04/23 13:18:08 Add a Isolate* RegExpMacroAssemblerARM::isolat
384 384
385 { 385 {
386 AllowExternalCallThatCantCauseGC scope(masm_); 386 AllowExternalCallThatCantCauseGC scope(masm_);
387 ExternalReference function = 387 ExternalReference function =
388 ExternalReference::re_case_insensitive_compare_uc16(masm_->isolate()); 388 ExternalReference::re_case_insensitive_compare_uc16(masm_->isolate());
389 __ CallCFunction(function, argument_count); 389 __ CallCFunction(function, argument_count);
390 } 390 }
391 391
392 // Check if function returned non-zero for success or zero for failure. 392 // Check if function returned non-zero for success or zero for failure.
393 __ cmp(r0, Operand::Zero()); 393 __ cmp(r0, Operand::Zero());
(...skipping 492 matching lines...)
886 if (stack_overflow_label_.is_linked()) { 886 if (stack_overflow_label_.is_linked()) {
887 SafeCallTarget(&stack_overflow_label_); 887 SafeCallTarget(&stack_overflow_label_);
888 // Reached if the backtrack-stack limit has been hit. 888 // Reached if the backtrack-stack limit has been hit.
889 Label grow_failed; 889 Label grow_failed;
890 890
891 // Call GrowStack(backtrack_stackpointer(), &stack_base) 891 // Call GrowStack(backtrack_stackpointer(), &stack_base)
892 static const int num_arguments = 3; 892 static const int num_arguments = 3;
893 __ PrepareCallCFunction(num_arguments, r0); 893 __ PrepareCallCFunction(num_arguments, r0);
894 __ mov(r0, backtrack_stackpointer()); 894 __ mov(r0, backtrack_stackpointer());
895 __ add(r1, frame_pointer(), Operand(kStackHighEnd)); 895 __ add(r1, frame_pointer(), Operand(kStackHighEnd));
896 __ mov(r2, Operand(ExternalReference::isolate_address())); 896 __ mov(r2, Operand(ExternalReference::isolate_address(masm_->isolate())));
897 ExternalReference grow_stack = 897 ExternalReference grow_stack =
898 ExternalReference::re_grow_stack(masm_->isolate()); 898 ExternalReference::re_grow_stack(masm_->isolate());
899 __ CallCFunction(grow_stack, num_arguments); 899 __ CallCFunction(grow_stack, num_arguments);
900 // If return NULL, we have failed to grow the stack, and 900 // If return NULL, we have failed to grow the stack, and
901 // must exit with a stack-overflow exception. 901 // must exit with a stack-overflow exception.
902 __ cmp(r0, Operand::Zero()); 902 __ cmp(r0, Operand::Zero());
903 __ b(eq, &exit_with_exception); 903 __ b(eq, &exit_with_exception);
904 // Otherwise use return value as new stack pointer. 904 // Otherwise use return value as new stack pointer.
905 __ mov(backtrack_stackpointer(), r0); 905 __ mov(backtrack_stackpointer(), r0);
906 // Restore saved registers and continue. 906 // Restore saved registers and continue.
(...skipping 503 matching lines...)
1410 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex)); 1410 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex));
1411 } 1411 }
1412 1412
1413 #undef __ 1413 #undef __
1414 1414
1415 #endif // V8_INTERPRETED_REGEXP 1415 #endif // V8_INTERPRETED_REGEXP
1416 1416
1417 }} // namespace v8::internal 1417 }} // namespace v8::internal
1418 1418
1419 #endif // V8_TARGET_ARCH_ARM 1419 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine