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

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
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_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 18461)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -3003,16 +3003,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());
@@ -3024,10 +3021,9 @@
DECLARE_INSTRUCTION(CreateArray)
virtual CompileType* ComputeInitialType() 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]; }
@@ -3039,7 +3035,7 @@
private:
const intptr_t token_pos_;
- ZoneGrowableArray<PushArgumentInstr*>* const arguments_;
+ const intptr_t num_elements_;
const AbstractType& type_;
DISALLOW_COPY_AND_ASSIGN(CreateArrayInstr);
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698