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

Side by Side Diff: src/x64/full-codegen-x64.cc

Issue 12314155: Allow direct allocation in old pointer space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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/x64/code-stubs-x64.cc ('k') | src/x64/lithium-codegen-x64.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 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
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
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
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698