| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 * int start_offset, | 71 * int start_offset, |
| 72 * int end_offset, | 72 * int end_offset, |
| 73 * int* capture_output_array) | 73 * int* capture_output_array) |
| 74 */ | 74 */ |
| 75 | 75 |
| 76 #define __ masm_-> | 76 #define __ masm_-> |
| 77 | 77 |
| 78 RegExpMacroAssemblerIA32::RegExpMacroAssemblerIA32( | 78 RegExpMacroAssemblerIA32::RegExpMacroAssemblerIA32( |
| 79 Mode mode, | 79 Mode mode, |
| 80 int registers_to_save) | 80 int registers_to_save) |
| 81 : masm_(new MacroAssembler(NULL, kRegExpCodeSize)), | 81 : masm_(new MacroAssembler(NULL, kRegExpCodeSize)), |
| 82 constants_(kRegExpConstantsSize), | 82 constants_(kRegExpConstantsSize), |
| 83 mode_(mode), | 83 mode_(mode), |
| 84 num_registers_(registers_to_save), | 84 num_registers_(registers_to_save), |
| 85 num_saved_registers_(registers_to_save), | 85 num_saved_registers_(registers_to_save), |
| 86 entry_label_(), | 86 entry_label_(), |
| 87 start_label_(), | 87 start_label_(), |
| 88 success_label_(), | 88 success_label_(), |
| 89 exit_label_(), | 89 exit_label_(), |
| 90 self_(Heap::undefined_value()) { | 90 self_(Heap::undefined_value()) { |
| 91 __ jmp(&entry_label_); // We'll write the entry code later. | 91 __ jmp(&entry_label_); // We'll write the entry code later. |
| 92 __ bind(&start_label_); // And then continue from here. | 92 __ bind(&start_label_); // And then continue from here. |
| 93 } | 93 } |
| 94 | 94 |
| 95 | 95 |
| 96 RegExpMacroAssemblerIA32::~RegExpMacroAssemblerIA32() { | 96 RegExpMacroAssemblerIA32::~RegExpMacroAssemblerIA32() { |
| 97 delete masm_; | 97 delete masm_; |
| 98 // Unuse labels in case we throw away the assembler without calling GetCode. | 98 // Unuse labels in case we throw away the assembler without calling GetCode. |
| 99 entry_label_.Unuse(); | 99 entry_label_.Unuse(); |
| 100 start_label_.Unuse(); | 100 start_label_.Unuse(); |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 | 623 |
| 624 | 624 |
| 625 void RegExpMacroAssemblerIA32::LoadConstantBufferAddress(Register reg, | 625 void RegExpMacroAssemblerIA32::LoadConstantBufferAddress(Register reg, |
| 626 ArraySlice* buffer) { | 626 ArraySlice* buffer) { |
| 627 __ mov(reg, buffer->array()); | 627 __ mov(reg, buffer->array()); |
| 628 __ add(Operand(reg), Immediate(buffer->base_offset())); | 628 __ add(Operand(reg), Immediate(buffer->base_offset())); |
| 629 } | 629 } |
| 630 | 630 |
| 631 #undef __ | 631 #undef __ |
| 632 }} | 632 }} |
| OLD | NEW |