diff options
author | Ali Ijaz Sheikh <ofrobots@google.com> | 2015-07-24 07:49:12 -0700 |
---|---|---|
committer | Ali Ijaz Sheikh <ofrobots@google.com> | 2015-07-24 10:31:18 -0700 |
commit | 0a7bf81d2f073ec4e78b6b8d3af86df36300f6b1 (patch) | |
tree | 386b5e5d37cdabe848869bc74c6314056d7c2993 /deps/v8/src/ast.h | |
parent | bf2cd225a84a686d94549ee00100772d02f17551 (diff) | |
download | node-new-0a7bf81d2f073ec4e78b6b8d3af86df36300f6b1.tar.gz |
deps: update V8 to 4.2.77.21
Picks up the latest patch-release on the V8 4.2 branch.
https://codereview.chromium.org/1156323004
PR-URL: https://github.com/nodejs/io.js/issues/2238
Fixes: https://github.com/nodejs/io.js/issues/2235
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/v8/src/ast.h')
-rw-r--r-- | deps/v8/src/ast.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/deps/v8/src/ast.h b/deps/v8/src/ast.h index faccb90457..39bef91414 100644 --- a/deps/v8/src/ast.h +++ b/deps/v8/src/ast.h @@ -1457,10 +1457,12 @@ class ObjectLiteral FINAL : public MaterializedLiteral { Handle<FixedArray> constant_properties() const { return constant_properties_; } + int properties_count() const { return constant_properties_->length() / 2; } ZoneList<Property*>* properties() const { return properties_; } bool fast_elements() const { return fast_elements_; } bool may_store_doubles() const { return may_store_doubles_; } bool has_function() const { return has_function_; } + bool has_elements() const { return has_elements_; } // Decide if a property should be in the object boilerplate. static bool IsBoilerplateProperty(Property* property); @@ -1474,16 +1476,20 @@ class ObjectLiteral FINAL : public MaterializedLiteral { void CalculateEmitStore(Zone* zone); // Assemble bitfield of flags for the CreateObjectLiteral helper. - int ComputeFlags() const { + int ComputeFlags(bool disable_mementos = false) const { int flags = fast_elements() ? kFastElements : kNoFlags; flags |= has_function() ? kHasFunction : kNoFlags; + if (disable_mementos) { + flags |= kDisableMementos; + } return flags; } enum Flags { kNoFlags = 0, kFastElements = 1, - kHasFunction = 1 << 1 + kHasFunction = 1 << 1, + kDisableMementos = 1 << 2 }; struct Accessors: public ZoneObject { @@ -1508,6 +1514,7 @@ class ObjectLiteral FINAL : public MaterializedLiteral { properties_(properties), boilerplate_properties_(boilerplate_properties), fast_elements_(false), + has_elements_(false), may_store_doubles_(false), has_function_(has_function) {} static int parent_num_ids() { return MaterializedLiteral::num_ids(); } @@ -1518,6 +1525,7 @@ class ObjectLiteral FINAL : public MaterializedLiteral { ZoneList<Property*>* properties_; int boilerplate_properties_; bool fast_elements_; + bool has_elements_; bool may_store_doubles_; bool has_function_; }; @@ -1553,6 +1561,12 @@ class ArrayLiteral FINAL : public MaterializedLiteral { DECLARE_NODE_TYPE(ArrayLiteral) Handle<FixedArray> constant_elements() const { return constant_elements_; } + ElementsKind constant_elements_kind() const { + DCHECK_EQ(2, constant_elements_->length()); + return static_cast<ElementsKind>( + Smi::cast(constant_elements_->get(0))->value()); + } + ZoneList<Expression*>* values() const { return values_; } BailoutId CreateLiteralId() const { return BailoutId(local_id(0)); } @@ -1568,9 +1582,11 @@ class ArrayLiteral FINAL : public MaterializedLiteral { void BuildConstantElements(Isolate* isolate); // Assemble bitfield of flags for the CreateArrayLiteral helper. - int ComputeFlags() const { + int ComputeFlags(bool disable_mementos = false) const { int flags = depth() == 1 ? kShallowElements : kNoFlags; - flags |= ArrayLiteral::kDisableMementos; + if (disable_mementos) { + flags |= kDisableMementos; + } return flags; } |