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

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

Issue 552210: Move a line, in codegen-*.cc. Make formatting of ic-*.cc uniform. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 __ jmp(&index_int); 407 __ jmp(&index_int);
408 } 408 }
409 409
410 410
411 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { 411 void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
412 // ----------- S t a t e ------------- 412 // ----------- S t a t e -------------
413 // -- rsp[0] : return address 413 // -- rsp[0] : return address
414 // -- rsp[8] : name 414 // -- rsp[8] : name
415 // -- rsp[16] : receiver 415 // -- rsp[16] : receiver
416 // ----------------------------------- 416 // -----------------------------------
417
417 GenerateGeneric(masm); 418 GenerateGeneric(masm);
418 } 419 }
419 420
420 421
421 void KeyedLoadIC::GenerateExternalArray(MacroAssembler* masm, 422 void KeyedLoadIC::GenerateExternalArray(MacroAssembler* masm,
422 ExternalArrayType array_type) { 423 ExternalArrayType array_type) {
423 // ----------- S t a t e ------------- 424 // ----------- S t a t e -------------
424 // -- rsp[0] : return address 425 // -- rsp[0] : return address
425 // -- rsp[8] : name 426 // -- rsp[8] : name
426 // -- rsp[16] : receiver 427 // -- rsp[16] : receiver
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 void CallIC::GenerateNormal(MacroAssembler* masm, int argc) { 1074 void CallIC::GenerateNormal(MacroAssembler* masm, int argc) {
1074 // ----------- S t a t e ------------- 1075 // ----------- S t a t e -------------
1075 // rsp[0] return address 1076 // rsp[0] return address
1076 // rsp[8] argument argc 1077 // rsp[8] argument argc
1077 // rsp[16] argument argc - 1 1078 // rsp[16] argument argc - 1
1078 // ... 1079 // ...
1079 // rsp[argc * 8] argument 1 1080 // rsp[argc * 8] argument 1
1080 // rsp[(argc + 1) * 8] argument 0 = receiver 1081 // rsp[(argc + 1) * 8] argument 0 = receiver
1081 // rsp[(argc + 2) * 8] function name 1082 // rsp[(argc + 2) * 8] function name
1082 // ----------------------------------- 1083 // -----------------------------------
1083
1084 Label miss, global_object, non_global_object; 1084 Label miss, global_object, non_global_object;
1085 1085
1086 // Get the receiver of the function from the stack. 1086 // Get the receiver of the function from the stack.
1087 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); 1087 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize));
1088 // Get the name of the function from the stack. 1088 // Get the name of the function from the stack.
1089 __ movq(rcx, Operand(rsp, (argc + 2) * kPointerSize)); 1089 __ movq(rcx, Operand(rsp, (argc + 2) * kPointerSize));
1090 1090
1091 // Check that the receiver isn't a smi. 1091 // Check that the receiver isn't a smi.
1092 __ JumpIfSmi(rdx, &miss); 1092 __ JumpIfSmi(rdx, &miss);
1093 1093
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 __ TailCallRuntime(f, 2, 1); 1171 __ TailCallRuntime(f, 2, 1);
1172 } 1172 }
1173 1173
1174 1174
1175 void LoadIC::GenerateArrayLength(MacroAssembler* masm) { 1175 void LoadIC::GenerateArrayLength(MacroAssembler* masm) {
1176 // ----------- S t a t e ------------- 1176 // ----------- S t a t e -------------
1177 // -- rcx : name 1177 // -- rcx : name
1178 // -- rsp[0] : return address 1178 // -- rsp[0] : return address
1179 // -- rsp[8] : receiver 1179 // -- rsp[8] : receiver
1180 // ----------------------------------- 1180 // -----------------------------------
1181
1182 Label miss; 1181 Label miss;
1183 1182
1184 __ movq(rax, Operand(rsp, kPointerSize)); 1183 __ movq(rax, Operand(rsp, kPointerSize));
1185 1184
1186 StubCompiler::GenerateLoadArrayLength(masm, rax, rdx, &miss); 1185 StubCompiler::GenerateLoadArrayLength(masm, rax, rdx, &miss);
1187 __ bind(&miss); 1186 __ bind(&miss);
1188 StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC); 1187 StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC);
1189 } 1188 }
1190 1189
1191 1190
1192 void LoadIC::GenerateFunctionPrototype(MacroAssembler* masm) { 1191 void LoadIC::GenerateFunctionPrototype(MacroAssembler* masm) {
1193 // ----------- S t a t e ------------- 1192 // ----------- S t a t e -------------
1194 // -- rcx : name 1193 // -- rcx : name
1195 // -- rsp[0] : return address 1194 // -- rsp[0] : return address
1196 // -- rsp[8] : receiver 1195 // -- rsp[8] : receiver
1197 // ----------------------------------- 1196 // -----------------------------------
1198
1199 Label miss; 1197 Label miss;
1200 1198
1201 __ movq(rax, Operand(rsp, kPointerSize)); 1199 __ movq(rax, Operand(rsp, kPointerSize));
1202 1200
1203 StubCompiler::GenerateLoadFunctionPrototype(masm, rax, rdx, rbx, &miss); 1201 StubCompiler::GenerateLoadFunctionPrototype(masm, rax, rdx, rbx, &miss);
1204 __ bind(&miss); 1202 __ bind(&miss);
1205 StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC); 1203 StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC);
1206 } 1204 }
1207 1205
1208 1206
(...skipping 27 matching lines...) Expand all
1236 Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss))); 1234 Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss)));
1237 } 1235 }
1238 1236
1239 1237
1240 void LoadIC::GenerateNormal(MacroAssembler* masm) { 1238 void LoadIC::GenerateNormal(MacroAssembler* masm) {
1241 // ----------- S t a t e ------------- 1239 // ----------- S t a t e -------------
1242 // -- rcx : name 1240 // -- rcx : name
1243 // -- rsp[0] : return address 1241 // -- rsp[0] : return address
1244 // -- rsp[8] : receiver 1242 // -- rsp[8] : receiver
1245 // ----------------------------------- 1243 // -----------------------------------
1246
1247 Label miss, probe, global; 1244 Label miss, probe, global;
1248 1245
1249 __ movq(rax, Operand(rsp, kPointerSize)); 1246 __ movq(rax, Operand(rsp, kPointerSize));
1250 1247
1251 // Check that the receiver isn't a smi. 1248 // Check that the receiver isn't a smi.
1252 __ JumpIfSmi(rax, &miss); 1249 __ JumpIfSmi(rax, &miss);
1253 1250
1254 // Check that the receiver is a valid JS object. 1251 // Check that the receiver is a valid JS object.
1255 __ CmpObjectType(rax, FIRST_JS_OBJECT_TYPE, rbx); 1252 __ CmpObjectType(rax, FIRST_JS_OBJECT_TYPE, rbx);
1256 __ j(below, &miss); 1253 __ j(below, &miss);
(...skipping 27 matching lines...) Expand all
1284 Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss))); 1281 Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss)));
1285 } 1282 }
1286 1283
1287 1284
1288 void LoadIC::GenerateStringLength(MacroAssembler* masm) { 1285 void LoadIC::GenerateStringLength(MacroAssembler* masm) {
1289 // ----------- S t a t e ------------- 1286 // ----------- S t a t e -------------
1290 // -- rcx : name 1287 // -- rcx : name
1291 // -- rsp[0] : return address 1288 // -- rsp[0] : return address
1292 // -- rsp[8] : receiver 1289 // -- rsp[8] : receiver
1293 // ----------------------------------- 1290 // -----------------------------------
1294
1295 Label miss; 1291 Label miss;
1296 1292
1297 __ movq(rax, Operand(rsp, kPointerSize)); 1293 __ movq(rax, Operand(rsp, kPointerSize));
1298 1294
1299 StubCompiler::GenerateLoadStringLength(masm, rax, rdx, &miss); 1295 StubCompiler::GenerateLoadStringLength(masm, rax, rdx, &miss);
1300 __ bind(&miss); 1296 __ bind(&miss);
1301 StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC); 1297 StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC);
1302 } 1298 }
1303 1299
1304 1300
(...skipping 25 matching lines...) Expand all
1330 return true; 1326 return true;
1331 } 1327 }
1332 1328
1333 void StoreIC::Generate(MacroAssembler* masm, ExternalReference const& f) { 1329 void StoreIC::Generate(MacroAssembler* masm, ExternalReference const& f) {
1334 // ----------- S t a t e ------------- 1330 // ----------- S t a t e -------------
1335 // -- rax : value 1331 // -- rax : value
1336 // -- rcx : name 1332 // -- rcx : name
1337 // -- rsp[0] : return address 1333 // -- rsp[0] : return address
1338 // -- rsp[8] : receiver 1334 // -- rsp[8] : receiver
1339 // ----------------------------------- 1335 // -----------------------------------
1336
1340 __ pop(rbx); 1337 __ pop(rbx);
1341 __ push(Operand(rsp, 0)); // receiver 1338 __ push(Operand(rsp, 0)); // receiver
1342 __ push(rcx); // name 1339 __ push(rcx); // name
1343 __ push(rax); // value 1340 __ push(rax); // value
1344 __ push(rbx); // return address 1341 __ push(rbx); // return address
1345 1342
1346 // Perform tail call to the entry. 1343 // Perform tail call to the entry.
1347 __ TailCallRuntime(f, 3, 1); 1344 __ TailCallRuntime(f, 3, 1);
1348 } 1345 }
1349 1346
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 1380
1384 // Cache miss: Jump to runtime. 1381 // Cache miss: Jump to runtime.
1385 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); 1382 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss)));
1386 } 1383 }
1387 1384
1388 1385
1389 #undef __ 1386 #undef __
1390 1387
1391 1388
1392 } } // namespace v8::internal 1389 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698