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

Unified Diff: src/ast.h

Issue 1161393007: OLD type Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 6 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 | « no previous file | 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 616ac5a8cb98e88307b9104c768e769e971cbdf4..e3746dc5284e9e311c4e2beac3983d9a881b3169 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1276,6 +1276,7 @@ class Literal final : public Expression {
bool ToBooleanIsFalse() const override { return !value()->BooleanValue(); }
Handle<Object> value() const { return value_->value(); }
+ bool is_float() const { return is_float_; }
const AstValue* raw_value() const { return value_; }
// Support for using Literal as a HashMap key. NOTE: Currently, this works
@@ -1289,14 +1290,16 @@ class Literal final : public Expression {
}
protected:
- Literal(Zone* zone, const AstValue* value, int position)
- : Expression(zone, position), value_(value) {}
+ Literal(Zone* zone, const AstValue* value, int position,
+ bool is_float = false)
+ : Expression(zone, position), value_(value), is_float_(is_float) {}
static int parent_num_ids() { return Expression::num_ids(); }
private:
int local_id(int n) const { return base_id() + parent_num_ids() + n; }
const AstValue* value_;
+ bool is_float_; // Literal contained a '.'
};
@@ -1624,6 +1627,7 @@ class VariableProxy final : public Expression {
bool IsValidReferenceExpression() const override { return !is_this(); }
bool IsArguments() const { return is_resolved() && var()->is_arguments(); }
+ bool IsParameter() const { return is_resolved() && var()->IsParameter(); }
Handle<String> name() const { return raw_name()->string(); }
const AstRawString* raw_name() const {
@@ -2518,6 +2522,7 @@ class FunctionLiteral final : public Expression {
bool is_expression() const { return IsExpression::decode(bitfield_); }
bool is_anonymous() const { return IsAnonymous::decode(bitfield_); }
LanguageMode language_mode() const;
+ AsmMode asm_mode() const;
static bool NeedsHomeObject(Expression* expr);
@@ -3367,9 +3372,9 @@ class AstNodeFactory final BASE_EMBEDDED {
return new (zone_) Literal(zone_, ast_value_factory_->NewSymbol(name), pos);
}
- Literal* NewNumberLiteral(double number, int pos) {
+ Literal* NewNumberLiteral(double number, int pos, bool is_float = false) {
return new (zone_)
- Literal(zone_, ast_value_factory_->NewNumber(number), pos);
+ Literal(zone_, ast_value_factory_->NewNumber(number), pos, is_float);
}
Literal* NewSmiLiteral(int number, int pos) {
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698