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

Unified Diff: src/ast.h

Issue 157503002: A64: Synchronize with r18444. (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/assembler.cc ('k') | src/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 0bbb90452a674c21619b8abc167594a1fc63f4b8..3fabfddec26fe91696b8c3990b22311fab183e46 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -39,7 +39,6 @@
#include "small-pointer-list.h"
#include "smart-pointers.h"
#include "token.h"
-#include "type-info.h" // TODO(rossberg): this should eventually be removed
#include "types.h"
#include "utils.h"
#include "variables.h"
@@ -115,17 +114,14 @@ namespace internal {
V(CountOperation) \
V(BinaryOperation) \
V(CompareOperation) \
- V(ThisFunction)
-
-#define AUXILIARY_NODE_LIST(V) \
+ V(ThisFunction) \
V(CaseClause)
#define AST_NODE_LIST(V) \
DECLARATION_NODE_LIST(V) \
MODULE_NODE_LIST(V) \
STATEMENT_NODE_LIST(V) \
- EXPRESSION_NODE_LIST(V) \
- AUXILIARY_NODE_LIST(V)
+ EXPRESSION_NODE_LIST(V)
// Forward declarations
class AstConstructionVisitor;
@@ -279,9 +275,8 @@ class SmallMapList V8_FINAL {
int length() const { return list_.length(); }
void AddMapIfMissing(Handle<Map> map, Zone* zone) {
- Map* updated = map->CurrentMapForDeprecated();
- if (updated == NULL) return;
- map = Handle<Map>(updated);
+ map = Map::CurrentMapForDeprecated(map);
+ if (map.is_null()) return;
for (int i = 0; i < length(); ++i) {
if (at(i).is_identical_to(map)) return;
}
@@ -1106,7 +1101,7 @@ class WithStatement V8_FINAL : public Statement {
};
-class CaseClause V8_FINAL : public AstNode {
+class CaseClause V8_FINAL : public Expression {
public:
DECLARE_NODE_TYPE(CaseClause)
@@ -1148,16 +1143,11 @@ class SwitchStatement V8_FINAL : public BreakableStatement {
void Initialize(Expression* tag, ZoneList<CaseClause*>* cases) {
tag_ = tag;
cases_ = cases;
- switch_type_ = UNKNOWN_SWITCH;
}
Expression* tag() const { return tag_; }
ZoneList<CaseClause*>* cases() const { return cases_; }
- enum SwitchType { UNKNOWN_SWITCH, SMI_SWITCH, STRING_SWITCH, GENERIC_SWITCH };
- SwitchType switch_type() const { return switch_type_; }
- void set_switch_type(SwitchType switch_type) { switch_type_ = switch_type; }
-
protected:
SwitchStatement(Isolate* isolate, ZoneStringList* labels, int pos)
: BreakableStatement(isolate, labels, TARGET_FOR_ANONYMOUS, pos),
@@ -1167,7 +1157,6 @@ class SwitchStatement V8_FINAL : public BreakableStatement {
private:
Expression* tag_;
ZoneList<CaseClause*>* cases_;
- SwitchType switch_type_;
};
@@ -1691,7 +1680,9 @@ class Property V8_FINAL : public Expression {
bool IsFunctionPrototype() const { return is_function_prototype_; }
// Type feedback information.
- virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
+ virtual bool IsMonomorphic() V8_OVERRIDE {
+ return receiver_types_.length() == 1;
+ }
virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
return &receiver_types_;
}
@@ -1704,7 +1695,6 @@ class Property V8_FINAL : public Expression {
return is_uninitialized_ || is_pre_monomorphic_;
}
void set_is_uninitialized(bool b) { is_uninitialized_ = b; }
- void set_is_monomorphic(bool b) { is_monomorphic_ = b; }
void set_is_pre_monomorphic(bool b) { is_pre_monomorphic_ = b; }
void set_is_string_access(bool b) { is_string_access_ = b; }
void set_is_function_prototype(bool b) { is_function_prototype_ = b; }
@@ -1720,7 +1710,6 @@ class Property V8_FINAL : public Expression {
obj_(obj),
key_(key),
load_id_(GetNextId(isolate)),
- is_monomorphic_(false),
is_pre_monomorphic_(false),
is_uninitialized_(false),
is_string_access_(false),
@@ -1732,7 +1721,6 @@ class Property V8_FINAL : public Expression {
const BailoutId load_id_;
SmallMapList receiver_types_;
- bool is_monomorphic_ : 1;
bool is_pre_monomorphic_ : 1;
bool is_uninitialized_ : 1;
bool is_string_access_ : 1;
@@ -1948,6 +1936,10 @@ class BinaryOperation V8_FINAL : public Expression {
Token::Value op() const { return op_; }
Expression* left() const { return left_; }
Expression* right() const { return right_; }
+ Handle<AllocationSite> allocation_site() const { return allocation_site_; }
+ void set_allocation_site(Handle<AllocationSite> allocation_site) {
+ allocation_site_ = allocation_site;
+ }
BailoutId RightId() const { return right_id_; }
@@ -1976,6 +1968,7 @@ class BinaryOperation V8_FINAL : public Expression {
Token::Value op_;
Expression* left_;
Expression* right_;
+ Handle<AllocationSite> allocation_site_;
// TODO(rossberg): the fixed arg should probably be represented as a Constant
// type for the RHS.
@@ -2001,7 +1994,9 @@ class CountOperation V8_FINAL : public Expression {
Expression* expression() const { return expression_; }
- virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
+ virtual bool IsMonomorphic() V8_OVERRIDE {
+ return receiver_types_.length() == 1;
+ }
virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
return &receiver_types_;
}
@@ -2009,7 +2004,6 @@ class CountOperation V8_FINAL : public Expression {
return store_mode_;
}
Handle<Type> type() const { return type_; }
- void set_is_monomorphic(bool b) { is_monomorphic_ = b; }
void set_store_mode(KeyedAccessStoreMode mode) { store_mode_ = mode; }
void set_type(Handle<Type> type) { type_ = type; }
@@ -2027,7 +2021,6 @@ class CountOperation V8_FINAL : public Expression {
: Expression(isolate, pos),
op_(op),
is_prefix_(is_prefix),
- is_monomorphic_(false),
store_mode_(STANDARD_STORE),
expression_(expr),
assignment_id_(GetNextId(isolate)),
@@ -2036,7 +2029,6 @@ class CountOperation V8_FINAL : public Expression {
private:
Token::Value op_;
bool is_prefix_ : 1;
- bool is_monomorphic_ : 1;
KeyedAccessStoreMode store_mode_ : 5; // Windows treats as signed,
// must have extra bit.
Handle<Type> type_;
@@ -2142,7 +2134,9 @@ class Assignment V8_FINAL : public Expression {
// Type feedback information.
TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); }
- virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
+ virtual bool IsMonomorphic() V8_OVERRIDE {
+ return receiver_types_.length() == 1;
+ }
bool IsUninitialized() { return is_uninitialized_; }
bool IsPreMonomorphic() { return is_pre_monomorphic_; }
bool HasNoTypeInformation() {
@@ -2155,7 +2149,6 @@ class Assignment V8_FINAL : public Expression {
return store_mode_;
}
void set_is_uninitialized(bool b) { is_uninitialized_ = b; }
- void set_is_monomorphic(bool b) { is_monomorphic_ = b; }
void set_is_pre_monomorphic(bool b) { is_pre_monomorphic_ = b; }
void set_store_mode(KeyedAccessStoreMode mode) { store_mode_ = mode; }
@@ -2182,7 +2175,6 @@ class Assignment V8_FINAL : public Expression {
BinaryOperation* binary_operation_;
const BailoutId assignment_id_;
- bool is_monomorphic_ : 1;
bool is_uninitialized_ : 1;
bool is_pre_monomorphic_ : 1;
KeyedAccessStoreMode store_mode_ : 5; // Windows treats as signed,
« no previous file with comments | « src/assembler.cc ('k') | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698