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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10080015: Implement checked mode in new compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/stub_code_ia32.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 6541)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -28,6 +28,7 @@
#define FOR_EACH_COMPUTATION(M) \
FOR_EACH_VALUE(M) \
M(AssertAssignable, AssertAssignableComp) \
+ M(AssertBoolean, AssertBooleanComp) \
M(CurrentContext, CurrentContextComp) \
M(StoreContext, StoreContextComp) \
M(ClosureCall, ClosureCallComp) \
@@ -137,22 +138,78 @@
class AssertAssignableComp : public Computation {
public:
- AssertAssignableComp(Value* value, const AbstractType& type)
- : value_(value), type_(type) { }
+ AssertAssignableComp(intptr_t node_id,
+ intptr_t token_index,
+ intptr_t try_index,
+ Value* value,
+ Value* type_arguments, // Can be NULL.
+ const AbstractType& dst_type,
+ const String& dst_name)
+ : node_id_(node_id),
+ token_index_(token_index),
+ try_index_(try_index),
+ value_(value),
+ type_arguments_(type_arguments),
+ dst_type_(dst_type),
+ dst_name_(dst_name) {
+ ASSERT(value_ != NULL);
+ ASSERT(!dst_type.IsNull());
+ ASSERT(!dst_name.IsNull());
+ }
DECLARE_COMPUTATION(AssertAssignable)
+ intptr_t node_id() const { return node_id_; }
+ intptr_t token_index() const { return token_index_; }
+ intptr_t try_index() const { return try_index_; }
Value* value() const { return value_; }
- const AbstractType& type() const { return type_; }
+ Value* type_arguments() const { return type_arguments_; }
+ const AbstractType& dst_type() const { return dst_type_; }
+ const String& dst_name() const { return dst_name_; }
private:
+ const intptr_t node_id_;
+ const intptr_t token_index_;
+ const intptr_t try_index_;
Value* value_;
- const AbstractType& type_;
+ Value* type_arguments_;
+ const AbstractType& dst_type_;
+ const String& dst_name_;
DISALLOW_COPY_AND_ASSIGN(AssertAssignableComp);
};
+class AssertBooleanComp : public Computation {
+ public:
+ AssertBooleanComp(intptr_t node_id,
+ intptr_t token_index,
+ intptr_t try_index,
+ Value* value)
+ : node_id_(node_id),
+ token_index_(token_index),
+ try_index_(try_index),
+ value_(value) {
+ ASSERT(value_ != NULL);
+ }
+
+ DECLARE_COMPUTATION(AssertBoolean)
+
+ intptr_t node_id() const { return node_id_; }
+ intptr_t token_index() const { return token_index_; }
+ intptr_t try_index() const { return try_index_; }
+ Value* value() const { return value_; }
+
+ private:
+ const intptr_t node_id_;
+ const intptr_t token_index_;
+ const intptr_t try_index_;
+ Value* value_;
+
+ DISALLOW_COPY_AND_ASSIGN(AssertBooleanComp);
+};
+
+
// Denotes the current context, normally held in a register. This is
// a computation, not a value, because it's mutable.
class CurrentContextComp : public Computation {
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698