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

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

Issue 13653005: Prevent expensive and unnecessary error formatting in the case a bound check is (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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/class_finalizer.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 3663 matching lines...) Expand 10 before | Expand all | Expand 10 after
3674 virtual bool IsResolved() const { return true; } 3674 virtual bool IsResolved() const { return true; }
3675 virtual bool HasResolvedTypeClass() const { return false; } 3675 virtual bool HasResolvedTypeClass() const { return false; }
3676 RawClass* parameterized_class() const { 3676 RawClass* parameterized_class() const {
3677 return raw_ptr()->parameterized_class_; 3677 return raw_ptr()->parameterized_class_;
3678 } 3678 }
3679 RawString* name() const { return raw_ptr()->name_; } 3679 RawString* name() const { return raw_ptr()->name_; }
3680 intptr_t index() const { return raw_ptr()->index_; } 3680 intptr_t index() const { return raw_ptr()->index_; }
3681 void set_index(intptr_t value) const; 3681 void set_index(intptr_t value) const;
3682 RawAbstractType* bound() const { return raw_ptr()->bound_; } 3682 RawAbstractType* bound() const { return raw_ptr()->bound_; }
3683 void set_bound(const AbstractType& value) const; 3683 void set_bound(const AbstractType& value) const;
3684 void CheckBound(const AbstractType& bounded_type, 3684 // Returns true if bounded_type is below upper_bound, otherwise return false
3685 // and set malformed_error if not NULL.
3686 bool CheckBound(const AbstractType& bounded_type,
3685 const AbstractType& upper_bound, 3687 const AbstractType& upper_bound,
3686 Error* malformed_error) const; 3688 Error* malformed_error) const;
3687 virtual intptr_t token_pos() const { return raw_ptr()->token_pos_; } 3689 virtual intptr_t token_pos() const { return raw_ptr()->token_pos_; }
3688 virtual bool IsInstantiated() const { return false; } 3690 virtual bool IsInstantiated() const { return false; }
3689 virtual bool Equals(const Instance& other) const; 3691 virtual bool Equals(const Instance& other) const;
3690 virtual RawAbstractType* InstantiateFrom( 3692 virtual RawAbstractType* InstantiateFrom(
3691 const AbstractTypeArguments& instantiator_type_arguments, 3693 const AbstractTypeArguments& instantiator_type_arguments,
3692 Error* malformed_error) const; 3694 Error* malformed_error) const;
3693 virtual RawAbstractType* Canonicalize() const { return raw(); } 3695 virtual RawAbstractType* Canonicalize() const { return raw(); }
3694 3696
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after
5567 5569
5568 5570
5569 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 5571 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
5570 intptr_t index) { 5572 intptr_t index) {
5571 return array.At((index * kEntryLength) + kTargetFunctionIndex); 5573 return array.At((index * kEntryLength) + kTargetFunctionIndex);
5572 } 5574 }
5573 5575
5574 } // namespace dart 5576 } // namespace dart
5575 5577
5576 #endif // VM_OBJECT_H_ 5578 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698