| OLD | NEW |
| 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 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 Label miss; | 1311 Label miss; |
| 1312 __ JumpIfSmi(ecx, &miss); | 1312 __ JumpIfSmi(ecx, &miss); |
| 1313 Condition cond = masm->IsObjectNameType(ecx, eax, eax); | 1313 Condition cond = masm->IsObjectNameType(ecx, eax, eax); |
| 1314 __ j(NegateCondition(cond), &miss); | 1314 __ j(NegateCondition(cond), &miss); |
| 1315 CallICBase::GenerateNormal(masm, argc); | 1315 CallICBase::GenerateNormal(masm, argc); |
| 1316 __ bind(&miss); | 1316 __ bind(&miss); |
| 1317 GenerateMiss(masm, argc); | 1317 GenerateMiss(masm, argc); |
| 1318 } | 1318 } |
| 1319 | 1319 |
| 1320 | 1320 |
| 1321 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { | 1321 void LoadIC::GenerateMegamorphic(MacroAssembler* masm, ContextualMode mode) { |
| 1322 // ----------- S t a t e ------------- | 1322 // ----------- S t a t e ------------- |
| 1323 // -- ecx : name | 1323 // -- ecx : name |
| 1324 // -- edx : receiver | 1324 // -- edx : receiver |
| 1325 // -- esp[0] : return address | 1325 // -- esp[0] : return address |
| 1326 // ----------------------------------- | 1326 // ----------------------------------- |
| 1327 | 1327 |
| 1328 // Probe the stub cache. | 1328 // Probe the stub cache. |
| 1329 ExtraICState extra_ic_state = IC::ComputeExtraICState(mode); |
| 1329 Code::Flags flags = Code::ComputeFlags( | 1330 Code::Flags flags = Code::ComputeFlags( |
| 1330 Code::HANDLER, MONOMORPHIC, kNoExtraICState, | 1331 Code::HANDLER, MONOMORPHIC, extra_ic_state, |
| 1331 Code::NORMAL, Code::LOAD_IC); | 1332 Code::NORMAL, Code::LOAD_IC); |
| 1332 masm->isolate()->stub_cache()->GenerateProbe( | 1333 masm->isolate()->stub_cache()->GenerateProbe( |
| 1333 masm, flags, edx, ecx, ebx, eax); | 1334 masm, flags, edx, ecx, ebx, eax); |
| 1334 | 1335 |
| 1335 // Cache miss: Jump to runtime. | 1336 // Cache miss: Jump to runtime. |
| 1336 GenerateMiss(masm); | 1337 GenerateMiss(masm); |
| 1337 } | 1338 } |
| 1338 | 1339 |
| 1339 | 1340 |
| 1340 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 1341 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1428 __ push(edx); // receiver | 1429 __ push(edx); // receiver |
| 1429 __ push(ecx); // name | 1430 __ push(ecx); // name |
| 1430 __ push(ebx); // return address | 1431 __ push(ebx); // return address |
| 1431 | 1432 |
| 1432 // Perform tail call to the entry. | 1433 // Perform tail call to the entry. |
| 1433 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); | 1434 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); |
| 1434 } | 1435 } |
| 1435 | 1436 |
| 1436 | 1437 |
| 1437 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, | 1438 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, |
| 1438 StrictModeFlag strict_mode) { | 1439 ExtraICState extra_ic_state) { |
| 1439 // ----------- S t a t e ------------- | 1440 // ----------- S t a t e ------------- |
| 1440 // -- eax : value | 1441 // -- eax : value |
| 1441 // -- ecx : name | 1442 // -- ecx : name |
| 1442 // -- edx : receiver | 1443 // -- edx : receiver |
| 1443 // -- esp[0] : return address | 1444 // -- esp[0] : return address |
| 1444 // ----------------------------------- | 1445 // ----------------------------------- |
| 1445 | |
| 1446 Code::Flags flags = Code::ComputeFlags( | 1446 Code::Flags flags = Code::ComputeFlags( |
| 1447 Code::HANDLER, MONOMORPHIC, strict_mode, | 1447 Code::HANDLER, MONOMORPHIC, extra_ic_state, |
| 1448 Code::NORMAL, Code::STORE_IC); | 1448 Code::NORMAL, Code::STORE_IC); |
| 1449 masm->isolate()->stub_cache()->GenerateProbe( | 1449 masm->isolate()->stub_cache()->GenerateProbe( |
| 1450 masm, flags, edx, ecx, ebx, no_reg); | 1450 masm, flags, edx, ecx, ebx, no_reg); |
| 1451 | 1451 |
| 1452 // Cache miss: Jump to runtime. | 1452 // Cache miss: Jump to runtime. |
| 1453 GenerateMiss(masm); | 1453 GenerateMiss(masm); |
| 1454 } | 1454 } |
| 1455 | 1455 |
| 1456 | 1456 |
| 1457 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 1457 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1677 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1677 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
| 1678 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1678 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
| 1679 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1679 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
| 1680 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1680 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1681 } | 1681 } |
| 1682 | 1682 |
| 1683 | 1683 |
| 1684 } } // namespace v8::internal | 1684 } } // namespace v8::internal |
| 1685 | 1685 |
| 1686 #endif // V8_TARGET_ARCH_IA32 | 1686 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |