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

Unified Diff: src/code-stubs.h

Issue 2570843002: Fix usage of literal cloning for large double arrays. (Closed)
Patch Set: Addressed comments. 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 | « src/ast/ast.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
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..0c3471fd30a3f3ad3ab91e12b9d80e331670dae5 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -20,7 +20,6 @@ namespace internal {
// Forward declarations.
class CodeStubAssembler;
-class ObjectLiteral;
namespace compiler {
class CodeAssemblerLabel;
class CodeAssemblerState;
@@ -923,6 +922,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) {
@@ -964,7 +968,6 @@ class FastCloneShallowObjectStub : public TurboFanCodeStub {
compiler::Node* closure, compiler::Node* literals_index,
compiler::Node* properties_count);
- static bool IsSupported(ObjectLiteral* expr);
static int PropertiesCount(int literal_length);
int length() const { return LengthBits::decode(minor_key_); }
« no previous file with comments | « src/ast/ast.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698