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

Side by Side Diff: src/ast-value-factory.h

Issue 526223002: Use Chrome compatible naming for compiler specifics. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: mips Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ast.cc ('k') | src/ast-value-factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 protected: 59 protected:
60 // This is null until the string is internalized. 60 // This is null until the string is internalized.
61 Handle<String> string_; 61 Handle<String> string_;
62 }; 62 };
63 63
64 64
65 class AstRawString : public AstString { 65 class AstRawString : public AstString {
66 public: 66 public:
67 virtual int length() const V8_OVERRIDE { 67 virtual int length() const OVERRIDE {
68 if (is_one_byte_) 68 if (is_one_byte_)
69 return literal_bytes_.length(); 69 return literal_bytes_.length();
70 return literal_bytes_.length() / 2; 70 return literal_bytes_.length() / 2;
71 } 71 }
72 72
73 virtual void Internalize(Isolate* isolate) V8_OVERRIDE; 73 virtual void Internalize(Isolate* isolate) OVERRIDE;
74 74
75 bool AsArrayIndex(uint32_t* index) const; 75 bool AsArrayIndex(uint32_t* index) const;
76 76
77 // The string is not null-terminated, use length() to find out the length. 77 // The string is not null-terminated, use length() to find out the length.
78 const unsigned char* raw_data() const { 78 const unsigned char* raw_data() const {
79 return literal_bytes_.start(); 79 return literal_bytes_.start();
80 } 80 }
81 bool is_one_byte() const { return is_one_byte_; } 81 bool is_one_byte() const { return is_one_byte_; }
82 bool IsOneByteEqualTo(const char* data) const; 82 bool IsOneByteEqualTo(const char* data) const;
83 uint16_t FirstCharacter() const { 83 uint16_t FirstCharacter() const {
(...skipping 29 matching lines...) Expand all
113 uint32_t hash_; 113 uint32_t hash_;
114 }; 114 };
115 115
116 116
117 class AstConsString : public AstString { 117 class AstConsString : public AstString {
118 public: 118 public:
119 AstConsString(const AstString* left, const AstString* right) 119 AstConsString(const AstString* left, const AstString* right)
120 : left_(left), 120 : left_(left),
121 right_(right) {} 121 right_(right) {}
122 122
123 virtual int length() const V8_OVERRIDE { 123 virtual int length() const OVERRIDE {
124 return left_->length() + right_->length(); 124 return left_->length() + right_->length();
125 } 125 }
126 126
127 virtual void Internalize(Isolate* isolate) V8_OVERRIDE; 127 virtual void Internalize(Isolate* isolate) OVERRIDE;
128 128
129 private: 129 private:
130 friend class AstValueFactory; 130 friend class AstValueFactory;
131 131
132 const AstString* left_; 132 const AstString* left_;
133 const AstString* right_; 133 const AstString* right_;
134 }; 134 };
135 135
136 136
137 // AstValue is either a string, a number, a string array, a boolean, or a 137 // AstValue is either a string, a number, a string array, a boolean, or a
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 const AstRawString* name##_string_; 335 const AstRawString* name##_string_;
336 STRING_CONSTANTS(F) 336 STRING_CONSTANTS(F)
337 #undef F 337 #undef F
338 }; 338 };
339 339
340 } } // namespace v8::internal 340 } } // namespace v8::internal
341 341
342 #undef STRING_CONSTANTS 342 #undef STRING_CONSTANTS
343 343
344 #endif // V8_AST_VALUE_FACTORY_H_ 344 #endif // V8_AST_VALUE_FACTORY_H_
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/ast-value-factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698