OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_AST_AST_H_ | 5 #ifndef V8_AST_AST_H_ |
6 #define V8_AST_AST_H_ | 6 #define V8_AST_AST_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/ast/ast-value-factory.h" | 9 #include "src/ast/ast-value-factory.h" |
10 #include "src/ast/modules.h" | 10 #include "src/ast/modules.h" |
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1446 | 1446 |
1447 Handle<FixedArray> constant_properties() const { | 1447 Handle<FixedArray> constant_properties() const { |
1448 return constant_properties_; | 1448 return constant_properties_; |
1449 } | 1449 } |
1450 int properties_count() const { return constant_properties_->length() / 2; } | 1450 int properties_count() const { return constant_properties_->length() / 2; } |
1451 ZoneList<Property*>* properties() const { return properties_; } | 1451 ZoneList<Property*>* properties() const { return properties_; } |
1452 bool fast_elements() const { return fast_elements_; } | 1452 bool fast_elements() const { return fast_elements_; } |
1453 bool may_store_doubles() const { return may_store_doubles_; } | 1453 bool may_store_doubles() const { return may_store_doubles_; } |
1454 bool has_elements() const { return has_elements_; } | 1454 bool has_elements() const { return has_elements_; } |
1455 bool has_shallow_properties() const { | 1455 bool has_shallow_properties() const { |
1456 return depth() == 1 && !has_elements() && !may_store_doubles(); | 1456 return depth() == 1 && !has_elements() && |
| 1457 (FLAG_unbox_double_fields || !may_store_doubles()); |
1457 } | 1458 } |
1458 | 1459 |
1459 // Decide if a property should be in the object boilerplate. | 1460 // Decide if a property should be in the object boilerplate. |
1460 static bool IsBoilerplateProperty(Property* property); | 1461 static bool IsBoilerplateProperty(Property* property); |
1461 | 1462 |
1462 // Populate the constant properties fixed array. | 1463 // Populate the constant properties fixed array. |
1463 void BuildConstantProperties(Isolate* isolate); | 1464 void BuildConstantProperties(Isolate* isolate); |
1464 | 1465 |
1465 // Mark all computed expressions that are bound to a key that | 1466 // Mark all computed expressions that are bound to a key that |
1466 // is shadowed by a later occurrence of the same key. For the | 1467 // is shadowed by a later occurrence of the same key. For the |
(...skipping 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3514 : NULL; \ | 3515 : NULL; \ |
3515 } | 3516 } |
3516 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) | 3517 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) |
3517 #undef DECLARE_NODE_FUNCTIONS | 3518 #undef DECLARE_NODE_FUNCTIONS |
3518 | 3519 |
3519 | 3520 |
3520 } // namespace internal | 3521 } // namespace internal |
3521 } // namespace v8 | 3522 } // namespace v8 |
3522 | 3523 |
3523 #endif // V8_AST_AST_H_ | 3524 #endif // V8_AST_AST_H_ |
OLD | NEW |