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

Unified Diff: runtime/vm/intermediate_language.h

Issue 346823003: VM: Optimized context allocation on all platforms. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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') | runtime/vm/intermediate_language_arm.cc » ('j') | 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 38897)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -715,6 +715,7 @@
M(InstantiateType) \
M(InstantiateTypeArguments) \
M(AllocateContext) \
+ M(AllocateUninitializedContext) \
M(CloneContext) \
M(BinarySmiOp) \
M(UnarySmiOp) \
@@ -4965,6 +4966,35 @@
};
+class AllocateUninitializedContextInstr : public TemplateDefinition<0> {
+ public:
+ AllocateUninitializedContextInstr(intptr_t token_pos,
+ intptr_t num_context_variables)
+ : token_pos_(token_pos),
+ num_context_variables_(num_context_variables) {}
+
+ DECLARE_INSTRUCTION(AllocateUninitializedContext)
+ virtual CompileType ComputeType() const;
+
+ virtual intptr_t token_pos() const { return token_pos_; }
+ intptr_t num_context_variables() const { return num_context_variables_; }
+
+ virtual void PrintOperandsTo(BufferFormatter* f) const;
+
+ virtual bool CanDeoptimize() const { return false; }
+
+ virtual EffectSet Effects() const { return EffectSet::None(); }
+
+ virtual bool MayThrow() const { return false; }
+
+ private:
+ const intptr_t token_pos_;
+ const intptr_t num_context_variables_;
+
+ DISALLOW_COPY_AND_ASSIGN(AllocateUninitializedContextInstr);
+};
+
+
class CloneContextInstr : public TemplateDefinition<1> {
public:
CloneContextInstr(intptr_t token_pos, Value* context_value)
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698