| 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/atomic.h" | 9 #include "vm/atomic.h" | 
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" | 
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 67     V(GrowableObjectArray)                                                     \ | 67     V(GrowableObjectArray)                                                     \ | 
| 68     V(Float32x4)                                                               \ | 68     V(Float32x4)                                                               \ | 
| 69     V(Int32x4)                                                                 \ | 69     V(Int32x4)                                                                 \ | 
| 70     V(Float64x2)                                                               \ | 70     V(Float64x2)                                                               \ | 
| 71     V(TypedData)                                                               \ | 71     V(TypedData)                                                               \ | 
| 72     V(ExternalTypedData)                                                       \ | 72     V(ExternalTypedData)                                                       \ | 
| 73     V(Capability)                                                              \ | 73     V(Capability)                                                              \ | 
| 74     V(ReceivePort)                                                             \ | 74     V(ReceivePort)                                                             \ | 
| 75     V(SendPort)                                                                \ | 75     V(SendPort)                                                                \ | 
| 76     V(Stacktrace)                                                              \ | 76     V(Stacktrace)                                                              \ | 
| 77     V(JSRegExp)                                                                \ | 77     V(RegExp)                                                                  \ | 
| 78     V(WeakProperty)                                                            \ | 78     V(WeakProperty)                                                            \ | 
| 79     V(MirrorReference)                                                         \ | 79     V(MirrorReference)                                                         \ | 
| 80     V(LinkedHashMap)                                                           \ | 80     V(LinkedHashMap)                                                           \ | 
| 81     V(UserTag)                                                                 \ | 81     V(UserTag)                                                                 \ | 
| 82 | 82 | 
| 83 #define CLASS_LIST_ARRAYS(V)                                                   \ | 83 #define CLASS_LIST_ARRAYS(V)                                                   \ | 
| 84   V(Array)                                                                     \ | 84   V(Array)                                                                     \ | 
| 85     V(ImmutableArray)                                                          \ | 85     V(ImmutableArray)                                                          \ | 
| 86 | 86 | 
| 87 #define CLASS_LIST_STRINGS(V)                                                  \ | 87 #define CLASS_LIST_STRINGS(V)                                                  \ | 
| (...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2057   RawArray* pc_offset_array_;  // Offset of PC for each frame. | 2057   RawArray* pc_offset_array_;  // Offset of PC for each frame. | 
| 2058   RawObject** to() { | 2058   RawObject** to() { | 
| 2059     return reinterpret_cast<RawObject**>(&ptr()->pc_offset_array_); | 2059     return reinterpret_cast<RawObject**>(&ptr()->pc_offset_array_); | 
| 2060   } | 2060   } | 
| 2061   // False for pre-allocated stack trace (used in OOM and Stack overflow). | 2061   // False for pre-allocated stack trace (used in OOM and Stack overflow). | 
| 2062   bool expand_inlined_; | 2062   bool expand_inlined_; | 
| 2063 }; | 2063 }; | 
| 2064 | 2064 | 
| 2065 | 2065 | 
| 2066 // VM type for capturing JS regular expressions. | 2066 // VM type for capturing JS regular expressions. | 
| 2067 class RawJSRegExp : public RawInstance { | 2067 class RawRegExp : public RawInstance { | 
| 2068   RAW_HEAP_OBJECT_IMPLEMENTATION(JSRegExp); | 2068   RAW_HEAP_OBJECT_IMPLEMENTATION(RegExp); | 
| 2069 | 2069 | 
| 2070   RawObject** from() { | 2070   RawObject** from() { | 
| 2071     return reinterpret_cast<RawObject**>(&ptr()->num_bracket_expressions_); | 2071     return reinterpret_cast<RawObject**>(&ptr()->num_bracket_expressions_); | 
| 2072   } | 2072   } | 
| 2073   RawSmi* num_bracket_expressions_; | 2073   RawSmi* num_bracket_expressions_; | 
| 2074   RawString* pattern_;  // Pattern to be used for matching. | 2074   RawString* pattern_;  // Pattern to be used for matching. | 
| 2075   RawFunction* one_byte_function_; | 2075   RawFunction* one_byte_function_; | 
| 2076   RawFunction* two_byte_function_; | 2076   RawFunction* two_byte_function_; | 
| 2077   RawFunction* external_one_byte_function_; | 2077   RawFunction* external_one_byte_function_; | 
| 2078   RawFunction* external_two_byte_function_; | 2078   RawFunction* external_two_byte_function_; | 
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2335          (index == kInstructionsCid) || | 2335          (index == kInstructionsCid) || | 
| 2336          (index == kObjectPoolCid) || | 2336          (index == kObjectPoolCid) || | 
| 2337          (index == kPcDescriptorsCid) || | 2337          (index == kPcDescriptorsCid) || | 
| 2338          (index == kCodeSourceMapCid) || | 2338          (index == kCodeSourceMapCid) || | 
| 2339          (index == kStackmapCid) || | 2339          (index == kStackmapCid) || | 
| 2340          (index == kLocalVarDescriptorsCid) || | 2340          (index == kLocalVarDescriptorsCid) || | 
| 2341          (index == kExceptionHandlersCid) || | 2341          (index == kExceptionHandlersCid) || | 
| 2342          (index == kCodeCid) || | 2342          (index == kCodeCid) || | 
| 2343          (index == kContextScopeCid) || | 2343          (index == kContextScopeCid) || | 
| 2344          (index == kInstanceCid) || | 2344          (index == kInstanceCid) || | 
| 2345          (index == kJSRegExpCid); | 2345          (index == kRegExpCid); | 
| 2346 } | 2346 } | 
| 2347 | 2347 | 
| 2348 | 2348 | 
| 2349 // This is a set of classes that are not Dart classes whose representation | 2349 // This is a set of classes that are not Dart classes whose representation | 
| 2350 // is defined by the VM but are used in the VM code by computing the | 2350 // is defined by the VM but are used in the VM code by computing the | 
| 2351 // implicit field offsets of the various fields in the dart object. | 2351 // implicit field offsets of the various fields in the dart object. | 
| 2352 inline bool RawObject::IsImplicitFieldClassId(intptr_t index) { | 2352 inline bool RawObject::IsImplicitFieldClassId(intptr_t index) { | 
| 2353   return (IsTypedDataViewClassId(index) || index == kByteBufferCid); | 2353   return (IsTypedDataViewClassId(index) || index == kByteBufferCid); | 
| 2354 } | 2354 } | 
| 2355 | 2355 | 
| 2356 | 2356 | 
| 2357 inline intptr_t RawObject::NumberOfTypedDataClasses() { | 2357 inline intptr_t RawObject::NumberOfTypedDataClasses() { | 
| 2358   // Make sure this is updated when new TypedData types are added. | 2358   // Make sure this is updated when new TypedData types are added. | 
| 2359   COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); | 2359   COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); | 
| 2360   COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2360   COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 
| 2361                  kTypedDataInt8ArrayViewCid + 15); | 2361                  kTypedDataInt8ArrayViewCid + 15); | 
| 2362   COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2362   COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 
| 2363   COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2363   COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 
| 2364   return (kNullCid - kTypedDataInt8ArrayCid); | 2364   return (kNullCid - kTypedDataInt8ArrayCid); | 
| 2365 } | 2365 } | 
| 2366 | 2366 | 
| 2367 }  // namespace dart | 2367 }  // namespace dart | 
| 2368 | 2368 | 
| 2369 #endif  // VM_RAW_OBJECT_H_ | 2369 #endif  // VM_RAW_OBJECT_H_ | 
| OLD | NEW | 
|---|