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

Side by Side Diff: src/x64/builtins-x64.cc

Issue 8407002: Version 3.7.2 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 1 month 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/version.cc ('k') | src/x64/code-stubs-x64.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 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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 if (initial_capacity <= kLoopUnfoldLimit) { 1068 if (initial_capacity <= kLoopUnfoldLimit) {
1069 // Use a scratch register here to have only one reloc info when unfolding 1069 // Use a scratch register here to have only one reloc info when unfolding
1070 // the loop. 1070 // the loop.
1071 for (int i = 0; i < initial_capacity; i++) { 1071 for (int i = 0; i < initial_capacity; i++) {
1072 __ movq(FieldOperand(scratch1, 1072 __ movq(FieldOperand(scratch1,
1073 FixedArray::kHeaderSize + i * kPointerSize), 1073 FixedArray::kHeaderSize + i * kPointerSize),
1074 scratch3); 1074 scratch3);
1075 } 1075 }
1076 } else { 1076 } else {
1077 Label loop, entry; 1077 Label loop, entry;
1078 __ movq(scratch2, Immediate(initial_capacity));
1078 __ jmp(&entry); 1079 __ jmp(&entry);
1079 __ bind(&loop); 1080 __ bind(&loop);
1080 __ movq(Operand(scratch1, 0), scratch3); 1081 __ movq(FieldOperand(scratch1,
1081 __ addq(scratch1, Immediate(kPointerSize)); 1082 scratch2,
1083 times_pointer_size,
1084 FixedArray::kHeaderSize),
1085 scratch3);
1082 __ bind(&entry); 1086 __ bind(&entry);
1083 __ cmpq(scratch1, scratch2); 1087 __ decq(scratch2);
1084 __ j(below, &loop); 1088 __ j(not_sign, &loop);
1085 } 1089 }
1086 } 1090 }
1087 1091
1088 1092
1089 // Allocate a JSArray with the number of elements stored in a register. The 1093 // Allocate a JSArray with the number of elements stored in a register. The
1090 // register array_function holds the built-in Array function and the register 1094 // register array_function holds the built-in Array function and the register
1091 // array_size holds the size of the array as a smi. The allocated array is put 1095 // array_size holds the size of the array as a smi. The allocated array is put
1092 // into the result register and beginning and end of the FixedArray elements 1096 // into the result register and beginning and end of the FixedArray elements
1093 // storage is put into registers elements_array and elements_array_end (see 1097 // storage is put into registers elements_array and elements_array_end (see
1094 // below for when that is not the case). If the parameter fill_with_holes is 1098 // below for when that is not the case). If the parameter fill_with_holes is
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); 1573 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR);
1570 generator.Generate(); 1574 generator.Generate();
1571 } 1575 }
1572 1576
1573 1577
1574 #undef __ 1578 #undef __
1575 1579
1576 } } // namespace v8::internal 1580 } } // namespace v8::internal
1577 1581
1578 #endif // V8_TARGET_ARCH_X64 1582 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/version.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698