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

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

Issue 136403005: Remove CALL_AS_FUNCTION and CALL_AS_METHOD. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Don't store/restore ecx/rcx/r5 given that it doesn't contain callkind anymore Created 6 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/full-codegen-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.h » ('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 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 1021
1022 // Check that the result is not a smi. 1022 // Check that the result is not a smi.
1023 __ JumpIfSmi(edi, miss); 1023 __ JumpIfSmi(edi, miss);
1024 1024
1025 // Check that the value is a JavaScript function, fetching its map into eax. 1025 // Check that the value is a JavaScript function, fetching its map into eax.
1026 __ CmpObjectType(edi, JS_FUNCTION_TYPE, eax); 1026 __ CmpObjectType(edi, JS_FUNCTION_TYPE, eax);
1027 __ j(not_equal, miss); 1027 __ j(not_equal, miss);
1028 1028
1029 // Invoke the function. 1029 // Invoke the function.
1030 ParameterCount actual(argc); 1030 ParameterCount actual(argc);
1031 __ InvokeFunction(edi, actual, JUMP_FUNCTION, 1031 __ InvokeFunction(edi, actual, JUMP_FUNCTION, NullCallWrapper());
1032 NullCallWrapper(), CALL_AS_METHOD);
1033 } 1032 }
1034 1033
1035 1034
1036 // The generated code falls through if the call should be handled by runtime. 1035 // The generated code falls through if the call should be handled by runtime.
1037 void CallICBase::GenerateNormal(MacroAssembler* masm, int argc) { 1036 void CallICBase::GenerateNormal(MacroAssembler* masm, int argc) {
1038 // ----------- S t a t e ------------- 1037 // ----------- S t a t e -------------
1039 // -- ecx : name 1038 // -- ecx : name
1040 // -- esp[0] : return address 1039 // -- esp[0] : return address
1041 // -- esp[(argc - n) * 4] : arg[n] (zero-based) 1040 // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1042 // -- ... 1041 // -- ...
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 1111
1113 // Patch the receiver on the stack. 1112 // Patch the receiver on the stack.
1114 __ bind(&global); 1113 __ bind(&global);
1115 __ mov(Operand(esp, (argc + 1) * kPointerSize), 1114 __ mov(Operand(esp, (argc + 1) * kPointerSize),
1116 masm->isolate()->factory()->undefined_value()); 1115 masm->isolate()->factory()->undefined_value());
1117 1116
1118 __ bind(&invoke); 1117 __ bind(&invoke);
1119 } 1118 }
1120 1119
1121 // Invoke the function. 1120 // Invoke the function.
1122 CallKind call_kind = CallICBase::Contextual::decode(extra_state)
1123 ? CALL_AS_FUNCTION
1124 : CALL_AS_METHOD;
1125 ParameterCount actual(argc); 1121 ParameterCount actual(argc);
1126 __ InvokeFunction(edi, 1122 __ InvokeFunction(edi, actual, JUMP_FUNCTION, NullCallWrapper());
1127 actual,
1128 JUMP_FUNCTION,
1129 NullCallWrapper(),
1130 call_kind);
1131 } 1123 }
1132 1124
1133 1125
1134 void CallIC::GenerateMegamorphic(MacroAssembler* masm, 1126 void CallIC::GenerateMegamorphic(MacroAssembler* masm,
1135 int argc, 1127 int argc,
1136 ExtraICState extra_state) { 1128 ExtraICState extra_state) {
1137 // ----------- S t a t e ------------- 1129 // ----------- S t a t e -------------
1138 // -- ecx : name 1130 // -- ecx : name
1139 // -- esp[0] : return address 1131 // -- esp[0] : return address
1140 // -- esp[(argc - n) * 4] : arg[n] (zero-based) 1132 // -- esp[(argc - n) * 4] : arg[n] (zero-based)
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1670 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1679 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1671 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1680 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1672 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1681 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1673 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1682 } 1674 }
1683 1675
1684 1676
1685 } } // namespace v8::internal 1677 } } // namespace v8::internal
1686 1678
1687 #endif // V8_TARGET_ARCH_IA32 1679 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698