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

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

Issue 7891042: Add asserts to ensure that we: (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 3 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/ia32/macro-assembler-ia32.cc ('k') | src/ia32/stub-cache-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 2008-2009 the V8 project authors. All rights reserved. 1 // Copyright 2008-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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 // Set byte_offset2. 389 // Set byte_offset2.
390 // Found by adding negative string-end offset of current position (edi) 390 // Found by adding negative string-end offset of current position (edi)
391 // to end of string. 391 // to end of string.
392 __ add(edi, Operand(esi)); 392 __ add(edi, Operand(esi));
393 __ mov(Operand(esp, 1 * kPointerSize), edi); 393 __ mov(Operand(esp, 1 * kPointerSize), edi);
394 // Set byte_offset1. 394 // Set byte_offset1.
395 // Start of capture, where edx already holds string-end negative offset. 395 // Start of capture, where edx already holds string-end negative offset.
396 __ add(edx, Operand(esi)); 396 __ add(edx, Operand(esi));
397 __ mov(Operand(esp, 0 * kPointerSize), edx); 397 __ mov(Operand(esp, 0 * kPointerSize), edx);
398 398
399 ExternalReference compare = 399 {
400 ExternalReference::re_case_insensitive_compare_uc16(masm_->isolate()); 400 AllowExternalCallThatCantCauseGC scope(masm_);
401 __ CallCFunction(compare, argument_count); 401 ExternalReference compare =
402 ExternalReference::re_case_insensitive_compare_uc16(masm_->isolate());
403 __ CallCFunction(compare, argument_count);
404 }
402 // Pop original values before reacting on result value. 405 // Pop original values before reacting on result value.
403 __ pop(ebx); 406 __ pop(ebx);
404 __ pop(backtrack_stackpointer()); 407 __ pop(backtrack_stackpointer());
405 __ pop(edi); 408 __ pop(edi);
406 __ pop(esi); 409 __ pop(esi);
407 410
408 // Check if function returned non-zero for success or zero for failure. 411 // Check if function returned non-zero for success or zero for failure.
409 __ or_(eax, Operand(eax)); 412 __ or_(eax, Operand(eax));
410 BranchOrBacktrack(zero, on_no_match); 413 BranchOrBacktrack(zero, on_no_match);
411 // On success, increment position by length of capture. 414 // On success, increment position by length of capture.
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 __ jmp(&exit_label_); 664 __ jmp(&exit_label_);
662 } 665 }
663 666
664 667
665 Handle<HeapObject> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) { 668 Handle<HeapObject> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) {
666 // Finalize code - write the entry point code now we know how many 669 // Finalize code - write the entry point code now we know how many
667 // registers we need. 670 // registers we need.
668 671
669 // Entry code: 672 // Entry code:
670 __ bind(&entry_label_); 673 __ bind(&entry_label_);
671 // Start new stack frame. 674
675 // Tell the system that we have a stack frame. Because the type is MANUAL, no
676 // code is generated.
677 FrameScope scope(masm_, StackFrame::MANUAL);
678
679 // Actually emit code to start a new stack frame.
672 __ push(ebp); 680 __ push(ebp);
673 __ mov(ebp, esp); 681 __ mov(ebp, esp);
674 // Save callee-save registers. Order here should correspond to order of 682 // Save callee-save registers. Order here should correspond to order of
675 // kBackup_ebx etc. 683 // kBackup_ebx etc.
676 __ push(esi); 684 __ push(esi);
677 __ push(edi); 685 __ push(edi);
678 __ push(ebx); // Callee-save on MacOS. 686 __ push(ebx); // Callee-save on MacOS.
679 __ push(Immediate(0)); // Make room for "input start - 1" constant. 687 __ push(Immediate(0)); // Make room for "input start - 1" constant.
680 688
681 // Check if we have space on the stack for registers. 689 // Check if we have space on the stack for registers.
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 } 1276 }
1269 1277
1270 1278
1271 #undef __ 1279 #undef __
1272 1280
1273 #endif // V8_INTERPRETED_REGEXP 1281 #endif // V8_INTERPRETED_REGEXP
1274 1282
1275 }} // namespace v8::internal 1283 }} // namespace v8::internal
1276 1284
1277 #endif // V8_TARGET_ARCH_IA32 1285 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698