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

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

Issue 8139027: Version 3.6.5 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
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 | « src/arm/macro-assembler-arm.cc ('k') | src/arm/simulator-arm.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 __ add(r0, r0, Operand(end_of_input_address())); 364 __ add(r0, r0, Operand(end_of_input_address()));
365 // Length of capture. 365 // Length of capture.
366 __ mov(r2, Operand(r1)); 366 __ mov(r2, Operand(r1));
367 // Save length in callee-save register for use on return. 367 // Save length in callee-save register for use on return.
368 __ mov(r4, Operand(r1)); 368 __ mov(r4, Operand(r1));
369 // Address of current input position. 369 // Address of current input position.
370 __ add(r1, current_input_offset(), Operand(end_of_input_address())); 370 __ add(r1, current_input_offset(), Operand(end_of_input_address()));
371 // Isolate. 371 // Isolate.
372 __ mov(r3, Operand(ExternalReference::isolate_address())); 372 __ mov(r3, Operand(ExternalReference::isolate_address()));
373 373
374 ExternalReference function = 374 {
375 ExternalReference::re_case_insensitive_compare_uc16(masm_->isolate()); 375 AllowExternalCallThatCantCauseGC scope(masm_);
376 __ CallCFunction(function, argument_count); 376 ExternalReference function =
377 ExternalReference::re_case_insensitive_compare_uc16(masm_->isolate());
378 __ CallCFunction(function, argument_count);
379 }
377 380
378 // Check if function returned non-zero for success or zero for failure. 381 // Check if function returned non-zero for success or zero for failure.
379 __ cmp(r0, Operand(0, RelocInfo::NONE)); 382 __ cmp(r0, Operand(0, RelocInfo::NONE));
380 BranchOrBacktrack(eq, on_no_match); 383 BranchOrBacktrack(eq, on_no_match);
381 // On success, increment position by length of capture. 384 // On success, increment position by length of capture.
382 __ add(current_input_offset(), current_input_offset(), Operand(r4)); 385 __ add(current_input_offset(), current_input_offset(), Operand(r4));
383 } 386 }
384 387
385 __ bind(&fallthrough); 388 __ bind(&fallthrough);
386 } 389 }
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 __ jmp(&exit_label_); 607 __ jmp(&exit_label_);
605 } 608 }
606 609
607 610
608 Handle<HeapObject> RegExpMacroAssemblerARM::GetCode(Handle<String> source) { 611 Handle<HeapObject> RegExpMacroAssemblerARM::GetCode(Handle<String> source) {
609 // Finalize code - write the entry point code now we know how many 612 // Finalize code - write the entry point code now we know how many
610 // registers we need. 613 // registers we need.
611 614
612 // Entry code: 615 // Entry code:
613 __ bind(&entry_label_); 616 __ bind(&entry_label_);
617
618 // Tell the system that we have a stack frame. Because the type is MANUAL, no
619 // is generated.
620 FrameScope scope(masm_, StackFrame::MANUAL);
621
622 // Actually emit code to start a new stack frame.
614 // Push arguments 623 // Push arguments
615 // Save callee-save registers. 624 // Save callee-save registers.
616 // Start new stack frame. 625 // Start new stack frame.
617 // Store link register in existing stack-cell. 626 // Store link register in existing stack-cell.
618 // Order here should correspond to order of offset constants in header file. 627 // Order here should correspond to order of offset constants in header file.
619 RegList registers_to_retain = r4.bit() | r5.bit() | r6.bit() | 628 RegList registers_to_retain = r4.bit() | r5.bit() | r6.bit() |
620 r7.bit() | r8.bit() | r9.bit() | r10.bit() | fp.bit(); 629 r7.bit() | r8.bit() | r9.bit() | r10.bit() | fp.bit();
621 RegList argument_registers = r0.bit() | r1.bit() | r2.bit() | r3.bit(); 630 RegList argument_registers = r0.bit() | r1.bit() | r2.bit() | r3.bit();
622 __ stm(db_w, sp, argument_registers | registers_to_retain | lr.bit()); 631 __ stm(db_w, sp, argument_registers | registers_to_retain | lr.bit());
623 // Set frame pointer in space for it if this is not a direct call 632 // Set frame pointer in space for it if this is not a direct call
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex)); 1299 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex));
1291 } 1300 }
1292 1301
1293 #undef __ 1302 #undef __
1294 1303
1295 #endif // V8_INTERPRETED_REGEXP 1304 #endif // V8_INTERPRETED_REGEXP
1296 1305
1297 }} // namespace v8::internal 1306 }} // namespace v8::internal
1298 1307
1299 #endif // V8_TARGET_ARCH_ARM 1308 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm/simulator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698