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

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

Issue 2997993002: Revert "Reapply "Eliminate dependencies on assemblers and code stubs in precompiled runtime."" (Closed)
Patch Set: Created 3 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
« no previous file with comments | « runtime/vm/megamorphic_cache_table.cc ('k') | 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 RUNTIME_VM_OBJECT_H_ 5 #ifndef RUNTIME_VM_OBJECT_H_
6 #define RUNTIME_VM_OBJECT_H_ 6 #define RUNTIME_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 4942 matching lines...) Expand 10 before | Expand all | Expand 10 after
4953 static const intptr_t kMaxElements = kSmiMax / kBytesPerElement; 4953 static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
4954 4954
4955 static intptr_t InstanceSize() { 4955 static intptr_t InstanceSize() {
4956 ASSERT(sizeof(RawCode) == OFFSET_OF_RETURNED_VALUE(RawCode, data)); 4956 ASSERT(sizeof(RawCode) == OFFSET_OF_RETURNED_VALUE(RawCode, data));
4957 return 0; 4957 return 0;
4958 } 4958 }
4959 static intptr_t InstanceSize(intptr_t len) { 4959 static intptr_t InstanceSize(intptr_t len) {
4960 ASSERT(0 <= len && len <= kMaxElements); 4960 ASSERT(0 <= len && len <= kMaxElements);
4961 return RoundedAllocationSize(sizeof(RawCode) + (len * kBytesPerElement)); 4961 return RoundedAllocationSize(sizeof(RawCode) + (len * kBytesPerElement));
4962 } 4962 }
4963 #if !defined(DART_PRECOMPILED_RUNTIME)
4964 static RawCode* FinalizeCode(const Function& function, 4963 static RawCode* FinalizeCode(const Function& function,
4965 Assembler* assembler, 4964 Assembler* assembler,
4966 bool optimized = false); 4965 bool optimized = false);
4967 static RawCode* FinalizeCode(const char* name, 4966 static RawCode* FinalizeCode(const char* name,
4968 Assembler* assembler, 4967 Assembler* assembler,
4969 bool optimized); 4968 bool optimized);
4970 #endif
4971 static RawCode* LookupCode(uword pc); 4969 static RawCode* LookupCode(uword pc);
4972 static RawCode* LookupCodeInVmIsolate(uword pc); 4970 static RawCode* LookupCodeInVmIsolate(uword pc);
4973 static RawCode* FindCode(uword pc, int64_t timestamp); 4971 static RawCode* FindCode(uword pc, int64_t timestamp);
4974 4972
4975 int32_t GetPointerOffsetAt(int index) const { 4973 int32_t GetPointerOffsetAt(int index) const {
4976 NoSafepointScope no_safepoint; 4974 NoSafepointScope no_safepoint;
4977 return *PointerOffsetAddrAt(index); 4975 return *PointerOffsetAddrAt(index);
4978 } 4976 }
4979 TokenPosition GetTokenIndexOfPC(uword pc) const; 4977 TokenPosition GetTokenIndexOfPC(uword pc) const;
4980 4978
(...skipping 4025 matching lines...) Expand 10 before | Expand all | Expand 10 after
9006 9004
9007 inline void TypeArguments::SetHash(intptr_t value) const { 9005 inline void TypeArguments::SetHash(intptr_t value) const {
9008 // This is only safe because we create a new Smi, which does not cause 9006 // This is only safe because we create a new Smi, which does not cause
9009 // heap allocation. 9007 // heap allocation.
9010 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); 9008 StoreSmi(&raw_ptr()->hash_, Smi::New(value));
9011 } 9009 }
9012 9010
9013 } // namespace dart 9011 } // namespace dart
9014 9012
9015 #endif // RUNTIME_VM_OBJECT_H_ 9013 #endif // RUNTIME_VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/megamorphic_cache_table.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698