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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10398046: Move code for accessing captured variables into the IL. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 7672)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -53,6 +53,7 @@
M(AllocateObject, AllocateObjectComp) \
M(AllocateObjectWithBoundsCheck, AllocateObjectWithBoundsCheckComp) \
M(NativeLoadField, NativeLoadFieldComp) \
+ M(NativeStoreField, NativeStoreFieldComp) \
M(InstantiateTypeArguments, InstantiateTypeArgumentsComp) \
M(ExtractConstructorTypeArguments, ExtractConstructorTypeArgumentsComp) \
M(ExtractConstructorInstantiator, ExtractConstructorInstantiatorComp) \
@@ -928,12 +929,34 @@
intptr_t offset_in_bytes() const { return offset_in_bytes_; }
private:
- intptr_t offset_in_bytes_;
+ const intptr_t offset_in_bytes_;
DISALLOW_COPY_AND_ASSIGN(NativeLoadFieldComp);
};
+class NativeStoreFieldComp : public TemplateComputation<2> {
+ public:
+ NativeStoreFieldComp(Value* dest, intptr_t offset_in_bytes, Value* value)
+ : offset_in_bytes_(offset_in_bytes) {
+ ASSERT(value != NULL);
+ inputs_[0] = dest;
+ inputs_[1] = value;
+ }
+
+ DECLARE_COMPUTATION(NativeStoreField)
+
+ Value* dest() { return inputs_[0]; }
+ Value* value() { return inputs_[1]; }
+ intptr_t offset_in_bytes() const { return offset_in_bytes_; }
+
+ private:
+ const intptr_t offset_in_bytes_;
+
+ DISALLOW_COPY_AND_ASSIGN(NativeStoreFieldComp);
+};
+
+
class InstantiateTypeArgumentsComp : public TemplateComputation<1> {
public:
InstantiateTypeArgumentsComp(intptr_t token_index,
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698