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

Unified Diff: src/ast.cc

Issue 143633007: A64: Synchronize with r18764. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast.h ('k') | src/bootstrapper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index da86a1162d7bc726ab7c4ec5f8f94ff11ca7f26d..9d8624ca1b179b239314388eab61e9d4a8062f74 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -82,8 +82,8 @@ bool Expression::IsUndefinedLiteral(Isolate* isolate) {
}
-VariableProxy::VariableProxy(Isolate* isolate, Variable* var, int position)
- : Expression(isolate, position),
+VariableProxy::VariableProxy(Zone* zone, Variable* var, int position)
+ : Expression(zone, position),
name_(var->name()),
var_(NULL), // Will be set by the call to BindTo.
is_this_(var->is_this()),
@@ -94,12 +94,12 @@ VariableProxy::VariableProxy(Isolate* isolate, Variable* var, int position)
}
-VariableProxy::VariableProxy(Isolate* isolate,
+VariableProxy::VariableProxy(Zone* zone,
Handle<String> name,
bool is_this,
Interface* interface,
int position)
- : Expression(isolate, position),
+ : Expression(zone, position),
name_(name),
var_(NULL),
is_this_(is_this),
@@ -126,17 +126,17 @@ void VariableProxy::BindTo(Variable* var) {
}
-Assignment::Assignment(Isolate* isolate,
+Assignment::Assignment(Zone* zone,
Token::Value op,
Expression* target,
Expression* value,
int pos)
- : Expression(isolate, pos),
+ : Expression(zone, pos),
op_(op),
target_(target),
value_(value),
binary_operation_(NULL),
- assignment_id_(GetNextId(isolate)),
+ assignment_id_(GetNextId(zone)),
is_uninitialized_(false),
is_pre_monomorphic_(false),
store_mode_(STANDARD_STORE) { }
@@ -203,15 +203,14 @@ void FunctionLiteral::InitializeSharedInfo(
}
-ObjectLiteralProperty::ObjectLiteralProperty(Literal* key,
- Expression* value,
- Isolate* isolate) {
+ObjectLiteralProperty::ObjectLiteralProperty(
+ Zone* zone, Literal* key, Expression* value) {
emit_store_ = true;
key_ = key;
value_ = value;
Object* k = *key->value();
if (k->IsInternalizedString() &&
- isolate->heap()->proto_string()->Equals(String::cast(k))) {
+ zone->isolate()->heap()->proto_string()->Equals(String::cast(k))) {
kind_ = PROTOTYPE;
} else if (value_->AsMaterializedLiteral() != NULL) {
kind_ = MATERIALIZED_LITERAL;
@@ -223,8 +222,8 @@ ObjectLiteralProperty::ObjectLiteralProperty(Literal* key,
}
-ObjectLiteralProperty::ObjectLiteralProperty(bool is_getter,
- FunctionLiteral* value) {
+ObjectLiteralProperty::ObjectLiteralProperty(
+ Zone* zone, bool is_getter, FunctionLiteral* value) {
emit_store_ = true;
value_ = value;
kind_ = is_getter ? GETTER : SETTER;
@@ -590,12 +589,28 @@ bool FunctionDeclaration::IsInlineable() const {
// TODO(rossberg): all RecordTypeFeedback functions should disappear
// once we use the common type field in the AST consistently.
-
void Expression::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
to_boolean_types_ = oracle->ToBooleanTypes(test_id());
}
+Call::CallType Call::GetCallType(Isolate* isolate) const {
+ VariableProxy* proxy = expression()->AsVariableProxy();
+ if (proxy != NULL) {
+ if (proxy->var()->is_possibly_eval(isolate)) {
+ return POSSIBLY_EVAL_CALL;
+ } else if (proxy->var()->IsUnallocated()) {
+ return GLOBAL_CALL;
+ } else if (proxy->var()->IsLookupSlot()) {
+ return LOOKUP_SLOT_CALL;
+ }
+ }
+
+ Property* property = expression()->AsProperty();
+ return property != NULL ? PROPERTY_CALL : OTHER_CALL;
+}
+
+
bool Call::ComputeTarget(Handle<Map> type, Handle<String> name) {
// If there is an interceptor, we can't compute the target for a direct call.
if (type->has_named_interceptor()) return false;
@@ -740,16 +755,13 @@ void Call::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
void CallNew::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
- allocation_info_cell_ =
- oracle->GetCallNewAllocationInfoCell(CallNewFeedbackId());
+ allocation_site_ =
+ oracle->GetCallNewAllocationSite(CallNewFeedbackId());
is_monomorphic_ = oracle->CallNewIsMonomorphic(CallNewFeedbackId());
if (is_monomorphic_) {
target_ = oracle->GetCallNewTarget(CallNewFeedbackId());
- Object* value = allocation_info_cell_->value();
- ASSERT(!value->IsTheHole());
- if (value->IsAllocationSite()) {
- AllocationSite* site = AllocationSite::cast(value);
- elements_kind_ = site->GetElementsKind();
+ if (!allocation_site_.is_null()) {
+ elements_kind_ = allocation_site_->GetElementsKind();
}
}
}
@@ -1133,16 +1145,16 @@ RegExpAlternative::RegExpAlternative(ZoneList<RegExpTree*>* nodes)
}
-CaseClause::CaseClause(Isolate* isolate,
+CaseClause::CaseClause(Zone* zone,
Expression* label,
ZoneList<Statement*>* statements,
int pos)
- : Expression(isolate, pos),
+ : Expression(zone, pos),
label_(label),
statements_(statements),
- compare_type_(Type::None(isolate)),
- compare_id_(AstNode::GetNextId(isolate)),
- entry_id_(AstNode::GetNextId(isolate)) {
+ compare_type_(Type::None(zone)),
+ compare_id_(AstNode::GetNextId(zone)),
+ entry_id_(AstNode::GetNextId(zone)) {
}
« no previous file with comments | « src/ast.h ('k') | src/bootstrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698