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

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

Issue 11642003: Create and cache method extraction stub in the ICData. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: lazyly inject extractors as getters into class Created 7 years, 11 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/parser.cc ('k') | runtime/vm/resolver.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_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 enum Kind { 533 enum Kind {
534 kRegularFunction, 534 kRegularFunction,
535 kClosureFunction, 535 kClosureFunction,
536 kSignatureFunction, // represents a signature only without actual code. 536 kSignatureFunction, // represents a signature only without actual code.
537 kGetterFunction, // represents getter functions e.g: get foo() { .. }. 537 kGetterFunction, // represents getter functions e.g: get foo() { .. }.
538 kSetterFunction, // represents setter functions e.g: set foo(..) { .. }. 538 kSetterFunction, // represents setter functions e.g: set foo(..) { .. }.
539 kConstructor, 539 kConstructor,
540 kImplicitGetter, // represents an implicit getter for fields. 540 kImplicitGetter, // represents an implicit getter for fields.
541 kImplicitSetter, // represents an implicit setter for fields. 541 kImplicitSetter, // represents an implicit setter for fields.
542 kConstImplicitGetter, // represents an implicit const getter for fields. 542 kConstImplicitGetter, // represents an implicit const getter for fields.
543 kMethodExtractor, // converts method into implicit closure on the receiver.
543 }; 544 };
544 545
545 private: 546 private:
546 RAW_HEAP_OBJECT_IMPLEMENTATION(Function); 547 RAW_HEAP_OBJECT_IMPLEMENTATION(Function);
547 548
548 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 549 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
549 RawString* name_; 550 RawString* name_;
550 RawObject* owner_; // Class or patch class where this function was defined. 551 RawObject* owner_; // Class or patch class where this function was defined.
551 RawAbstractType* result_type_; 552 RawAbstractType* result_type_;
552 RawArray* parameter_types_; 553 RawArray* parameter_types_;
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 && 1689 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 &&
1689 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 9 && 1690 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 9 &&
1690 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 10 && 1691 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 10 &&
1691 kStacktraceCid == kExternalInt8ArrayCid + 11); 1692 kStacktraceCid == kExternalInt8ArrayCid + 11);
1692 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid); 1693 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid);
1693 } 1694 }
1694 1695
1695 } // namespace dart 1696 } // namespace dart
1696 1697
1697 #endif // VM_RAW_OBJECT_H_ 1698 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698