| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_RAW_OBJECT_H_ | 5 #ifndef VM_RAW_OBJECT_H_ |
| 6 #define VM_RAW_OBJECT_H_ | 6 #define VM_RAW_OBJECT_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/token.h" | 10 #include "vm/token.h" |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 RawFunction* parent_function_; // Enclosing function of this local function. | 605 RawFunction* parent_function_; // Enclosing function of this local function. |
| 606 RawClass* signature_class_; // Only for closure or signature function. | 606 RawClass* signature_class_; // Only for closure or signature function. |
| 607 RawCode* closure_allocation_stub_; // Stub code for allocation of closures. | 607 RawCode* closure_allocation_stub_; // Stub code for allocation of closures. |
| 608 RawFunction* implicit_closure_function_; // Implicit closure function. | 608 RawFunction* implicit_closure_function_; // Implicit closure function. |
| 609 RawObject** to() { | 609 RawObject** to() { |
| 610 return reinterpret_cast<RawObject**>(&ptr()->implicit_closure_function_); | 610 return reinterpret_cast<RawObject**>(&ptr()->implicit_closure_function_); |
| 611 } | 611 } |
| 612 | 612 |
| 613 intptr_t token_pos_; | 613 intptr_t token_pos_; |
| 614 intptr_t end_token_pos_; | 614 intptr_t end_token_pos_; |
| 615 intptr_t num_fixed_parameters_; | |
| 616 intptr_t num_optional_positional_parameters_; | |
| 617 intptr_t num_optional_named_parameters_; | |
| 618 intptr_t usage_counter_; // Incremented while function is running. | 615 intptr_t usage_counter_; // Incremented while function is running. |
| 616 int16_t num_fixed_parameters_; |
| 617 int16_t num_optional_parameters_; // > 0: positional; < 0: named. |
| 619 uint16_t deoptimization_counter_; | 618 uint16_t deoptimization_counter_; |
| 620 uint16_t kind_tag_; | 619 uint16_t kind_tag_; |
| 621 }; | 620 }; |
| 622 | 621 |
| 623 | 622 |
| 624 class RawField : public RawObject { | 623 class RawField : public RawObject { |
| 625 RAW_HEAP_OBJECT_IMPLEMENTATION(Field); | 624 RAW_HEAP_OBJECT_IMPLEMENTATION(Field); |
| 626 | 625 |
| 627 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } | 626 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } |
| 628 RawString* name_; | 627 RawString* name_; |
| (...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1591 kExternalUint64ArrayCid == kByteArrayCid + 18 && | 1590 kExternalUint64ArrayCid == kByteArrayCid + 18 && |
| 1592 kExternalFloat32ArrayCid == kByteArrayCid + 19 && | 1591 kExternalFloat32ArrayCid == kByteArrayCid + 19 && |
| 1593 kExternalFloat64ArrayCid == kByteArrayCid + 20 && | 1592 kExternalFloat64ArrayCid == kByteArrayCid + 20 && |
| 1594 kStacktraceCid == kByteArrayCid + 21); | 1593 kStacktraceCid == kByteArrayCid + 21); |
| 1595 return (index >= kByteArrayCid && index <= kExternalFloat64ArrayCid); | 1594 return (index >= kByteArrayCid && index <= kExternalFloat64ArrayCid); |
| 1596 } | 1595 } |
| 1597 | 1596 |
| 1598 } // namespace dart | 1597 } // namespace dart |
| 1599 | 1598 |
| 1600 #endif // VM_RAW_OBJECT_H_ | 1599 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |