Chromium Code Reviews| 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_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
| 6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
| 7 | 7 |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
| 10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 2995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3006 ASSERT(Utils::IsInt(32, token_pos)); | 3006 ASSERT(Utils::IsInt(32, token_pos)); |
| 3007 rec->set_token_pos(token_pos, | 3007 rec->set_token_pos(token_pos, |
| 3008 RecordSizeInBytes() == RawPcDescriptors::kCompressedRecSize); | 3008 RecordSizeInBytes() == RawPcDescriptors::kCompressedRecSize); |
| 3009 ASSERT(Utils::IsInt(16, try_index)); | 3009 ASSERT(Utils::IsInt(16, try_index)); |
| 3010 rec->set_try_index(try_index); | 3010 rec->set_try_index(try_index); |
| 3011 ASSERT(rec->try_index() == try_index); | 3011 ASSERT(rec->try_index() == try_index); |
| 3012 ASSERT(rec->token_pos() == token_pos); | 3012 ASSERT(rec->token_pos() == token_pos); |
| 3013 } | 3013 } |
| 3014 | 3014 |
| 3015 static const intptr_t kMaxBytesPerElement = | 3015 static const intptr_t kMaxBytesPerElement = |
| 3016 RawPcDescriptors::kFullRecSize; | 3016 sizeof(RawPcDescriptors::PcDescriptorRec); |
|
siva
2014/07/16 00:41:27
Does this need to be sizeof(....) can it be
RawPcD
srdjan
2014/07/16 16:17:17
It gives error:
In-class initializer for static da
| |
| 3017 static const intptr_t kMaxElements = kSmiMax / kMaxBytesPerElement; | 3017 static const intptr_t kMaxElements = kSmiMax / kMaxBytesPerElement; |
| 3018 | 3018 |
| 3019 static intptr_t InstanceSize() { | 3019 static intptr_t InstanceSize() { |
| 3020 ASSERT(sizeof(RawPcDescriptors) == | 3020 ASSERT(sizeof(RawPcDescriptors) == |
| 3021 OFFSET_OF_RETURNED_VALUE(RawPcDescriptors, data)); | 3021 OFFSET_OF_RETURNED_VALUE(RawPcDescriptors, data)); |
| 3022 return 0; | 3022 return 0; |
| 3023 } | 3023 } |
| 3024 static intptr_t InstanceSize(intptr_t len, intptr_t record_size_in_bytes) { | 3024 static intptr_t InstanceSize(intptr_t len, intptr_t record_size_in_bytes) { |
| 3025 ASSERT(0 <= len && len <= kMaxElements); | 3025 ASSERT(0 <= len && len <= kMaxElements); |
| 3026 return RoundedAllocationSize( | 3026 return RoundedAllocationSize( |
| (...skipping 4157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7184 | 7184 |
| 7185 | 7185 |
| 7186 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7186 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 7187 intptr_t index) { | 7187 intptr_t index) { |
| 7188 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7188 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 7189 } | 7189 } |
| 7190 | 7190 |
| 7191 } // namespace dart | 7191 } // namespace dart |
| 7192 | 7192 |
| 7193 #endif // VM_OBJECT_H_ | 7193 #endif // VM_OBJECT_H_ |
| OLD | NEW |