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

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

Issue 17571010: Reland: Optimizing noSuchMethod invocation with no arguments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/mirrors_api_impl.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 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 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 RawCode* closure_allocation_stub() const; 1388 RawCode* closure_allocation_stub() const;
1389 void set_closure_allocation_stub(const Code& value) const; 1389 void set_closure_allocation_stub(const Code& value) const;
1390 1390
1391 void set_extracted_method_closure(const Function& function) const; 1391 void set_extracted_method_closure(const Function& function) const;
1392 RawFunction* extracted_method_closure() const; 1392 RawFunction* extracted_method_closure() const;
1393 1393
1394 bool IsMethodExtractor() const { 1394 bool IsMethodExtractor() const {
1395 return kind() == RawFunction::kMethodExtractor; 1395 return kind() == RawFunction::kMethodExtractor;
1396 } 1396 }
1397 1397
1398 bool IsNoSuchMethodDispatcher() const {
1399 return kind() == RawFunction::kNoSuchMethodDispatcher;
1400 }
1401
1398 // Returns true iff an implicit closure function has been created 1402 // Returns true iff an implicit closure function has been created
1399 // for this function. 1403 // for this function.
1400 bool HasImplicitClosureFunction() const { 1404 bool HasImplicitClosureFunction() const {
1401 return implicit_closure_function() != null(); 1405 return implicit_closure_function() != null();
1402 } 1406 }
1403 1407
1404 // Return the closure function implicitly created for this function. 1408 // Return the closure function implicitly created for this function.
1405 // If none exists yet, create one and remember it. 1409 // If none exists yet, create one and remember it.
1406 RawFunction* ImplicitClosureFunction() const; 1410 RawFunction* ImplicitClosureFunction() const;
1407 1411
(...skipping 24 matching lines...) Expand all
1432 if (is_static() || is_abstract()) { 1436 if (is_static() || is_abstract()) {
1433 return false; 1437 return false;
1434 } 1438 }
1435 switch (kind()) { 1439 switch (kind()) {
1436 case RawFunction::kRegularFunction: 1440 case RawFunction::kRegularFunction:
1437 case RawFunction::kGetterFunction: 1441 case RawFunction::kGetterFunction:
1438 case RawFunction::kSetterFunction: 1442 case RawFunction::kSetterFunction:
1439 case RawFunction::kImplicitGetter: 1443 case RawFunction::kImplicitGetter:
1440 case RawFunction::kImplicitSetter: 1444 case RawFunction::kImplicitSetter:
1441 case RawFunction::kMethodExtractor: 1445 case RawFunction::kMethodExtractor:
1446 case RawFunction::kNoSuchMethodDispatcher:
1442 return true; 1447 return true;
1443 case RawFunction::kClosureFunction: 1448 case RawFunction::kClosureFunction:
1444 case RawFunction::kConstructor: 1449 case RawFunction::kConstructor:
1445 case RawFunction::kConstImplicitGetter: 1450 case RawFunction::kConstImplicitGetter:
1446 return false; 1451 return false;
1447 default: 1452 default:
1448 UNREACHABLE(); 1453 UNREACHABLE();
1449 return false; 1454 return false;
1450 } 1455 }
1451 } 1456 }
(...skipping 4479 matching lines...) Expand 10 before | Expand all | Expand 10 after
5931 5936
5932 5937
5933 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 5938 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
5934 intptr_t index) { 5939 intptr_t index) {
5935 return array.At((index * kEntryLength) + kTargetFunctionIndex); 5940 return array.At((index * kEntryLength) + kTargetFunctionIndex);
5936 } 5941 }
5937 5942
5938 } // namespace dart 5943 } // namespace dart
5939 5944
5940 #endif // VM_OBJECT_H_ 5945 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/mirrors_api_impl.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698