Revert "Revert "Upgrade to 5.0.71.48"" DO NOT MERGE
This reverts commit f2e3994fa5148cc3d9946666f0b0596290192b0e,
and updates the x64 makefile properly so it doesn't break that
build.
FPIIM-449
Change-Id: Ib83e35bfbae6af627451c926a9650ec57c045605
(cherry picked from commit 109988c7ccb6f3fd1a58574fa3dfb88beaef6632)
diff --git a/src/ast/ast.cc b/src/ast/ast.cc
index 69e7351..9b2c638 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -5,6 +5,8 @@
#include "src/ast/ast.h"
#include <cmath> // For isfinite.
+
+#include "src/ast/prettyprinter.h"
#include "src/ast/scopes.h"
#include "src/builtins.h"
#include "src/code-stubs.h"
@@ -32,6 +34,25 @@
// ----------------------------------------------------------------------------
// Implementation of other node functionality.
+#ifdef DEBUG
+
+void AstNode::Print() { Print(Isolate::Current()); }
+
+
+void AstNode::Print(Isolate* isolate) {
+ AstPrinter::PrintOut(isolate, this);
+}
+
+
+void AstNode::PrettyPrint() { PrettyPrint(Isolate::Current()); }
+
+
+void AstNode::PrettyPrint(Isolate* isolate) {
+ PrettyPrinter::PrintOut(isolate, this);
+}
+
+#endif // DEBUG
+
bool Expression::IsSmiLiteral() const {
return IsLiteral() && AsLiteral()->value()->IsSmi();
@@ -254,14 +275,21 @@
}
}
+bool ObjectLiteralProperty::NeedsSetFunctionName() const {
+ return is_computed_name_ &&
+ (value_->IsAnonymousFunctionDefinition() ||
+ (value_->IsFunctionLiteral() &&
+ IsConciseMethod(value_->AsFunctionLiteral()->kind())));
+}
void ClassLiteral::AssignFeedbackVectorSlots(Isolate* isolate,
FeedbackVectorSpec* spec,
FeedbackVectorSlotCache* cache) {
// This logic that computes the number of slots needed for vector store
// ICs must mirror FullCodeGenerator::VisitClassLiteral.
+ prototype_slot_ = spec->AddLoadICSlot();
if (NeedsProxySlot()) {
- slot_ = spec->AddStoreICSlot();
+ proxy_slot_ = spec->AddStoreICSlot();
}
for (int i = 0; i < properties()->length(); i++) {
@@ -476,10 +504,11 @@
void ArrayLiteral::BuildConstantElements(Isolate* isolate) {
+ DCHECK_LT(first_spread_index_, 0);
+
if (!constant_elements_.is_null()) return;
- int constants_length =
- first_spread_index_ >= 0 ? first_spread_index_ : values()->length();
+ int constants_length = values()->length();
// Allocate a fixed array to hold all the object literals.
Handle<JSArray> array = isolate->factory()->NewJSArray(
@@ -487,7 +516,7 @@
Strength::WEAK, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE);
// Fill in the literals.
- bool is_simple = (first_spread_index_ < 0);
+ bool is_simple = true;
int depth_acc = 1;
bool is_holey = false;
int array_index = 0;
@@ -553,7 +582,7 @@
int array_index = 0;
for (; array_index < values()->length(); array_index++) {
Expression* subexpr = values()->at(array_index);
- if (subexpr->IsSpread()) break;
+ DCHECK(!subexpr->IsSpread());
if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
// We'll reuse the same literal slot for all of the non-constant
@@ -797,14 +826,12 @@
}
}
-
CaseClause::CaseClause(Zone* zone, Expression* label,
ZoneList<Statement*>* statements, int pos)
: Expression(zone, pos),
label_(label),
statements_(statements),
- compare_type_(Type::None(zone)) {}
-
+ compare_type_(Type::None()) {}
uint32_t Literal::Hash() {
return raw_value()->IsString()