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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 6966041: Add complete ElementKind information directly to Map for objects with elements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: implement all platforms Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3353 matching lines...) Expand 10 before | Expand all | Expand 10 after
3364 Operand array_length_operand = Operand(esp, 0); 3364 Operand array_length_operand = Operand(esp, 0);
3365 __ sub(Operand(esp), Immediate(2 * kPointerSize)); 3365 __ sub(Operand(esp), Immediate(2 * kPointerSize));
3366 __ cld(); 3366 __ cld();
3367 // Check that the array is a JSArray 3367 // Check that the array is a JSArray
3368 __ test(array, Immediate(kSmiTagMask)); 3368 __ test(array, Immediate(kSmiTagMask));
3369 __ j(zero, &bailout); 3369 __ j(zero, &bailout);
3370 __ CmpObjectType(array, JS_ARRAY_TYPE, scratch); 3370 __ CmpObjectType(array, JS_ARRAY_TYPE, scratch);
3371 __ j(not_equal, &bailout); 3371 __ j(not_equal, &bailout);
3372 3372
3373 // Check that the array has fast elements. 3373 // Check that the array has fast elements.
3374 __ test_b(FieldOperand(scratch, Map::kBitField2Offset), 3374 __ CheckFastElements(scratch, &bailout);
3375 1 << Map::kHasFastElements);
3376 __ j(zero, &bailout);
3377 3375
3378 // If the array has length zero, return the empty string. 3376 // If the array has length zero, return the empty string.
3379 __ mov(array_length, FieldOperand(array, JSArray::kLengthOffset)); 3377 __ mov(array_length, FieldOperand(array, JSArray::kLengthOffset));
3380 __ SmiUntag(array_length); 3378 __ SmiUntag(array_length);
3381 __ j(not_zero, &non_trivial_array); 3379 __ j(not_zero, &non_trivial_array);
3382 __ mov(result_operand, isolate()->factory()->empty_string()); 3380 __ mov(result_operand, isolate()->factory()->empty_string());
3383 __ jmp(&done); 3381 __ jmp(&done);
3384 3382
3385 // Save the array length. 3383 // Save the array length.
3386 __ bind(&non_trivial_array); 3384 __ bind(&non_trivial_array);
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
4329 // And return. 4327 // And return.
4330 __ ret(0); 4328 __ ret(0);
4331 } 4329 }
4332 4330
4333 4331
4334 #undef __ 4332 #undef __
4335 4333
4336 } } // namespace v8::internal 4334 } } // namespace v8::internal
4337 4335
4338 #endif // V8_TARGET_ARCH_IA32 4336 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698