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

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

Issue 1774015: Bring r4503 to the 2.1 branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.1/
Patch Set: Created 10 years, 7 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 | « no previous file | src/version.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 CheckType check) { 1216 CheckType check) {
1217 // ----------- S t a t e ------------- 1217 // ----------- S t a t e -------------
1218 // -- ecx : name 1218 // -- ecx : name
1219 // -- esp[0] : return address 1219 // -- esp[0] : return address
1220 // -- esp[(argc - n) * 4] : arg[n] (zero-based) 1220 // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1221 // -- ... 1221 // -- ...
1222 // -- esp[(argc + 1) * 4] : receiver 1222 // -- esp[(argc + 1) * 4] : receiver
1223 // ----------------------------------- 1223 // -----------------------------------
1224 ASSERT(check == RECEIVER_MAP_CHECK); 1224 ASSERT(check == RECEIVER_MAP_CHECK);
1225 1225
1226 // If object is not an array, bail out to regular call.
1227 if (!object->IsJSArray()) {
1228 return Heap::undefined_value();
1229 }
1230
1226 Label miss; 1231 Label miss;
1227 1232
1228 // Get the receiver from the stack. 1233 // Get the receiver from the stack.
1229 const int argc = arguments().immediate(); 1234 const int argc = arguments().immediate();
1230 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); 1235 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
1231 1236
1232 // Check that the receiver isn't a smi. 1237 // Check that the receiver isn't a smi.
1233 __ test(edx, Immediate(kSmiTagMask)); 1238 __ test(edx, Immediate(kSmiTagMask));
1234 __ j(zero, &miss); 1239 __ j(zero, &miss);
1235 1240
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 CheckType check) { 1369 CheckType check) {
1365 // ----------- S t a t e ------------- 1370 // ----------- S t a t e -------------
1366 // -- ecx : name 1371 // -- ecx : name
1367 // -- esp[0] : return address 1372 // -- esp[0] : return address
1368 // -- esp[(argc - n) * 4] : arg[n] (zero-based) 1373 // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1369 // -- ... 1374 // -- ...
1370 // -- esp[(argc + 1) * 4] : receiver 1375 // -- esp[(argc + 1) * 4] : receiver
1371 // ----------------------------------- 1376 // -----------------------------------
1372 ASSERT(check == RECEIVER_MAP_CHECK); 1377 ASSERT(check == RECEIVER_MAP_CHECK);
1373 1378
1379 // If object is not an array, bail out to regular call.
1380 if (!object->IsJSArray()) {
1381 return Heap::undefined_value();
1382 }
1383
1374 Label miss, empty_array, call_builtin; 1384 Label miss, empty_array, call_builtin;
1375 1385
1376 // Get the receiver from the stack. 1386 // Get the receiver from the stack.
1377 const int argc = arguments().immediate(); 1387 const int argc = arguments().immediate();
1378 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); 1388 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
1379 1389
1380 // Check that the receiver isn't a smi. 1390 // Check that the receiver isn't a smi.
1381 __ test(edx, Immediate(kSmiTagMask)); 1391 __ test(edx, Immediate(kSmiTagMask));
1382 __ j(zero, &miss); 1392 __ j(zero, &miss);
1383 1393
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 // -- esp[0] : return address 1461 // -- esp[0] : return address
1452 // -- esp[(argc - n) * 4] : arg[n] (zero-based) 1462 // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1453 // -- ... 1463 // -- ...
1454 // -- esp[(argc + 1) * 4] : receiver 1464 // -- esp[(argc + 1) * 4] : receiver
1455 // ----------------------------------- 1465 // -----------------------------------
1456 1466
1457 SharedFunctionInfo* function_info = function->shared(); 1467 SharedFunctionInfo* function_info = function->shared();
1458 if (function_info->HasCustomCallGenerator()) { 1468 if (function_info->HasCustomCallGenerator()) {
1459 CustomCallGenerator generator = 1469 CustomCallGenerator generator =
1460 ToCData<CustomCallGenerator>(function_info->function_data()); 1470 ToCData<CustomCallGenerator>(function_info->function_data());
1461 return generator(this, object, holder, function, name, check); 1471 Object* result = generator(this, object, holder, function, name, check);
1472 // undefined means bail out to regular compiler.
1473 if (!result->IsUndefined()) {
1474 return result;
1475 }
1462 } 1476 }
1463 1477
1464 Label miss_in_smi_check; 1478 Label miss_in_smi_check;
1465 1479
1466 // Get the receiver from the stack. 1480 // Get the receiver from the stack.
1467 const int argc = arguments().immediate(); 1481 const int argc = arguments().immediate();
1468 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); 1482 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
1469 1483
1470 // Check that the receiver isn't a smi. 1484 // Check that the receiver isn't a smi.
1471 if (check != NUMBER_CHECK) { 1485 if (check != NUMBER_CHECK) {
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
2425 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); 2439 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET);
2426 2440
2427 // Return the generated code. 2441 // Return the generated code.
2428 return GetCode(); 2442 return GetCode();
2429 } 2443 }
2430 2444
2431 2445
2432 #undef __ 2446 #undef __
2433 2447
2434 } } // namespace v8::internal 2448 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698