OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 return !String::cast(*handle_)->AsArrayIndex(&ignored); | 1176 return !String::cast(*handle_)->AsArrayIndex(&ignored); |
1177 } | 1177 } |
1178 return false; | 1178 return false; |
1179 } | 1179 } |
1180 | 1180 |
1181 Handle<String> AsPropertyName() { | 1181 Handle<String> AsPropertyName() { |
1182 ASSERT(IsPropertyName()); | 1182 ASSERT(IsPropertyName()); |
1183 return Handle<String>::cast(handle_); | 1183 return Handle<String>::cast(handle_); |
1184 } | 1184 } |
1185 | 1185 |
1186 virtual bool ToBooleanIsTrue() { return handle_->ToBoolean()->IsTrue(); } | 1186 virtual bool ToBooleanIsTrue() { return handle_->BooleanValue(); } |
1187 virtual bool ToBooleanIsFalse() { return handle_->ToBoolean()->IsFalse(); } | 1187 virtual bool ToBooleanIsFalse() { return !handle_->BooleanValue(); } |
1188 | 1188 |
1189 // Identity testers. | 1189 // Identity testers. |
1190 bool IsNull() const { | 1190 bool IsNull() const { |
1191 ASSERT(!handle_.is_null()); | 1191 ASSERT(!handle_.is_null()); |
1192 return handle_->IsNull(); | 1192 return handle_->IsNull(); |
1193 } | 1193 } |
1194 bool IsTrue() const { | 1194 bool IsTrue() const { |
1195 ASSERT(!handle_.is_null()); | 1195 ASSERT(!handle_.is_null()); |
1196 return handle_->IsTrue(); | 1196 return handle_->IsTrue(); |
1197 } | 1197 } |
(...skipping 1737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2935 private: | 2935 private: |
2936 Isolate* isolate_; | 2936 Isolate* isolate_; |
2937 Zone* zone_; | 2937 Zone* zone_; |
2938 Visitor visitor_; | 2938 Visitor visitor_; |
2939 }; | 2939 }; |
2940 | 2940 |
2941 | 2941 |
2942 } } // namespace v8::internal | 2942 } } // namespace v8::internal |
2943 | 2943 |
2944 #endif // V8_AST_H_ | 2944 #endif // V8_AST_H_ |
OLD | NEW |