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

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

Issue 1149943009: Shrink some fields and add some bounds checks. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | runtime/vm/raw_object.h » ('j') | runtime/vm/raw_object.h » ('J')
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 4697 matching lines...) Expand 10 before | Expand all | Expand 10 after
4708 friend class TypedDataView; 4708 friend class TypedDataView;
4709 }; 4709 };
4710 4710
4711 4711
4712 class LibraryPrefix : public Instance { 4712 class LibraryPrefix : public Instance {
4713 public: 4713 public:
4714 RawString* name() const { return raw_ptr()->name_; } 4714 RawString* name() const { return raw_ptr()->name_; }
4715 virtual RawString* DictionaryName() const { return name(); } 4715 virtual RawString* DictionaryName() const { return name(); }
4716 4716
4717 RawArray* imports() const { return raw_ptr()->imports_; } 4717 RawArray* imports() const { return raw_ptr()->imports_; }
4718 int32_t num_imports() const { return raw_ptr()->num_imports_; } 4718 intptr_t num_imports() const { return raw_ptr()->num_imports_; }
4719 RawLibrary* importer() const { return raw_ptr()->importer_; } 4719 RawLibrary* importer() const { return raw_ptr()->importer_; }
4720 4720
4721 RawInstance* LoadError() const; 4721 RawInstance* LoadError() const;
4722 4722
4723 bool ContainsLibrary(const Library& library) const; 4723 bool ContainsLibrary(const Library& library) const;
4724 RawLibrary* GetLibrary(int index) const; 4724 RawLibrary* GetLibrary(int index) const;
4725 void AddImport(const Namespace& import) const; 4725 void AddImport(const Namespace& import) const;
4726 RawObject* LookupObject(const String& name) const; 4726 RawObject* LookupObject(const String& name) const;
4727 RawClass* LookupClass(const String& class_name) const; 4727 RawClass* LookupClass(const String& class_name) const;
4728 4728
(...skipping 3060 matching lines...) Expand 10 before | Expand all | Expand 10 after
7789 7789
7790 7790
7791 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7791 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7792 intptr_t index) { 7792 intptr_t index) {
7793 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7793 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7794 } 7794 }
7795 7795
7796 } // namespace dart 7796 } // namespace dart
7797 7797
7798 #endif // VM_OBJECT_H_ 7798 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/raw_object.h » ('j') | runtime/vm/raw_object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698