OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1507 __ push(rcx); | 1507 __ push(rcx); |
1508 __ Push(Smi::FromInt(expr->literal_index())); | 1508 __ Push(Smi::FromInt(expr->literal_index())); |
1509 __ Push(expr->pattern()); | 1509 __ Push(expr->pattern()); |
1510 __ Push(expr->flags()); | 1510 __ Push(expr->flags()); |
1511 __ CallRuntime(Runtime::kMaterializeRegExpLiteral, 4); | 1511 __ CallRuntime(Runtime::kMaterializeRegExpLiteral, 4); |
1512 __ movq(rbx, rax); | 1512 __ movq(rbx, rax); |
1513 | 1513 |
1514 __ bind(&materialized); | 1514 __ bind(&materialized); |
1515 int size = JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize; | 1515 int size = JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize; |
1516 Label allocated, runtime_allocate; | 1516 Label allocated, runtime_allocate; |
1517 __ AllocateInNewSpace(size, rax, rcx, rdx, &runtime_allocate, TAG_OBJECT); | 1517 __ Allocate(size, rax, rcx, rdx, &runtime_allocate, TAG_OBJECT); |
1518 __ jmp(&allocated); | 1518 __ jmp(&allocated); |
1519 | 1519 |
1520 __ bind(&runtime_allocate); | 1520 __ bind(&runtime_allocate); |
1521 __ push(rbx); | 1521 __ push(rbx); |
1522 __ Push(Smi::FromInt(size)); | 1522 __ Push(Smi::FromInt(size)); |
1523 __ CallRuntime(Runtime::kAllocateInNewSpace, 1); | 1523 __ CallRuntime(Runtime::kAllocateInNewSpace, 1); |
1524 __ pop(rbx); | 1524 __ pop(rbx); |
1525 | 1525 |
1526 __ bind(&allocated); | 1526 __ bind(&allocated); |
1527 // Copy the content into the newly allocated memory. | 1527 // Copy the content into the newly allocated memory. |
(...skipping 3044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4572 *context_length = 0; | 4572 *context_length = 0; |
4573 return previous_; | 4573 return previous_; |
4574 } | 4574 } |
4575 | 4575 |
4576 | 4576 |
4577 #undef __ | 4577 #undef __ |
4578 | 4578 |
4579 } } // namespace v8::internal | 4579 } } // namespace v8::internal |
4580 | 4580 |
4581 #endif // V8_TARGET_ARCH_X64 | 4581 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |