| OLD | NEW |
| 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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 } | 655 } |
| 656 | 656 |
| 657 | 657 |
| 658 void RegExpMacroAssemblerIA32::Fail() { | 658 void RegExpMacroAssemblerIA32::Fail() { |
| 659 ASSERT(FAILURE == 0); // Return value for failure is zero. | 659 ASSERT(FAILURE == 0); // Return value for failure is zero. |
| 660 __ Set(eax, Immediate(0)); | 660 __ Set(eax, Immediate(0)); |
| 661 __ jmp(&exit_label_); | 661 __ jmp(&exit_label_); |
| 662 } | 662 } |
| 663 | 663 |
| 664 | 664 |
| 665 Handle<Object> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) { | 665 Handle<HeapObject> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) { |
| 666 // Finalize code - write the entry point code now we know how many | 666 // Finalize code - write the entry point code now we know how many |
| 667 // registers we need. | 667 // registers we need. |
| 668 | 668 |
| 669 // Entry code: | 669 // Entry code: |
| 670 __ bind(&entry_label_); | 670 __ bind(&entry_label_); |
| 671 // Start new stack frame. | 671 // Start new stack frame. |
| 672 __ push(ebp); | 672 __ push(ebp); |
| 673 __ mov(ebp, esp); | 673 __ mov(ebp, esp); |
| 674 // Save callee-save registers. Order here should correspond to order of | 674 // Save callee-save registers. Order here should correspond to order of |
| 675 // kBackup_ebx etc. | 675 // kBackup_ebx etc. |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 __ jmp(&exit_label_); | 872 __ jmp(&exit_label_); |
| 873 } | 873 } |
| 874 | 874 |
| 875 CodeDesc code_desc; | 875 CodeDesc code_desc; |
| 876 masm_->GetCode(&code_desc); | 876 masm_->GetCode(&code_desc); |
| 877 Handle<Code> code = | 877 Handle<Code> code = |
| 878 masm_->isolate()->factory()->NewCode(code_desc, | 878 masm_->isolate()->factory()->NewCode(code_desc, |
| 879 Code::ComputeFlags(Code::REGEXP), | 879 Code::ComputeFlags(Code::REGEXP), |
| 880 masm_->CodeObject()); | 880 masm_->CodeObject()); |
| 881 PROFILE(masm_->isolate(), RegExpCodeCreateEvent(*code, *source)); | 881 PROFILE(masm_->isolate(), RegExpCodeCreateEvent(*code, *source)); |
| 882 return Handle<Object>::cast(code); | 882 return Handle<HeapObject>::cast(code); |
| 883 } | 883 } |
| 884 | 884 |
| 885 | 885 |
| 886 void RegExpMacroAssemblerIA32::GoTo(Label* to) { | 886 void RegExpMacroAssemblerIA32::GoTo(Label* to) { |
| 887 BranchOrBacktrack(no_condition, to); | 887 BranchOrBacktrack(no_condition, to); |
| 888 } | 888 } |
| 889 | 889 |
| 890 | 890 |
| 891 void RegExpMacroAssemblerIA32::IfRegisterGE(int reg, | 891 void RegExpMacroAssemblerIA32::IfRegisterGE(int reg, |
| 892 int comparand, | 892 int comparand, |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1255 } | 1255 } |
| 1256 | 1256 |
| 1257 | 1257 |
| 1258 #undef __ | 1258 #undef __ |
| 1259 | 1259 |
| 1260 #endif // V8_INTERPRETED_REGEXP | 1260 #endif // V8_INTERPRETED_REGEXP |
| 1261 | 1261 |
| 1262 }} // namespace v8::internal | 1262 }} // namespace v8::internal |
| 1263 | 1263 |
| 1264 #endif // V8_TARGET_ARCH_IA32 | 1264 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |