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

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

Issue 10594002: More ICData cleanups: try to use ICData instead of converting it to another intermediate representa… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/intermediate_language_x64.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 2539 matching lines...) Expand 10 before | Expand all | Expand 10 after
2550 2550
2551 static intptr_t ic_data_offset() { 2551 static intptr_t ic_data_offset() {
2552 return OFFSET_OF(RawICData, ic_data_); 2552 return OFFSET_OF(RawICData, ic_data_);
2553 } 2553 }
2554 2554
2555 static intptr_t function_offset() { 2555 static intptr_t function_offset() {
2556 return OFFSET_OF(RawICData, function_); 2556 return OFFSET_OF(RawICData, function_);
2557 } 2557 }
2558 2558
2559 // Adds one more class test to ICData. Length of 'classes' must be equal to 2559 // Adds one more class test to ICData. Length of 'classes' must be equal to
2560 // the number of arguments tested. 2560 // the number of arguments tested. Use only for number_of_checks > 1.
2561 void AddCheck(const GrowableArray<intptr_t>& class_ids, 2561 void AddCheck(const GrowableArray<intptr_t>& class_ids,
2562 const Function& target) const; 2562 const Function& target) const;
2563 // Adds sorted so that Smi is the first class-id. Use only for
2564 // number_of_checks == 1.
2565 void AddReceiverCheck(intptr_t receiver_class_id,
2566 const Function& target) const;
2563 void GetCheckAt(intptr_t index, 2567 void GetCheckAt(intptr_t index,
2564 GrowableArray<intptr_t>* class_ids, 2568 GrowableArray<intptr_t>* class_ids,
2565 Function* target) const; 2569 Function* target) const;
2566 void GetOneClassCheckAt( 2570 void GetOneClassCheckAt(
2567 int index, intptr_t* class_id, Function* target) const; 2571 int index, intptr_t* class_id, Function* target) const;
2568 2572
2573 intptr_t GetReceiverClassIdAt(intptr_t index) const;
2574 RawFunction* GetTargetAt(intptr_t index) const;
2575
2569 static RawICData* New(const Function& caller_function, 2576 static RawICData* New(const Function& caller_function,
2570 const String& target_name, 2577 const String& target_name,
2571 intptr_t id, 2578 intptr_t id,
2572 intptr_t num_args_tested); 2579 intptr_t num_args_tested);
2573 2580
2574 private: 2581 private:
2575 RawArray* ic_data() const { 2582 RawArray* ic_data() const {
2576 return raw_ptr()->ic_data_; 2583 return raw_ptr()->ic_data_;
2577 } 2584 }
2578 2585
(...skipping 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after
5039 } 5046 }
5040 5047
5041 5048
5042 intptr_t Stackmap::SizeInBits() const { 5049 intptr_t Stackmap::SizeInBits() const {
5043 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); 5050 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte);
5044 } 5051 }
5045 5052
5046 } // namespace dart 5053 } // namespace dart
5047 5054
5048 #endif // VM_OBJECT_H_ 5055 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698