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

Side by Side Diff: src/mips/regexp-macro-assembler-mips.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: addressed comments Created 7 years, 8 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/mips/regexp-macro-assembler-mips.h ('k') | src/mips/stub-cache-mips.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 // 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 381
382 // Address of start of capture. 382 // Address of start of capture.
383 __ Addu(a0, a0, Operand(end_of_input_address())); 383 __ Addu(a0, a0, Operand(end_of_input_address()));
384 // Length of capture. 384 // Length of capture.
385 __ mov(a2, a1); 385 __ mov(a2, a1);
386 // Save length in callee-save register for use on return. 386 // Save length in callee-save register for use on return.
387 __ mov(s3, a1); 387 __ mov(s3, a1);
388 // Address of current input position. 388 // Address of current input position.
389 __ Addu(a1, current_input_offset(), Operand(end_of_input_address())); 389 __ Addu(a1, current_input_offset(), Operand(end_of_input_address()));
390 // Isolate. 390 // Isolate.
391 __ li(a3, Operand(ExternalReference::isolate_address())); 391 __ li(a3, Operand(ExternalReference::isolate_address(masm_->isolate())));
392 392
393 { 393 {
394 AllowExternalCallThatCantCauseGC scope(masm_); 394 AllowExternalCallThatCantCauseGC scope(masm_);
395 ExternalReference function = 395 ExternalReference function =
396 ExternalReference::re_case_insensitive_compare_uc16(masm_->isolate()); 396 ExternalReference::re_case_insensitive_compare_uc16(masm_->isolate());
397 __ CallCFunction(function, argument_count); 397 __ CallCFunction(function, argument_count);
398 } 398 }
399 399
400 // Restore regexp engine registers. 400 // Restore regexp engine registers.
401 __ MultiPop(regexp_registers_to_retain); 401 __ MultiPop(regexp_registers_to_retain);
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 // Put regexp engine registers on stack first. 894 // Put regexp engine registers on stack first.
895 RegList regexp_registers = current_input_offset().bit() | 895 RegList regexp_registers = current_input_offset().bit() |
896 current_character().bit(); 896 current_character().bit();
897 __ MultiPush(regexp_registers); 897 __ MultiPush(regexp_registers);
898 Label grow_failed; 898 Label grow_failed;
899 // Call GrowStack(backtrack_stackpointer(), &stack_base) 899 // Call GrowStack(backtrack_stackpointer(), &stack_base)
900 static const int num_arguments = 3; 900 static const int num_arguments = 3;
901 __ PrepareCallCFunction(num_arguments, a0); 901 __ PrepareCallCFunction(num_arguments, a0);
902 __ mov(a0, backtrack_stackpointer()); 902 __ mov(a0, backtrack_stackpointer());
903 __ Addu(a1, frame_pointer(), Operand(kStackHighEnd)); 903 __ Addu(a1, frame_pointer(), Operand(kStackHighEnd));
904 __ li(a2, Operand(ExternalReference::isolate_address())); 904 __ li(a2, Operand(ExternalReference::isolate_address(masm_->isolate())));
905 ExternalReference grow_stack = 905 ExternalReference grow_stack =
906 ExternalReference::re_grow_stack(masm_->isolate()); 906 ExternalReference::re_grow_stack(masm_->isolate());
907 __ CallCFunction(grow_stack, num_arguments); 907 __ CallCFunction(grow_stack, num_arguments);
908 // Restore regexp registers. 908 // Restore regexp registers.
909 __ MultiPop(regexp_registers); 909 __ MultiPop(regexp_registers);
910 // If return NULL, we have failed to grow the stack, and 910 // If return NULL, we have failed to grow the stack, and
911 // must exit with a stack-overflow exception. 911 // must exit with a stack-overflow exception.
912 __ Branch(&exit_with_exception, eq, v0, Operand(zero_reg)); 912 __ Branch(&exit_with_exception, eq, v0, Operand(zero_reg));
913 // Otherwise use return value as new stack pointer. 913 // Otherwise use return value as new stack pointer.
914 __ mov(backtrack_stackpointer(), v0); 914 __ mov(backtrack_stackpointer(), v0);
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 } 1380 }
1381 1381
1382 1382
1383 #undef __ 1383 #undef __
1384 1384
1385 #endif // V8_INTERPRETED_REGEXP 1385 #endif // V8_INTERPRETED_REGEXP
1386 1386
1387 }} // namespace v8::internal 1387 }} // namespace v8::internal
1388 1388
1389 #endif // V8_TARGET_ARCH_MIPS 1389 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/regexp-macro-assembler-mips.h ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698