OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
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 5396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5407 | 5407 |
5408 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { | 5408 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { |
5409 DCHECK(ToRegister(instr->context()).is(cp)); | 5409 DCHECK(ToRegister(instr->context()).is(cp)); |
5410 Label materialized; | 5410 Label materialized; |
5411 // Registers will be used as follows: | 5411 // Registers will be used as follows: |
5412 // t3 = literals array. | 5412 // t3 = literals array. |
5413 // a1 = regexp literal. | 5413 // a1 = regexp literal. |
5414 // a0 = regexp literal clone. | 5414 // a0 = regexp literal clone. |
5415 // a2 and t0-t2 are used as temporaries. | 5415 // a2 and t0-t2 are used as temporaries. |
5416 int literal_offset = | 5416 int literal_offset = |
5417 FixedArray::OffsetOfElementAt(instr->hydrogen()->literal_index()); | 5417 LiteralsArray::OffsetOfLiteralAt(instr->hydrogen()->literal_index()); |
5418 __ li(t3, instr->hydrogen()->literals()); | 5418 __ li(t3, instr->hydrogen()->literals()); |
5419 __ lw(a1, FieldMemOperand(t3, literal_offset)); | 5419 __ lw(a1, FieldMemOperand(t3, literal_offset)); |
5420 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 5420 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
5421 __ Branch(&materialized, ne, a1, Operand(at)); | 5421 __ Branch(&materialized, ne, a1, Operand(at)); |
5422 | 5422 |
5423 // Create regexp literal using runtime function | 5423 // Create regexp literal using runtime function |
5424 // Result will be in v0. | 5424 // Result will be in v0. |
5425 __ li(t2, Operand(Smi::FromInt(instr->hydrogen()->literal_index()))); | 5425 __ li(t2, Operand(Smi::FromInt(instr->hydrogen()->literal_index()))); |
5426 __ li(t1, Operand(instr->hydrogen()->pattern())); | 5426 __ li(t1, Operand(instr->hydrogen()->pattern())); |
5427 __ li(t0, Operand(instr->hydrogen()->flags())); | 5427 __ li(t0, Operand(instr->hydrogen()->flags())); |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5900 __ Push(at, ToRegister(instr->function())); | 5900 __ Push(at, ToRegister(instr->function())); |
5901 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5901 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5902 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5902 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5903 } | 5903 } |
5904 | 5904 |
5905 | 5905 |
5906 #undef __ | 5906 #undef __ |
5907 | 5907 |
5908 } // namespace internal | 5908 } // namespace internal |
5909 } // namespace v8 | 5909 } // namespace v8 |
OLD | NEW |