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

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

Issue 11663005: Adapt Danno's Track Allocation Info idea to fast literals. When allocating a literal array, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: A few more review comments Created 7 years, 11 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
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 return FUNCTION_CAST<OS::MemCopyFunction>(buffer); 381 return FUNCTION_CAST<OS::MemCopyFunction>(buffer);
382 } 382 }
383 383
384 #undef __ 384 #undef __
385 385
386 // ------------------------------------------------------------------------- 386 // -------------------------------------------------------------------------
387 // Code generators 387 // Code generators
388 388
389 #define __ ACCESS_MASM(masm) 389 #define __ ACCESS_MASM(masm)
390 390
391
391 void ElementsTransitionGenerator::GenerateMapChangeElementsTransition( 392 void ElementsTransitionGenerator::GenerateMapChangeElementsTransition(
392 MacroAssembler* masm) { 393 MacroAssembler* masm) {
393 // ----------- S t a t e ------------- 394 // ----------- S t a t e -------------
394 // -- eax : value 395 // -- eax : value
395 // -- ebx : target map 396 // -- ebx : target map
396 // -- ecx : key 397 // -- ecx : key
397 // -- edx : receiver 398 // -- edx : receiver
398 // -- esp[0] : return address 399 // -- esp[0] : return address
399 // ----------------------------------- 400 // -----------------------------------
400 // Set transitioned map. 401 // Set transitioned map.
(...skipping 12 matching lines...) Expand all
413 MacroAssembler* masm, Label* fail) { 414 MacroAssembler* masm, Label* fail) {
414 // ----------- S t a t e ------------- 415 // ----------- S t a t e -------------
415 // -- eax : value 416 // -- eax : value
416 // -- ebx : target map 417 // -- ebx : target map
417 // -- ecx : key 418 // -- ecx : key
418 // -- edx : receiver 419 // -- edx : receiver
419 // -- esp[0] : return address 420 // -- esp[0] : return address
420 // ----------------------------------- 421 // -----------------------------------
421 Label loop, entry, convert_hole, gc_required, only_change_map; 422 Label loop, entry, convert_hole, gc_required, only_change_map;
422 423
424 if (FLAG_track_allocation_sites) {
425 masm->TestJSArrayForAllocationSiteInfo(edx, edi, fail);
426 }
427
423 // Check for empty arrays, which only require a map transition and no changes 428 // Check for empty arrays, which only require a map transition and no changes
424 // to the backing store. 429 // to the backing store.
425 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); 430 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset));
426 __ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array())); 431 __ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array()));
427 __ j(equal, &only_change_map); 432 __ j(equal, &only_change_map);
428 433
429 __ push(eax); 434 __ push(eax);
430 __ push(ebx); 435 __ push(ebx);
431 436
432 __ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset)); 437 __ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset));
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 Code* stub = GetCodeAgeStub(age, parity); 944 Code* stub = GetCodeAgeStub(age, parity);
940 CodePatcher patcher(sequence, young_length); 945 CodePatcher patcher(sequence, young_length);
941 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE); 946 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE);
942 } 947 }
943 } 948 }
944 949
945 950
946 } } // namespace v8::internal 951 } } // namespace v8::internal
947 952
948 #endif // V8_TARGET_ARCH_IA32 953 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698