Index: src/ast/ast-value-factory.h |
diff --git a/src/ast/ast-value-factory.h b/src/ast/ast-value-factory.h |
index 1c2144c480d462fc9bcb5c1effd5790b1c164f67..9feb3ce8aee52a9db749b61c22b90c15c351c491 100644 |
--- a/src/ast/ast-value-factory.h |
+++ b/src/ast/ast-value-factory.h |
@@ -65,8 +65,7 @@ class AstString : public ZoneObject { |
class AstRawString : public AstString { |
public: |
int length() const override { |
- if (is_one_byte_) |
- return literal_bytes_.length(); |
+ if (is_one_byte_) return literal_bytes_.length(); |
return literal_bytes_.length() / 2; |
} |
@@ -77,35 +76,28 @@ class AstRawString : public AstString { |
bool AsArrayIndex(uint32_t* index) const; |
// The string is not null-terminated, use length() to find out the length. |
- const unsigned char* raw_data() const { |
- return literal_bytes_.start(); |
- } |
+ const unsigned char* raw_data() const { return literal_bytes_.start(); } |
bool is_one_byte() const { return is_one_byte_; } |
bool IsOneByteEqualTo(const char* data) const; |
uint16_t FirstCharacter() const { |
- if (is_one_byte_) |
- return literal_bytes_[0]; |
+ if (is_one_byte_) return literal_bytes_[0]; |
const uint16_t* c = |
reinterpret_cast<const uint16_t*>(literal_bytes_.start()); |
return *c; |
} |
// For storing AstRawStrings in a hash map. |
- uint32_t hash() const { |
- return hash_; |
- } |
+ uint32_t hash() const { return hash_; } |
private: |
friend class AstValueFactory; |
friend class AstRawStringInternalizationKey; |
AstRawString(bool is_one_byte, const Vector<const byte>& literal_bytes, |
- uint32_t hash) |
+ uint32_t hash) |
: is_one_byte_(is_one_byte), literal_bytes_(literal_bytes), hash_(hash) {} |
- AstRawString() |
- : is_one_byte_(true), |
- hash_(0) {} |
+ AstRawString() : is_one_byte_(true), hash_(0) {} |
bool is_one_byte_; |
@@ -118,8 +110,7 @@ class AstRawString : public AstString { |
class AstConsString : public AstString { |
public: |
AstConsString(const AstString* left, const AstString* right) |
- : left_(left), |
- right_(right) {} |
+ : left_(left), right_(right) {} |
int length() const override { return left_->length() + right_->length(); } |
@@ -137,9 +128,7 @@ class AstConsString : public AstString { |
// special value (null, undefined, the hole). |
class AstValue : public ZoneObject { |
public: |
- bool IsString() const { |
- return type_ == STRING; |
- } |
+ bool IsString() const { return type_ == STRING; } |
bool IsNumber() const { |
return type_ == NUMBER || type_ == NUMBER_WITH_DOT || type_ == SMI; |
@@ -148,17 +137,14 @@ class AstValue : public ZoneObject { |
bool ContainsDot() const { return type_ == NUMBER_WITH_DOT; } |
const AstRawString* AsString() const { |
- if (type_ == STRING) |
- return string_; |
+ if (type_ == STRING) return string_; |
UNREACHABLE(); |
return 0; |
} |
double AsNumber() const { |
- if (type_ == NUMBER || type_ == NUMBER_WITH_DOT) |
- return number_; |
- if (type_ == SMI) |
- return smi_; |
+ if (type_ == NUMBER || type_ == NUMBER_WITH_DOT) return number_; |
+ if (type_ == SMI) return smi_; |
UNREACHABLE(); |
return 0; |
} |
@@ -312,9 +298,7 @@ class AstValueFactory { |
const AstString* right); |
void Internalize(Isolate* isolate); |
- bool IsInternalized() { |
- return isolate_ != NULL; |
- } |
+ bool IsInternalized() { return isolate_ != NULL; } |
#define F(name, str) \ |
const AstRawString* name##_string() { \ |