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

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

Issue 583663002: Version 1.7.0-dev.3.1 . (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 3 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 | runtime/vm/object.cc » ('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 #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 2860 matching lines...) Expand 10 before | Expand all | Expand 10 after
2871 return raw_ptr()->is_dart_scheme_; 2871 return raw_ptr()->is_dart_scheme_;
2872 } 2872 }
2873 void set_is_dart_scheme(bool value) const { 2873 void set_is_dart_scheme(bool value) const {
2874 raw_ptr()->is_dart_scheme_ = value; 2874 raw_ptr()->is_dart_scheme_ = value;
2875 } 2875 }
2876 2876
2877 bool IsCoreLibrary() const { 2877 bool IsCoreLibrary() const {
2878 return raw() == CoreLibrary(); 2878 return raw() == CoreLibrary();
2879 } 2879 }
2880 2880
2881 inline intptr_t UrlHash() const;
2882
2881 static RawLibrary* LookupLibrary(const String& url); 2883 static RawLibrary* LookupLibrary(const String& url);
2882 static RawLibrary* GetLibrary(intptr_t index); 2884 static RawLibrary* GetLibrary(intptr_t index);
2883 2885
2884 static void InitCoreLibrary(Isolate* isolate); 2886 static void InitCoreLibrary(Isolate* isolate);
2885 static void InitNativeWrappersLibrary(Isolate* isolate); 2887 static void InitNativeWrappersLibrary(Isolate* isolate);
2886 2888
2887 static RawLibrary* AsyncLibrary(); 2889 static RawLibrary* AsyncLibrary();
2888 static RawLibrary* ConvertLibrary(); 2890 static RawLibrary* ConvertLibrary();
2889 static RawLibrary* CoreLibrary(); 2891 static RawLibrary* CoreLibrary();
2890 static RawLibrary* CollectionLibrary(); 2892 static RawLibrary* CollectionLibrary();
(...skipping 4539 matching lines...) Expand 10 before | Expand all | Expand 10 after
7430 } 7432 }
7431 for (intptr_t i = 0; i < len; i++) { 7433 for (intptr_t i = 0; i < len; i++) {
7432 if (this->CharAt(i) != str.CharAt(begin_index + i)) { 7434 if (this->CharAt(i) != str.CharAt(begin_index + i)) {
7433 return false; 7435 return false;
7434 } 7436 }
7435 } 7437 }
7436 return true; 7438 return true;
7437 } 7439 }
7438 7440
7439 7441
7442 intptr_t Library::UrlHash() const {
7443 intptr_t result = Smi::Value(url()->ptr()->hash_);
7444 ASSERT(result != 0);
7445 return result;
7446 }
7447
7448
7440 void MegamorphicCache::SetEntry(const Array& array, 7449 void MegamorphicCache::SetEntry(const Array& array,
7441 intptr_t index, 7450 intptr_t index,
7442 const Smi& class_id, 7451 const Smi& class_id,
7443 const Function& target) { 7452 const Function& target) {
7444 array.SetAt((index * kEntryLength) + kClassIdIndex, class_id); 7453 array.SetAt((index * kEntryLength) + kClassIdIndex, class_id);
7445 array.SetAt((index * kEntryLength) + kTargetFunctionIndex, target); 7454 array.SetAt((index * kEntryLength) + kTargetFunctionIndex, target);
7446 } 7455 }
7447 7456
7448 7457
7449 RawObject* MegamorphicCache::GetClassId(const Array& array, intptr_t index) { 7458 RawObject* MegamorphicCache::GetClassId(const Array& array, intptr_t index) {
7450 return array.At((index * kEntryLength) + kClassIdIndex); 7459 return array.At((index * kEntryLength) + kClassIdIndex);
7451 } 7460 }
7452 7461
7453 7462
7454 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7463 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7455 intptr_t index) { 7464 intptr_t index) {
7456 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7465 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7457 } 7466 }
7458 7467
7459 } // namespace dart 7468 } // namespace dart
7460 7469
7461 #endif // VM_OBJECT_H_ 7470 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698