Commit b2fc0598 authored by kasperl@chromium.org's avatar kasperl@chromium.org

Fix lint issues. TBR=iposva@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1ce28eda
......@@ -297,7 +297,7 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
__ movzx_b(eax, Operand(ecx, eax, times_1, 0));
__ shl(eax, kSmiTagSize);
__ ret(0);
// Slow case: Load name and receiver from stack and jump to runtime.
__ bind(&slow);
......
......@@ -3084,12 +3084,12 @@ Object* FixedArray::AddKeysFromJSArray(JSArray* array) {
case JSObject::DICTIONARY_ELEMENTS: {
NumberDictionary* dict = array->element_dictionary();
int size = dict->NumberOfElements();
// Allocate a temporary fixed array.
Object* object = Heap::AllocateFixedArray(size);
if (object->IsFailure()) return object;
FixedArray* key_array = FixedArray::cast(object);
int capacity = dict->Capacity();
int pos = 0;
// Copy the elements from the JSArray to the temporary fixed array.
......@@ -5194,7 +5194,7 @@ Object* JSObject::SetSlowElements(Object* len) {
new_length);
Object* obj = NormalizeElements();
if (obj->IsFailure()) return obj;
// Update length for JSArrays.
if (IsJSArray()) JSArray::cast(this)->set_length(len);
break;
......@@ -5641,7 +5641,7 @@ Object* JSObject::SetElementWithoutInterceptor(uint32_t index, Object* value) {
// Insert element in the dictionary.
FixedArray* elms = FixedArray::cast(elements());
NumberDictionary* dictionary = NumberDictionary::cast(elms);
int entry = dictionary->FindEntry(index);
if (entry != NumberDictionary::kNotFound) {
Object* element = dictionary->ValueAt(entry);
......@@ -5678,7 +5678,7 @@ Object* JSObject::SetElementWithoutInterceptor(uint32_t index, Object* value) {
set_elements(FixedArray::cast(result));
}
}
// Update the array length if this JSObject is an array.
if (IsJSArray()) {
JSArray* array = JSArray::cast(this);
......@@ -5686,7 +5686,7 @@ Object* JSObject::SetElementWithoutInterceptor(uint32_t index, Object* value) {
value);
if (return_value->IsFailure()) return return_value;
}
// Attempt to put this object back in fast case.
if (ShouldConvertToFastElements()) {
uint32_t new_length = 0;
......@@ -5707,7 +5707,7 @@ Object* JSObject::SetElementWithoutInterceptor(uint32_t index, Object* value) {
}
#endif
}
return value;
}
default:
......
......@@ -2461,7 +2461,7 @@ class PixelArray: public Array {
// [external_pointer]: The pointer to the external memory area backing this
// pixel array.
DECL_ACCESSORS(external_pointer, uint8_t) // Pointer to the data store.
// Setter and getter.
inline uint8_t get(int index);
inline void set(int index, uint8_t value);
......@@ -2482,8 +2482,8 @@ class PixelArray: public Array {
static const int kExternalPointerOffset = Array::kAlignedSize;
static const int kHeaderSize = kExternalPointerOffset + kPointerSize;
static const int kAlignedSize = OBJECT_SIZE_ALIGN(kHeaderSize);
private:
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(PixelArray);
};
......
......@@ -5191,7 +5191,7 @@ static uint32_t IterateElements(Handle<JSObject> receiver,
if (range < len) {
len = range;
}
for (uint32_t j = 0; j < len; j++) {
Handle<Object> e(elements->get(j));
if (!e->IsTheHole()) {
......
......@@ -7651,7 +7651,7 @@ THREADED_TEST(PixelArray) {
"pixels[5];");
CHECK_EQ(0, result->Int32Value());
CHECK_EQ(0, i::Smi::cast(jsobj->GetElement(5))->value());
result = CompileRun("pixels[3] = 33;"
"delete pixels[3];"
"pixels[3];");
......@@ -7660,14 +7660,13 @@ THREADED_TEST(PixelArray) {
result = CompileRun("pixels[0] = 10; pixels[1] = 11;"
"pixels[2] = 12; pixels[3] = 13;"
"pixels.__defineGetter__('2',"
"function() { return 120; });"
"function() { return 120; });"
"pixels[2];");
CHECK_EQ(12, result->Int32Value());
result = CompileRun("var js_array = new Array(40);"
"js_array[0] = 77;"
"js_array;"
);
"js_array;");
CHECK_EQ(77, v8::Object::Cast(*result)->Get(v8_str("0"))->Int32Value());
result = CompileRun("pixels[1] = 23;"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment