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

Side by Side Diff: src/stub-cache-arm.cc

Issue 6441: - Added fast case for extending the JSObject properties storage.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 409
410 // Stub never generated for non-global objects that require access 410 // Stub never generated for non-global objects that require access
411 // checks. 411 // checks.
412 ASSERT(object->IsJSGlobalObject() || !object->IsAccessCheckNeeded()); 412 ASSERT(object->IsJSGlobalObject() || !object->IsAccessCheckNeeded());
413 413
414 // Get the properties array 414 // Get the properties array
415 __ ldr(r1, FieldMemOperand(r3, JSObject::kPropertiesOffset)); 415 __ ldr(r1, FieldMemOperand(r3, JSObject::kPropertiesOffset));
416 416
417 // Perform map transition for the receiver if necessary. 417 // Perform map transition for the receiver if necessary.
418 if (transition != NULL) { 418 if (transition != NULL) {
419 // Update the map of the object; no write barrier updating is 419 if (object->map()->unused_property_fields() == 0) {
420 // needed because the map is never in new space. 420 // The properties must be extended before we can store the value.
421 __ mov(ip, Operand(Handle<Map>(transition))); 421 // We jump to a runtime call that extends the propeties array.
422 __ str(ip, FieldMemOperand(r3, HeapObject::kMapOffset)); 422 __ mov(r2, Operand(Handle<Map>(transition)));
423 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_ExtendStorage));
424 __ Jump(ic, RelocInfo::CODE_TARGET);
425 } else {
426 // Update the map of the object; no write barrier updating is
427 // needed because the map is never in new space.
428 __ mov(ip, Operand(Handle<Map>(transition)));
429 __ str(ip, FieldMemOperand(r3, HeapObject::kMapOffset));
430 }
423 } 431 }
424 432
425 // Write to the properties array. 433 // Write to the properties array.
426 int offset = index * kPointerSize + Array::kHeaderSize; 434 int offset = index * kPointerSize + Array::kHeaderSize;
427 __ str(r0, FieldMemOperand(r1, offset)); 435 __ str(r0, FieldMemOperand(r1, offset));
428 436
429 // Skip updating write barrier if storing a smi. 437 // Skip updating write barrier if storing a smi.
430 __ tst(r0, Operand(kSmiTagMask)); 438 __ tst(r0, Operand(kSmiTagMask));
431 __ b(eq, &exit); 439 __ b(eq, &exit);
432 440
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 String* name) { 797 String* name) {
790 UNIMPLEMENTED(); 798 UNIMPLEMENTED();
791 return Heap::undefined_value(); 799 return Heap::undefined_value();
792 } 800 }
793 801
794 802
795 803
796 #undef __ 804 #undef __
797 805
798 } } // namespace v8::internal 806 } } // namespace v8::internal
OLDNEW
« src/ic.cc ('K') | « src/ic-ia32.cc ('k') | src/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698