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

Side by Side Diff: src/stub-cache.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/stub-cache.h ('k') | src/type-info.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 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 holder->LocalLookupRealNamedProperty(*name, lookup); 1261 holder->LocalLookupRealNamedProperty(*name, lookup);
1262 if (lookup->IsFound()) return; 1262 if (lookup->IsFound()) return;
1263 if (holder->GetPrototype()->IsNull()) return; 1263 if (holder->GetPrototype()->IsNull()) return;
1264 holder->GetPrototype()->Lookup(*name, lookup); 1264 holder->GetPrototype()->Lookup(*name, lookup);
1265 } 1265 }
1266 1266
1267 1267
1268 #define __ ACCESS_MASM(masm()) 1268 #define __ ACCESS_MASM(masm())
1269 1269
1270 1270
1271 CallKind CallStubCompiler::call_kind() {
1272 return CallICBase::Contextual::decode(extra_state())
1273 ? CALL_AS_FUNCTION
1274 : CALL_AS_METHOD;
1275 }
1276
1277
1278 void CallStubCompiler::HandlerFrontendFooter(Label* miss) { 1271 void CallStubCompiler::HandlerFrontendFooter(Label* miss) {
1279 __ bind(miss); 1272 __ bind(miss);
1280 GenerateMissBranch(); 1273 GenerateMissBranch();
1281 } 1274 }
1282 1275
1283 1276
1284 void CallStubCompiler::GenerateJumpFunctionIgnoreReceiver( 1277 void CallStubCompiler::GenerateJumpFunctionIgnoreReceiver(
1285 Handle<JSFunction> function) { 1278 Handle<JSFunction> function) {
1286 ParameterCount expected(function); 1279 ParameterCount expected(function);
1287 __ InvokeFunction(function, expected, arguments(), 1280 __ InvokeFunction(function, expected, arguments(),
1288 JUMP_FUNCTION, NullCallWrapper(), call_kind()); 1281 JUMP_FUNCTION, NullCallWrapper());
1289 } 1282 }
1290 1283
1291 1284
1292 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, 1285 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object,
1293 Handle<JSFunction> function) { 1286 Handle<JSFunction> function) {
1294 PatchImplicitReceiver(object); 1287 PatchImplicitReceiver(object);
1295 GenerateJumpFunctionIgnoreReceiver(function); 1288 GenerateJumpFunctionIgnoreReceiver(function);
1296 } 1289 }
1297 1290
1298 1291
1299 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, 1292 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object,
1300 Register actual_closure, 1293 Register actual_closure,
1301 Handle<JSFunction> function) { 1294 Handle<JSFunction> function) {
1302 PatchImplicitReceiver(object); 1295 PatchImplicitReceiver(object);
1303 ParameterCount expected(function); 1296 ParameterCount expected(function);
1304 __ InvokeFunction(actual_closure, expected, arguments(), 1297 __ InvokeFunction(actual_closure, expected, arguments(),
1305 JUMP_FUNCTION, NullCallWrapper(), call_kind()); 1298 JUMP_FUNCTION, NullCallWrapper());
1306 } 1299 }
1307 1300
1308 1301
1309 Handle<Code> CallStubCompiler::CompileCallConstant( 1302 Handle<Code> CallStubCompiler::CompileCallConstant(
1310 Handle<Object> object, 1303 Handle<Object> object,
1311 Handle<JSObject> holder, 1304 Handle<JSObject> holder,
1312 Handle<Name> name, 1305 Handle<Name> name,
1313 CheckType check, 1306 CheckType check,
1314 Handle<JSFunction> function) { 1307 Handle<JSFunction> function) {
1315 if (HasCustomCallGenerator(function)) { 1308 if (HasCustomCallGenerator(function)) {
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
2041 Handle<FunctionTemplateInfo>( 2034 Handle<FunctionTemplateInfo>(
2042 FunctionTemplateInfo::cast(signature->receiver())); 2035 FunctionTemplateInfo::cast(signature->receiver()));
2043 } 2036 }
2044 } 2037 }
2045 2038
2046 is_simple_api_call_ = true; 2039 is_simple_api_call_ = true;
2047 } 2040 }
2048 2041
2049 2042
2050 } } // namespace v8::internal 2043 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698