| 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 #include "vm/snapshot.h" |     5 #include "vm/snapshot.h" | 
|     6  |     6  | 
|     7 #include "platform/assert.h" |     7 #include "platform/assert.h" | 
|     8 #include "vm/bigint_operations.h" |     8 #include "vm/bigint_operations.h" | 
|     9 #include "vm/bootstrap.h" |     9 #include "vm/bootstrap.h" | 
|    10 #include "vm/class_finalizer.h" |    10 #include "vm/class_finalizer.h" | 
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|    54 } |    54 } | 
|    55  |    55  | 
|    56  |    56  | 
|    57 static intptr_t ObjectIdFromClassId(intptr_t class_id) { |    57 static intptr_t ObjectIdFromClassId(intptr_t class_id) { | 
|    58   ASSERT((class_id > kIllegalCid) && (class_id < kNumPredefinedCids)); |    58   ASSERT((class_id > kIllegalCid) && (class_id < kNumPredefinedCids)); | 
|    59   ASSERT(!RawObject::IsTypedDataViewClassId(class_id)); |    59   ASSERT(!RawObject::IsTypedDataViewClassId(class_id)); | 
|    60   return (class_id + kClassIdsOffset); |    60   return (class_id + kClassIdsOffset); | 
|    61 } |    61 } | 
|    62  |    62  | 
|    63  |    63  | 
|    64 static RawType* GetType(ObjectStore* object_store, int index) { |    64 static RawType* GetType(ObjectStore* object_store, intptr_t index) { | 
|    65   switch (index) { |    65   switch (index) { | 
|    66     case kObjectType: return object_store->object_type(); |    66     case kObjectType: return object_store->object_type(); | 
|    67     case kNullType: return object_store->null_type(); |    67     case kNullType: return object_store->null_type(); | 
|    68     case kFunctionType: return object_store->function_type(); |    68     case kFunctionType: return object_store->function_type(); | 
|    69     case kNumberType: return object_store->number_type(); |    69     case kNumberType: return object_store->number_type(); | 
|    70     case kSmiType: return object_store->smi_type(); |    70     case kSmiType: return object_store->smi_type(); | 
|    71     case kMintType: return object_store->mint_type(); |    71     case kMintType: return object_store->mint_type(); | 
|    72     case kDoubleType: return object_store->double_type(); |    72     case kDoubleType: return object_store->double_type(); | 
|    73     case kIntType: return object_store->int_type(); |    73     case kIntType: return object_store->int_type(); | 
|    74     case kBoolType: return object_store->bool_type(); |    74     case kBoolType: return object_store->bool_type(); | 
|    75     case kStringType: return object_store->string_type(); |    75     case kStringType: return object_store->string_type(); | 
|    76     case kArrayType: return object_store->array_type(); |    76     case kArrayType: return object_store->array_type(); | 
|    77     default: break; |    77     default: break; | 
|    78   } |    78   } | 
|    79   UNREACHABLE(); |    79   UNREACHABLE(); | 
|    80   return Type::null(); |    80   return Type::null(); | 
|    81 } |    81 } | 
|    82  |    82  | 
|    83  |    83  | 
|    84 static int GetTypeIndex(ObjectStore* object_store, const RawType* raw_type) { |    84 static intptr_t GetTypeIndex( | 
 |    85     ObjectStore* object_store, const RawType* raw_type) { | 
|    85   ASSERT(raw_type->IsHeapObject()); |    86   ASSERT(raw_type->IsHeapObject()); | 
|    86   if (raw_type == object_store->object_type()) { |    87   if (raw_type == object_store->object_type()) { | 
|    87     return kObjectType; |    88     return kObjectType; | 
|    88   } else if (raw_type == object_store->null_type()) { |    89   } else if (raw_type == object_store->null_type()) { | 
|    89     return kNullType; |    90     return kNullType; | 
|    90   } else if (raw_type == object_store->function_type()) { |    91   } else if (raw_type == object_store->function_type()) { | 
|    91     return kFunctionType; |    92     return kFunctionType; | 
|    92   } else if (raw_type == object_store->number_type()) { |    93   } else if (raw_type == object_store->number_type()) { | 
|    93     return kNumberType; |    94     return kNumberType; | 
|    94   } else if (raw_type == object_store->smi_type()) { |    95   } else if (raw_type == object_store->smi_type()) { | 
| (...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1485     UnmarkAll(); |  1486     UnmarkAll(); | 
|  1486     isolate->set_long_jump_base(base); |  1487     isolate->set_long_jump_base(base); | 
|  1487   } else { |  1488   } else { | 
|  1488     isolate->set_long_jump_base(base); |  1489     isolate->set_long_jump_base(base); | 
|  1489     ThrowException(exception_type(), exception_msg()); |  1490     ThrowException(exception_type(), exception_msg()); | 
|  1490   } |  1491   } | 
|  1491 } |  1492 } | 
|  1492  |  1493  | 
|  1493  |  1494  | 
|  1494 }  // namespace dart |  1495 }  // namespace dart | 
| OLD | NEW |