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

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

Issue 1854243002: VM: Evaluate-in-frame should happen in the scope of the method class, not the receiver class. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
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 5172 matching lines...) Expand 10 before | Expand all | Expand 10 after
5183 // If the instance is a callable object, i.e. a closure or the instance of a 5183 // If the instance is a callable object, i.e. a closure or the instance of a
5184 // class implementing a 'call' method, return true and set the function 5184 // class implementing a 'call' method, return true and set the function
5185 // (if not NULL) to call. 5185 // (if not NULL) to call.
5186 bool IsCallable(Function* function) const; 5186 bool IsCallable(Function* function) const;
5187 5187
5188 // Evaluate the given expression as if it appeared in an instance 5188 // Evaluate the given expression as if it appeared in an instance
5189 // method of this instance and return the resulting value, or an 5189 // method of this instance and return the resulting value, or an
5190 // error object if evaluating the expression fails. The method has 5190 // error object if evaluating the expression fails. The method has
5191 // the formal parameters given in param_names, and is invoked with 5191 // the formal parameters given in param_names, and is invoked with
5192 // the argument values given in param_values. 5192 // the argument values given in param_values.
5193 RawObject* Evaluate(const String& expr, 5193 RawObject* Evaluate(const Class& method_cls,
5194 const String& expr,
5194 const Array& param_names, 5195 const Array& param_names,
5195 const Array& param_values) const; 5196 const Array& param_values) const;
5196 5197
5197 // Equivalent to invoking hashCode on this instance. 5198 // Equivalent to invoking hashCode on this instance.
5198 virtual RawObject* HashCode() const; 5199 virtual RawObject* HashCode() const;
5199 5200
5200 static intptr_t InstanceSize() { 5201 static intptr_t InstanceSize() {
5201 return RoundedAllocationSize(sizeof(RawInstance)); 5202 return RoundedAllocationSize(sizeof(RawInstance));
5202 } 5203 }
5203 5204
(...skipping 3219 matching lines...) Expand 10 before | Expand all | Expand 10 after
8423 8424
8424 8425
8425 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8426 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8426 intptr_t index) { 8427 intptr_t index) {
8427 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8428 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8428 } 8429 }
8429 8430
8430 } // namespace dart 8431 } // namespace dart
8431 8432
8432 #endif // VM_OBJECT_H_ 8433 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698