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

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

Issue 10581006: Replace class with class ids inside ICData (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
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 2480 matching lines...) Expand 10 before | Expand all | Expand 10 after
2491 } 2491 }
2492 2492
2493 static intptr_t ic_data_offset() { 2493 static intptr_t ic_data_offset() {
2494 return OFFSET_OF(RawICData, ic_data_); 2494 return OFFSET_OF(RawICData, ic_data_);
2495 } 2495 }
2496 2496
2497 static intptr_t function_offset() { 2497 static intptr_t function_offset() {
2498 return OFFSET_OF(RawICData, function_); 2498 return OFFSET_OF(RawICData, function_);
2499 } 2499 }
2500 2500
2501 void AddCheck(const GrowableArray<const Class*>& classes, 2501 // Adds one more class test to ICData. Length of 'classes' must be equal to
2502 // the number of arguments tested.
2503 void AddCheck(const GrowableArray<intptr_t>& class_ids,
2502 const Function& target) const; 2504 const Function& target) const;
2503 void GetCheckAt(intptr_t index, 2505 void GetCheckAt(intptr_t index,
2504 GrowableArray<const Class*>* classes, 2506 GrowableArray<intptr_t>* class_ids,
2505 Function* target) const; 2507 Function* target) const;
2506 void GetOneClassCheckAt(int index, Class* cls, Function* target) const; 2508 void GetOneClassCheckAt(
2509 int index, intptr_t* class_id, Function* target) const;
2507 2510
2508 static RawICData* New(const Function& caller_function, 2511 static RawICData* New(const Function& caller_function,
2509 const String& target_name, 2512 const String& target_name,
2510 intptr_t id, 2513 intptr_t id,
2511 intptr_t num_args_tested); 2514 intptr_t num_args_tested);
2512 2515
2513 private: 2516 private:
2514 RawArray* ic_data() const { 2517 RawArray* ic_data() const {
2515 return raw_ptr()->ic_data_; 2518 return raw_ptr()->ic_data_;
2516 } 2519 }
(...skipping 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after
4978 } 4981 }
4979 4982
4980 4983
4981 intptr_t Stackmap::SizeInBits() const { 4984 intptr_t Stackmap::SizeInBits() const {
4982 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); 4985 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte);
4983 } 4986 }
4984 4987
4985 } // namespace dart 4988 } // namespace dart
4986 4989
4987 #endif // VM_OBJECT_H_ 4990 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698