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

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

Issue 1400193003: Don't assume at least one closure function is encountered before tree-shaking. Allow… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
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 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 void AddFunction(const Function& function) const; 1176 void AddFunction(const Function& function) const;
1177 void RemoveFunction(const Function& function) const; 1177 void RemoveFunction(const Function& function) const;
1178 intptr_t FindFunctionIndex(const Function& function) const; 1178 intptr_t FindFunctionIndex(const Function& function) const;
1179 RawFunction* FunctionFromIndex(intptr_t idx) const; 1179 RawFunction* FunctionFromIndex(intptr_t idx) const;
1180 intptr_t FindImplicitClosureFunctionIndex(const Function& needle) const; 1180 intptr_t FindImplicitClosureFunctionIndex(const Function& needle) const;
1181 RawFunction* ImplicitClosureFunctionFromIndex(intptr_t idx) const; 1181 RawFunction* ImplicitClosureFunctionFromIndex(intptr_t idx) const;
1182 1182
1183 RawGrowableObjectArray* closures() const { 1183 RawGrowableObjectArray* closures() const {
1184 return raw_ptr()->closure_functions_; 1184 return raw_ptr()->closure_functions_;
1185 } 1185 }
1186 void set_closures(const GrowableObjectArray& value) const;
1186 void AddClosureFunction(const Function& function) const; 1187 void AddClosureFunction(const Function& function) const;
1187 RawFunction* LookupClosureFunction(intptr_t token_pos) const; 1188 RawFunction* LookupClosureFunction(intptr_t token_pos) const;
1188 intptr_t FindClosureIndex(const Function& function) const; 1189 intptr_t FindClosureIndex(const Function& function) const;
1189 RawFunction* ClosureFunctionFromIndex(intptr_t idx) const; 1190 RawFunction* ClosureFunctionFromIndex(intptr_t idx) const;
1190 1191
1191 RawFunction* LookupDynamicFunction(const String& name) const; 1192 RawFunction* LookupDynamicFunction(const String& name) const;
1192 RawFunction* LookupDynamicFunctionAllowPrivate(const String& name) const; 1193 RawFunction* LookupDynamicFunctionAllowPrivate(const String& name) const;
1193 RawFunction* LookupStaticFunction(const String& name) const; 1194 RawFunction* LookupStaticFunction(const String& name) const;
1194 RawFunction* LookupStaticFunctionAllowPrivate(const String& name) const; 1195 RawFunction* LookupStaticFunctionAllowPrivate(const String& name) const;
1195 RawFunction* LookupConstructor(const String& name) const; 1196 RawFunction* LookupConstructor(const String& name) const;
(...skipping 6964 matching lines...) Expand 10 before | Expand all | Expand 10 after
8160 8161
8161 8162
8162 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8163 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8163 intptr_t index) { 8164 intptr_t index) {
8164 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8165 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8165 } 8166 }
8166 8167
8167 } // namespace dart 8168 } // namespace dart
8168 8169
8169 #endif // VM_OBJECT_H_ 8170 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698