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

Unified Diff: runtime/vm/intermediate_language.h

Issue 12212050: Fix allocation of array tables (use store barrier if needed, store values directly instead of via s… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 18412)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -3010,16 +3010,13 @@
class CreateArrayInstr : public TemplateDefinition<1> {
public:
CreateArrayInstr(intptr_t token_pos,
- ZoneGrowableArray<PushArgumentInstr*>* arguments,
+ intptr_t num_elements,
const AbstractType& type,
Value* element_type)
: token_pos_(token_pos),
- arguments_(arguments),
+ num_elements_(num_elements),
type_(type) {
#if defined(DEBUG)
- for (int i = 0; i < ArgumentCount(); ++i) {
- ASSERT(ArgumentAt(i) != NULL);
- }
ASSERT(element_type != NULL);
ASSERT(type_.IsZoneHandle());
ASSERT(!type_.IsNull());
@@ -3031,10 +3028,9 @@
DECLARE_INSTRUCTION(CreateArray)
virtual RawAbstractType* CompileType() const;
- virtual intptr_t ArgumentCount() const { return arguments_->length(); }
+ intptr_t num_elements() const { return num_elements_; }
intptr_t token_pos() const { return token_pos_; }
- PushArgumentInstr* ArgumentAt(intptr_t i) const { return (*arguments_)[i]; }
const AbstractType& type() const { return type_; }
Value* element_type() const { return inputs_[0]; }
@@ -3044,11 +3040,11 @@
virtual bool HasSideEffect() const { return true; }
- virtual intptr_t ResultCid() const { return kArrayCid; }
+ virtual intptr_t ResultCid() const;
private:
const intptr_t token_pos_;
- ZoneGrowableArray<PushArgumentInstr*>* const arguments_;
+ const intptr_t num_elements_;
const AbstractType& type_;
DISALLOW_COPY_AND_ASSIGN(CreateArrayInstr);

Powered by Google App Engine
This is Rietveld 408576698