Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(855)

Side by Side Diff: runtime/vm/snapshot.cc

Issue 26345002: Last cleanup int -> intptr_t. Also removed a hack. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | runtime/vm/store_buffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | runtime/vm/store_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698