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 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1142 | 1142 |
1143 | 1143 |
1144 void CallStubCompiler::GenerateJumpFunctionIgnoreReceiver( | 1144 void CallStubCompiler::GenerateJumpFunctionIgnoreReceiver( |
1145 Handle<JSFunction> function) { | 1145 Handle<JSFunction> function) { |
1146 ParameterCount expected(function); | 1146 ParameterCount expected(function); |
1147 __ InvokeFunction(function, expected, arguments(), | 1147 __ InvokeFunction(function, expected, arguments(), |
1148 JUMP_FUNCTION, NullCallWrapper(), call_kind()); | 1148 JUMP_FUNCTION, NullCallWrapper(), call_kind()); |
1149 } | 1149 } |
1150 | 1150 |
1151 | 1151 |
1152 void CallStubCompiler::PatchGlobalProxy(Handle<Object> object, | |
1153 Register function) { | |
1154 if (object->IsGlobalObject()) { | |
1155 FetchGlobalProxy(masm(), function, rdx); | |
Toon Verwaest
2013/12/18 13:09:33
EEK! rdx in src/stub-cache.cc?
Please run tests o
| |
1156 StackArgumentsAccessor args(rsp, arguments().immediate()); | |
1157 __ movq(args.GetReceiverOperand(), rdx); | |
1158 } | |
1159 } | |
1160 | |
1161 | |
1152 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, | 1162 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, |
1153 Handle<JSFunction> function) { | 1163 Handle<JSFunction> function) { |
1154 PatchGlobalProxy(object); | 1164 PatchGlobalProxy(object, function); |
1155 GenerateJumpFunctionIgnoreReceiver(function); | 1165 GenerateJumpFunctionIgnoreReceiver(function); |
1156 } | 1166 } |
1157 | 1167 |
1158 | 1168 |
1159 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, | 1169 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, |
1160 Register actual_closure, | 1170 Register actual_closure, |
1161 Handle<JSFunction> function) { | 1171 Handle<JSFunction> function) { |
1162 PatchGlobalProxy(object); | 1172 PatchGlobalProxy(object, function); |
1163 ParameterCount expected(function); | 1173 ParameterCount expected(function); |
1164 __ InvokeFunction(actual_closure, expected, arguments(), | 1174 __ InvokeFunction(actual_closure, expected, arguments(), |
1165 JUMP_FUNCTION, NullCallWrapper(), call_kind()); | 1175 JUMP_FUNCTION, NullCallWrapper(), call_kind()); |
1166 } | 1176 } |
1167 | 1177 |
1168 | 1178 |
1169 Handle<Code> CallStubCompiler::CompileCallConstant( | 1179 Handle<Code> CallStubCompiler::CompileCallConstant( |
1170 Handle<Object> object, | 1180 Handle<Object> object, |
1171 Handle<JSObject> holder, | 1181 Handle<JSObject> holder, |
1172 Handle<Name> name, | 1182 Handle<Name> name, |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1897 Handle<FunctionTemplateInfo>( | 1907 Handle<FunctionTemplateInfo>( |
1898 FunctionTemplateInfo::cast(signature->receiver())); | 1908 FunctionTemplateInfo::cast(signature->receiver())); |
1899 } | 1909 } |
1900 } | 1910 } |
1901 | 1911 |
1902 is_simple_api_call_ = true; | 1912 is_simple_api_call_ = true; |
1903 } | 1913 } |
1904 | 1914 |
1905 | 1915 |
1906 } } // namespace v8::internal | 1916 } } // namespace v8::internal |
OLD | NEW |