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

Unified Diff: src/code-stubs.h

Issue 2570843002: Fix usage of literal cloning for large double arrays. (Closed)
Patch Set: Add missing flag. Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | src/code-stubs.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 41fc8eaf3e38df11d5413ad0c047275a54990d40..1e35bf406d00a9228bd0d3fa9bb7eb2d66ff3005 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -19,6 +19,7 @@ namespace v8 {
namespace internal {
// Forward declarations.
+class ArrayLiteral;
class CodeStubAssembler;
class ObjectLiteral;
namespace compiler {
@@ -923,6 +924,11 @@ class FastCloneRegExpStub final : public TurboFanCodeStub {
class FastCloneShallowArrayStub : public TurboFanCodeStub {
public:
+ // Maximum number of elements in copied array (chosen so that even an array
+ // backed by a double backing store will fit into new-space).
+ static const int kMaximumClonedElements =
+ JSArray::kInitialMaxFastElementArray * kPointerSize / kDoubleSize;
+
FastCloneShallowArrayStub(Isolate* isolate,
AllocationSiteMode allocation_site_mode)
: TurboFanCodeStub(isolate) {
@@ -936,6 +942,8 @@ class FastCloneShallowArrayStub : public TurboFanCodeStub {
compiler::CodeAssemblerLabel* call_runtime,
AllocationSiteMode allocation_site_mode);
+ static bool IsSupported(ArrayLiteral* expr);
+
AllocationSiteMode allocation_site_mode() const {
return AllocationSiteModeBits::decode(minor_key_);
}
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | src/code-stubs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698