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

Side by Side Diff: runtime/vm/object.h

Issue 22381002: Fixes to get Dart VM compiling on Ubuntu 13.04, Debian Wheezy. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use array syntax to index into native fields Created 7 years, 4 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 | « no previous file | no next file » | 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 #ifndef VM_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 5981 matching lines...) Expand 10 before | Expand all | Expand 10 after
5992 5992
5993 5993
5994 intptr_t Instance::GetNativeField(Isolate* isolate, int index) const { 5994 intptr_t Instance::GetNativeField(Isolate* isolate, int index) const {
5995 ASSERT(IsValidNativeIndex(index)); 5995 ASSERT(IsValidNativeIndex(index));
5996 NoGCScope no_gc; 5996 NoGCScope no_gc;
5997 RawTypedData* native_fields = 5997 RawTypedData* native_fields =
5998 reinterpret_cast<RawTypedData*>(*NativeFieldsAddr()); 5998 reinterpret_cast<RawTypedData*>(*NativeFieldsAddr());
5999 if (native_fields == TypedData::null()) { 5999 if (native_fields == TypedData::null()) {
6000 return 0; 6000 return 0;
6001 } 6001 }
6002 return *(reinterpret_cast<intptr_t*>(native_fields->ptr()->data_) + index); 6002 return reinterpret_cast<intptr_t*>(native_fields->ptr()->data_)[index];
6003 } 6003 }
6004 6004
6005 6005
6006 bool String::Equals(const String& str) const { 6006 bool String::Equals(const String& str) const {
6007 if (raw() == str.raw()) { 6007 if (raw() == str.raw()) {
6008 return true; // Both handles point to the same raw instance. 6008 return true; // Both handles point to the same raw instance.
6009 } 6009 }
6010 if (str.IsNull()) { 6010 if (str.IsNull()) {
6011 return false; 6011 return false;
6012 } 6012 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
6048 6048
6049 6049
6050 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6050 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6051 intptr_t index) { 6051 intptr_t index) {
6052 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6052 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6053 } 6053 }
6054 6054
6055 } // namespace dart 6055 } // namespace dart
6056 6056
6057 #endif // VM_OBJECT_H_ 6057 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698