Handle<JSObject> prototype =
Handle<JSObject>(
JSObject::cast(global_context()->object_function()->prototype()));
+
Handle<JSFunction> function =
- Factory::NewFunctionWithPrototype(symbol, JS_OBJECT_TYPE,
- JSObject::kHeaderSize, prototype,
- code, true);
+ Factory::NewFunctionWithPrototype(symbol,
+ JS_OBJECT_TYPE,
+ JSObject::kHeaderSize,
+ prototype,
+ code,
+ false);
+ ASSERT(!function->has_initial_map());
function->shared()->set_instance_class_name(*symbol);
-
+ function->shared()->set_expected_nof_properties(2);
Handle<JSObject> result = Factory::NewJSObject(function);
global_context()->set_arguments_boilerplate(*result);
// Note: callee must be added as the first property and
// length must be added as the second property.
- SetProperty(result, Factory::callee_symbol(), Factory::undefined_value(),
+ SetProperty(result, Factory::callee_symbol(),
+ Factory::undefined_value(),
DONT_ENUM);
- SetProperty(result, Factory::length_symbol(), Factory::undefined_value(),
+ SetProperty(result, Factory::length_symbol(),
+ Factory::undefined_value(),
DONT_ENUM);
+#ifdef DEBUG
+ LookupResult lookup;
+ result->LocalLookup(Heap::callee_symbol(), &lookup);
+ ASSERT(lookup.IsValid() && (lookup.type() == FIELD));
+ ASSERT(lookup.GetFieldIndex() == Heap::arguments_callee_index);
+
+ result->LocalLookup(Heap::length_symbol(), &lookup);
+ ASSERT(lookup.IsValid() && (lookup.type() == FIELD));
+ ASSERT(lookup.GetFieldIndex() == Heap::arguments_length_index);
+
+ ASSERT(result->map()->inobject_properties() > Heap::arguments_callee_index);
+ ASSERT(result->map()->inobject_properties() > Heap::arguments_length_index);
+
// Check the state of the object.
ASSERT(result->HasFastProperties());
ASSERT(result->HasFastElements());
+#endif
}
{ // --- context extension
Object* obj = Heap::AllocateFixedArrayWithHoles(len->value());
if (obj->IsFailure()) return obj;
FixedArray* elms = FixedArray::cast(obj);
- FixedArray::WriteBarrierMode mode = elms->GetWriteBarrierMode();
+ WriteBarrierMode mode = elms->GetWriteBarrierMode();
// Fill in the content
for (int index = 0; index < number_of_elements; index++) {
elms->set(index, BUILTIN_ARG(index+1), mode);
// Set length and elements on the array.
array->set_elements(FixedArray::cast(obj));
- array->set_length(len);
+ array->set_length(len, SKIP_WRITE_BARRIER);
return array;
}
Object* obj = Heap::AllocateFixedArrayWithHoles(capacity);
if (obj->IsFailure()) return obj;
FixedArray* new_elms = FixedArray::cast(obj);
- FixedArray::WriteBarrierMode mode = new_elms->GetWriteBarrierMode();
+ WriteBarrierMode mode = new_elms->GetWriteBarrierMode();
// Fill out the new array with old elements.
for (int i = 0; i < len; i++) new_elms->set(i, elms->get(i), mode);
// Add the provided values.
array->set_elements(new_elms);
}
// Set the length.
- array->set_length(Smi::FromInt(new_length));
+ array->set_length(Smi::FromInt(new_length), SKIP_WRITE_BARRIER);
return array->length();
}
BUILTIN_END
Object* top = elms->get(len - 1);
// Set the length.
- array->set_length(Smi::FromInt(len - 1));
+ array->set_length(Smi::FromInt(len - 1), SKIP_WRITE_BARRIER);
if (!top->IsTheHole()) {
// Delete the top element.
elms->set_the_hole(len - 1);
-
return top;
}
if (!Smi::IsValid(year) || !IsMonth(month) || !IsDay(day)) return false;
- output->set(YEAR, Smi::FromInt(year));
- output->set(MONTH, Smi::FromInt(month - 1)); // 0-based
- output->set(DAY, Smi::FromInt(day));
+ output->set(YEAR,
+ Smi::FromInt(year),
+ SKIP_WRITE_BARRIER);
+ output->set(MONTH,
+ Smi::FromInt(month - 1),
+ SKIP_WRITE_BARRIER); // 0-based
+ output->set(DAY,
+ Smi::FromInt(day),
+ SKIP_WRITE_BARRIER);
return true;
}
if (!IsHour(hour) || !IsMinute(minute) || !IsSecond(second)) return false;
- output->set(HOUR, Smi::FromInt(hour));
- output->set(MINUTE, Smi::FromInt(minute));
- output->set(SECOND, Smi::FromInt(second));
+ output->set(HOUR,
+ Smi::FromInt(hour),
+ SKIP_WRITE_BARRIER);
+ output->set(MINUTE,
+ Smi::FromInt(minute),
+ SKIP_WRITE_BARRIER);
+ output->set(SECOND,
+ Smi::FromInt(second),
+ SKIP_WRITE_BARRIER);
return true;
}
if (minute_ == kNone) minute_ = 0;
int total_seconds = sign_ * (hour_ * 3600 + minute_ * 60);
if (!Smi::IsValid(total_seconds)) return false;
- output->set(UTC_OFFSET, Smi::FromInt(total_seconds));
+ output->set(UTC_OFFSET,
+ Smi::FromInt(total_seconds),
+ SKIP_WRITE_BARRIER);
} else {
- output->set(UTC_OFFSET, Heap::null_value());
+ output->set(UTC_OFFSET,
+ Heap::null_value(),
+ SKIP_WRITE_BARRIER);
}
return true;
}
int hash;
if (number->IsSmi()) {
hash = smi_get_hash(Smi::cast(number));
- number_string_cache_->set(hash * 2, number, FixedArray::SKIP_WRITE_BARRIER);
+ number_string_cache_->set(hash * 2, number, SKIP_WRITE_BARRIER);
} else {
hash = double_get_hash(number->Number());
number_string_cache_->set(hash * 2, number);
JSObject* boilerplate =
Top::context()->global_context()->arguments_boilerplate();
- Object* result = CopyJSObject(boilerplate);
+
+ // Make the clone.
+ Map* map = boilerplate->map();
+ int object_size = map->instance_size();
+ Object* result = new_space_.AllocateRaw(object_size);
if (result->IsFailure()) return result;
+ ASSERT(Heap::InNewSpace(result));
+
+ // Copy the content.
+ CopyBlock(reinterpret_cast<Object**>(HeapObject::cast(result)->address()),
+ reinterpret_cast<Object**>(boilerplate->address()),
+ object_size);
- Object* obj = JSObject::cast(result)->properties();
- FixedArray::cast(obj)->set(arguments_callee_index, callee);
- FixedArray::cast(obj)->set(arguments_length_index, Smi::FromInt(length));
+ // Set the two properties.
+ JSObject::cast(result)->InObjectPropertyAtPut(arguments_callee_index,
+ callee,
+ SKIP_WRITE_BARRIER);
+ JSObject::cast(result)->InObjectPropertyAtPut(arguments_length_index,
+ Smi::FromInt(length),
+ SKIP_WRITE_BARRIER);
- // Allocate the fixed array.
- obj = Heap::AllocateFixedArray(length);
- if (obj->IsFailure()) return obj;
- JSObject::cast(result)->set_elements(FixedArray::cast(obj));
+ // Allocate the elements if needed.
+ if (length > 0) {
+ // Allocate the fixed array.
+ Object* obj = Heap::AllocateFixedArray(length);
+ if (obj->IsFailure()) return obj;
+ JSObject::cast(result)->set_elements(FixedArray::cast(obj));
+ }
// Check the state of the object
ASSERT(JSObject::cast(result)->HasFastProperties());
FixedArray* result = FixedArray::cast(obj);
result->set_length(len);
// Copy the content
- FixedArray::WriteBarrierMode mode = result->GetWriteBarrierMode();
+ WriteBarrierMode mode = result->GetWriteBarrierMode();
for (int i = 0; i < len; i++) result->set(i, src->get(i), mode);
return result;
}
reinterpret_cast<Array*>(result)->set_map(fixed_array_map());
FixedArray* array = FixedArray::cast(result);
array->set_length(length);
+ Object* value = undefined_value();
// Initialize body.
- for (int index = 0; index < length; index++) array->set_undefined(index);
+ for (int index = 0; index < length; index++) {
+ array->set(index, value, SKIP_WRITE_BARRIER);
+ }
}
return result;
}
reinterpret_cast<Array*>(result)->set_map(fixed_array_map());
FixedArray* array = FixedArray::cast(result);
array->set_length(length);
- for (int index = 0; index < length; index++) array->set_undefined(index);
+ Object* value = undefined_value();
+ for (int index = 0; index < length; index++) {
+ array->set(index, value, SKIP_WRITE_BARRIER);
+ }
return array;
}
FixedArray* array = FixedArray::cast(result);
array->set_length(length);
// Initialize body.
- for (int index = 0; index < length; index++) array->set_the_hole(index);
+ Object* value = the_hole_value();
+ for (int index = 0; index < length; index++) {
+ array->set(index, value, SKIP_WRITE_BARRIER);
+ }
}
return result;
}
if (value == -1) return Factory::null_value();
Handle<FixedArray> array = Factory::NewFixedArray(2);
- array->set(0, Smi::FromInt(value));
- array->set(1, Smi::FromInt(value + needle->length()));
+ array->set(0,
+ Smi::FromInt(value),
+ SKIP_WRITE_BARRIER);
+ array->set(1,
+ Smi::FromInt(value + needle->length()),
+ SKIP_WRITE_BARRIER);
return Factory::NewJSArrayWithElements(array);
}
int end = value + needle_length;
Handle<FixedArray> array = Factory::NewFixedArray(2);
- array->set(0, Smi::FromInt(value));
- array->set(1, Smi::FromInt(end));
+ array->set(0,
+ Smi::FromInt(value),
+ SKIP_WRITE_BARRIER);
+ array->set(1,
+ Smi::FromInt(end),
+ SKIP_WRITE_BARRIER);
Handle<JSArray> pair = Factory::NewJSArrayWithElements(array);
SetElement(result, match_count, pair);
match_count++;
Handle<FixedArray> array = Factory::NewFixedArray(2 * (num_captures+1));
// The captures come in (start, end+1) pairs.
for (int i = 0; i < 2 * (num_captures+1); i += 2) {
- array->set(i, Smi::FromInt(offsets_vector[i]));
- array->set(i+1, Smi::FromInt(offsets_vector[i+1]));
+ array->set(i,
+ Smi::FromInt(offsets_vector[i]),
+ SKIP_WRITE_BARRIER);
+ array->set(i+1,
+ Smi::FromInt(offsets_vector[i+1]),
+ SKIP_WRITE_BARRIER);
}
return Factory::NewJSArrayWithElements(array);
}
#define ACCESSORS(holder, name, type, offset) \
type* holder::name() { return type::cast(READ_FIELD(this, offset)); } \
- void holder::set_##name(type* value) { \
+ void holder::set_##name(type* value, WriteBarrierMode mode) { \
WRITE_FIELD(this, offset, value); \
- WRITE_BARRIER(this, offset); \
+ CONDITIONAL_WRITE_BARRIER(this, offset, mode); \
}
+
#define SMI_ACCESSORS(holder, name, offset) \
int holder::name() { \
Object* value = READ_FIELD(this, offset); \
#define WRITE_FIELD(p, offset, value) \
(*reinterpret_cast<Object**>(FIELD_ADDR(p, offset)) = value)
+
#define WRITE_BARRIER(object, offset) \
Heap::RecordWrite(object->address(), offset);
+// CONITIONAL_WRITE_BARRIER must be issued after the actual
+// write due to the assert validating the written value.
+#define CONDITIONAL_WRITE_BARRIER(object, offset, mode) \
+ if (mode == UPDATE_WRITE_BARRIER) { \
+ Heap::RecordWrite(object->address(), offset); \
+ } else { \
+ ASSERT(mode == SKIP_WRITE_BARRIER); \
+ ASSERT(Heap::InNewSpace(object) || \
+ !Heap::InNewSpace(READ_FIELD(object, offset))); \
+ }
+
#define READ_DOUBLE_FIELD(p, offset) \
(*reinterpret_cast<double*>(FIELD_ADDR(p, offset)))
// Access fast-case object properties at index. The use of these routines
// is needed to correctly distinguish between properties stored in-object and
// properties stored in the properties array.
-inline Object* JSObject::FastPropertyAt(int index) {
+Object* JSObject::FastPropertyAt(int index) {
// Adjust for the number of properties stored in the object.
index -= map()->inobject_properties();
if (index < 0) {
}
-inline Object* JSObject::FastPropertyAtPut(int index, Object* value) {
+Object* JSObject::FastPropertyAtPut(int index, Object* value) {
// Adjust for the number of properties stored in the object.
index -= map()->inobject_properties();
if (index < 0) {
}
+Object* JSObject::InObjectPropertyAtPut(int index,
+ Object* value,
+ WriteBarrierMode mode) {
+ // Adjust for the number of properties stored in the object.
+ index -= map()->inobject_properties();
+ ASSERT(index < 0);
+ int offset = map()->instance_size() + (index * kPointerSize);
+ WRITE_FIELD(this, offset, value);
+ CONDITIONAL_WRITE_BARRIER(this, offset, mode);
+ return value;
+}
+
+
+
void JSObject::InitializeBody(int object_size) {
Object* value = Heap::undefined_value();
for (int offset = kHeaderSize; offset < object_size; offset += kPointerSize) {
}
-FixedArray::WriteBarrierMode FixedArray::GetWriteBarrierMode() {
+WriteBarrierMode HeapObject::GetWriteBarrierMode() {
if (Heap::InNewSpace(this)) return SKIP_WRITE_BARRIER;
return UPDATE_WRITE_BARRIER;
}
void FixedArray::set(int index,
Object* value,
- FixedArray::WriteBarrierMode mode) {
+ WriteBarrierMode mode) {
ASSERT(index >= 0 && index < this->length());
int offset = kHeaderSize + index * kPointerSize;
WRITE_FIELD(this, offset, value);
- if (mode == UPDATE_WRITE_BARRIER) {
- WRITE_BARRIER(this, offset);
- } else {
- ASSERT(mode == SKIP_WRITE_BARRIER);
- ASSERT(Heap::InNewSpace(this) || !Heap::InNewSpace(value));
- }
+ CONDITIONAL_WRITE_BARRIER(this, offset, mode);
}
}
-void Map::set_prototype(Object* value) {
+void Map::set_prototype(Object* value, WriteBarrierMode mode) {
ASSERT(value->IsNull() || value->IsJSObject());
WRITE_FIELD(this, kPrototypeOffset, value);
- WRITE_BARRIER(this, kPrototypeOffset);
+ CONDITIONAL_WRITE_BARRIER(this, kPrototypeOffset, mode);
}
}
-void SharedFunctionInfo::set_code(Code* value) {
+void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) {
WRITE_FIELD(this, kCodeOffset, value);
- WRITE_BARRIER(this, kCodeOffset);
+ CONDITIONAL_WRITE_BARRIER(this, kCodeOffset, mode);
}
#undef READ_FIELD
#undef WRITE_FIELD
#undef WRITE_BARRIER
+#undef CONDITIONAL_WRITE_BARRIER
#undef READ_MEMADDR_FIELD
#undef WRITE_MEMADDR_FIELD
#undef READ_DOUBLE_FIELD
if (array->IsFailure()) return array;
result->set(kContentArrayIndex, array);
result->set(kEnumerationIndexIndex,
- Smi::FromInt(PropertyDetails::kInitialIndex));
+ Smi::FromInt(PropertyDetails::kInitialIndex),
+ SKIP_WRITE_BARRIER);
return result;
}
uint32_t len = static_cast<uint32_t>(elems->length());
for (uint32_t i = 0; i < len; i++) ASSERT(elems->get(i)->IsTheHole());
#endif
- FixedArray::WriteBarrierMode mode = elems->GetWriteBarrierMode();
+ WriteBarrierMode mode = elems->GetWriteBarrierMode();
if (HasFastElements()) {
FixedArray* old_elements = FixedArray::cast(elements());
uint32_t old_length = static_cast<uint32_t>(old_elements->length());
Object* JSArray::Initialize(int capacity) {
ASSERT(capacity >= 0);
- set_length(Smi::FromInt(0));
+ set_length(Smi::FromInt(0), SKIP_WRITE_BARRIER);
FixedArray* new_elements;
if (capacity == 0) {
new_elements = Heap::empty_fixed_array();
for (int i = value; i < old_length; i++) {
FixedArray::cast(elements())->set_the_hole(i);
}
- JSArray::cast(this)->set_length(smi_length);
+ JSArray::cast(this)->set_length(smi_length, SKIP_WRITE_BARRIER);
}
return this;
}
!ShouldConvertToSlowElements(new_capacity)) {
Object* obj = Heap::AllocateFixedArrayWithHoles(new_capacity);
if (obj->IsFailure()) return obj;
- if (IsJSArray()) JSArray::cast(this)->set_length(smi_length);
+ if (IsJSArray()) JSArray::cast(this)->set_length(smi_length,
+ SKIP_WRITE_BARRIER);
SetFastElements(FixedArray::cast(obj));
return this;
}
static_cast<uint32_t>(JSArray::cast(this)->length()->Number());
element_dictionary()->RemoveNumberEntries(value, old_length);
}
- JSArray::cast(this)->set_length(smi_length);
+ JSArray::cast(this)->set_length(smi_length, SKIP_WRITE_BARRIER);
}
return this;
}
Object* obj = Heap::AllocateFixedArray(1);
if (obj->IsFailure()) return obj;
FixedArray::cast(obj)->set(0, len);
- if (IsJSArray()) JSArray::cast(this)->set_length(Smi::FromInt(1));
+ if (IsJSArray()) JSArray::cast(this)->set_length(Smi::FromInt(1),
+ SKIP_WRITE_BARRIER);
set_elements(FixedArray::cast(obj));
return this;
}
CHECK(Array::IndexFromObject(JSArray::cast(this)->length(),
&array_length));
if (index >= array_length) {
- JSArray::cast(this)->set_length(Smi::FromInt(index + 1));
+ JSArray::cast(this)->set_length(Smi::FromInt(index + 1),
+ SKIP_WRITE_BARRIER);
}
}
return value;
Object* obj = Heap::AllocateFixedArrayWithHoles(new_capacity);
if (obj->IsFailure()) return obj;
SetFastElements(FixedArray::cast(obj));
- if (IsJSArray()) JSArray::cast(this)->set_length(Smi::FromInt(index + 1));
+ if (IsJSArray()) JSArray::cast(this)->set_length(Smi::FromInt(index + 1),
+ SKIP_WRITE_BARRIER);
FixedArray::cast(elements())->set(index, value);
return value;
}
pos++;
}
}
- set_length(Smi::FromInt(pos));
+ set_length(Smi::FromInt(pos), SKIP_WRITE_BARRIER);
for (int index = pos; index < len; index++) {
elms->set_the_hole(index);
}
Object* obj = Heap::AllocateFixedArray(length);
if (obj->IsFailure()) return obj;
dict->CopyValuesTo(FixedArray::cast(obj));
- set_length(Smi::FromInt(length));
+ set_length(Smi::FromInt(length), SKIP_WRITE_BARRIER);
set_elements(FixedArray::cast(obj));
return this;
}
// Make another dictionary with smaller indices.
Object* obj = dict->RemoveHoles();
if (obj->IsFailure()) return obj;
- set_length(Smi::FromInt(length));
+ set_length(Smi::FromInt(length), SKIP_WRITE_BARRIER);
set_elements(Dictionary::cast(obj));
return this;
}
for (int i = 0; i < length; i++) {
if (!FixedArray::cast(elements())->get(i)->IsTheHole()) {
if (storage) {
- storage->set(counter,
- Smi::FromInt(i),
- FixedArray::SKIP_WRITE_BARRIER);
+ storage->set(counter, Smi::FromInt(i), SKIP_WRITE_BARRIER);
}
counter++;
}
String* str = String::cast(val);
if (storage) {
for (int i = 0; i < str->length(); i++) {
- storage->set(counter + i,
- Smi::FromInt(i),
- FixedArray::SKIP_WRITE_BARRIER);
+ storage->set(counter + i, Smi::FromInt(i), SKIP_WRITE_BARRIER);
}
}
counter += str->length();
Object* obj = Heap::AllocateFixedArray(length);
if (obj->IsFailure()) return obj;
FixedArray* iteration_order = FixedArray::cast(obj);
- for (int i = 0; i < length; i++) iteration_order->set(i, Smi::FromInt(i));
+ for (int i = 0; i < length; i++) {
+ iteration_order->set(i, Smi::FromInt(i), SKIP_WRITE_BARRIER);
+ }
// Allocate array with enumeration order.
obj = Heap::AllocateFixedArray(length);
int pos = 0;
for (int i = 0; i < capacity; i++) {
if (IsKey(KeyAt(i))) {
- enumeration_order->set(pos++, Smi::FromInt(DetailsAt(i).index()));
+ enumeration_order->set(pos++,
+ Smi::FromInt(DetailsAt(i).index()),
+ SKIP_WRITE_BARRIER);
}
}
for (int i = 0; i < length; i++) {
int index = Smi::cast(iteration_order->get(i))->value();
int enum_index = PropertyDetails::kInitialIndex + i;
- enumeration_order->set(index, Smi::FromInt(enum_index));
+ enumeration_order->set(index,
+ Smi::FromInt(enum_index),
+ SKIP_WRITE_BARRIER);
}
// Update the dictionary with new indices.
// Check if this index is high enough that we should require slow
// elements.
if (key > kRequiresSlowElementsLimit) {
- set(kMaxNumberKeyIndex, Smi::FromInt(kRequiresSlowElementsMask));
+ set(kMaxNumberKeyIndex,
+ Smi::FromInt(kRequiresSlowElementsMask),
+ SKIP_WRITE_BARRIER);
return;
}
// Update max key value.
Object* max_index_object = get(kMaxNumberKeyIndex);
if (!max_index_object->IsSmi() || max_number_key() < key) {
- set(kMaxNumberKeyIndex, Smi::FromInt(key << kRequiresSlowElementsTagSize));
+ set(kMaxNumberKeyIndex,
+ Smi::FromInt(key << kRequiresSlowElementsTagSize),
+ SKIP_WRITE_BARRIER);
}
}
PropertyDetails details = DetailsAt(i);
if (!details.IsDontEnum()) {
storage->set(index, k);
- sort_array->set(index, Smi::FromInt(details.index()));
+ sort_array->set(index,
+ Smi::FromInt(details.index()),
+ SKIP_WRITE_BARRIER);
index++;
}
}
uint32_t value_;
};
+// Setter that skips the write barrier if mode is SKIP_WRITE_BARRIER.
+enum WriteBarrierMode { SKIP_WRITE_BARRIER, UPDATE_WRITE_BARRIER };
+
// All Maps have a field instance_type containing a InstanceType.
// It describes the type of the instances.
//
inline void set_##name(bool value); \
-#define DECL_ACCESSORS(name, type) \
- inline type* name(); \
- inline void set_##name(type* value);
+#define DECL_ACCESSORS(name, type) \
+ inline type* name(); \
+ inline void set_##name(type* value, \
+ WriteBarrierMode mode = UPDATE_WRITE_BARRIER); \
class StringStream;
// Casting.
static inline HeapObject* cast(Object* obj);
+ // Return the write barrier mode for this.
+ inline WriteBarrierMode GetWriteBarrierMode();
+
// Dispatched behavior.
void HeapObjectShortPrint(StringStream* accumulator);
#ifdef DEBUG
inline Object* FastPropertyAt(int index);
inline Object* FastPropertyAtPut(int index, Object* value);
+ // Access to set in object properties.
+ inline Object* InObjectPropertyAtPut(int index,
+ Object* value,
+ WriteBarrierMode mode
+ = UPDATE_WRITE_BARRIER);
// initializes the body after properties slot, properties slot is
// initialized by set_properties
inline Object* get(int index);
inline void set(int index, Object* value);
+ // Setter with barrier mode.
+ inline void set(int index, Object* value, WriteBarrierMode mode);
+
// Setters for frequently used oddballs located in old space.
inline void set_undefined(int index);
inline void set_null(int index);
inline void set_the_hole(int index);
- // Setter that skips the write barrier if mode is SKIP_WRITE_BARRIER.
- enum WriteBarrierMode { SKIP_WRITE_BARRIER, UPDATE_WRITE_BARRIER };
- inline void set(int index, Object* value, WriteBarrierMode mode);
- // Return the write barrier mode for this.
- inline WriteBarrierMode GetWriteBarrierMode();
-
// Copy operations.
inline Object* Copy();
Object* CopySize(int new_length);
if (result->IsFailure()) return result;
FixedArray* array = FixedArray::cast(JSObject::cast(result)->elements());
ASSERT(array->length() == length);
- FixedArray::WriteBarrierMode mode = array->GetWriteBarrierMode();
+ WriteBarrierMode mode = array->GetWriteBarrierMode();
for (int i = 0; i < length; i++) {
array->set(i, frame->GetParameter(i), mode);
}
if (result->IsFailure()) return result;
FixedArray* array = FixedArray::cast(JSObject::cast(result)->elements());
ASSERT(array->length() == length);
- FixedArray::WriteBarrierMode mode = array->GetWriteBarrierMode();
+ WriteBarrierMode mode = array->GetWriteBarrierMode();
for (int i = 0; i < length; i++) {
array->set(i, *--parameters, mode);
}
} else {
Handle<FixedArray> single_interval = Factory::NewFixedArray(2);
// -1 means start of array.
- single_interval->set(0, Smi::FromInt(-1));
+ single_interval->set(0,
+ Smi::FromInt(-1),
+ SKIP_WRITE_BARRIER);
Handle<Object> length_object =
Factory::NewNumber(static_cast<double>(length));
single_interval->set(1, *length_object);
Handle<Object> arguments = Factory::NewArgumentsObject(function, length);
FixedArray* array = FixedArray::cast(JSObject::cast(*arguments)->elements());
ASSERT(array->length() == length);
- FixedArray::WriteBarrierMode mode = array->GetWriteBarrierMode();
+ WriteBarrierMode mode = array->GetWriteBarrierMode();
for (int i = 0; i < length; i++) {
array->set(i, frame->GetParameter(i), mode);
}