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

Side by Side Diff: src/ic.cc

Issue 149674: X64: Enable inline caching for calls, with some stubs stubbed out. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 5 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/ic.h ('k') | src/stub-cache.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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 if (!lookup.IsValid()) { 359 if (!lookup.IsValid()) {
360 // If the object does not have the requested property, check which 360 // If the object does not have the requested property, check which
361 // exception we need to throw. 361 // exception we need to throw.
362 if (is_contextual()) { 362 if (is_contextual()) {
363 return ReferenceError("not_defined", name); 363 return ReferenceError("not_defined", name);
364 } 364 }
365 return TypeError("undefined_method", object, name); 365 return TypeError("undefined_method", object, name);
366 } 366 }
367 367
368 // TODO(X64): Enable inline cache for calls.
369 #ifndef V8_TARGET_ARCH_X64
370 // Lookup is valid: Update inline cache and stub cache. 368 // Lookup is valid: Update inline cache and stub cache.
371 if (FLAG_use_ic && lookup.IsLoaded()) { 369 if (FLAG_use_ic && lookup.IsLoaded()) {
372 UpdateCaches(&lookup, state, object, name); 370 UpdateCaches(&lookup, state, object, name);
373 } 371 }
374 #endif
375 372
376 // Get the property. 373 // Get the property.
377 PropertyAttributes attr; 374 PropertyAttributes attr;
378 Object* result = object->GetProperty(*object, &lookup, *name, &attr); 375 Object* result = object->GetProperty(*object, &lookup, *name, &attr);
379 if (result->IsFailure()) return result; 376 if (result->IsFailure()) return result;
380 if (lookup.type() == INTERCEPTOR) { 377 if (lookup.type() == INTERCEPTOR) {
381 // If the object does not have the requested property, check which 378 // If the object does not have the requested property, check which
382 // exception we need to throw. 379 // exception we need to throw.
383 if (attr == ABSENT) { 380 if (attr == ABSENT) {
384 if (is_contextual()) { 381 if (is_contextual()) {
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 } 1242 }
1246 return *function; 1243 return *function;
1247 } 1244 }
1248 1245
1249 1246
1250 void CallIC::GenerateInitialize(MacroAssembler* masm, int argc) { 1247 void CallIC::GenerateInitialize(MacroAssembler* masm, int argc) {
1251 Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss))); 1248 Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss)));
1252 } 1249 }
1253 1250
1254 1251
1255 void CallIC::GeneratePreMonomorphic(MacroAssembler* masm, int argc) {
1256 Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss)));
1257 }
1258
1259
1260 void CallIC::GenerateMiss(MacroAssembler* masm, int argc) { 1252 void CallIC::GenerateMiss(MacroAssembler* masm, int argc) {
1261 Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss))); 1253 Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss)));
1262 } 1254 }
1263 1255
1264 1256
1265 // Used from ic_<arch>.cc. 1257 // Used from ic_<arch>.cc.
1266 Object* LoadIC_Miss(Arguments args) { 1258 Object* LoadIC_Miss(Arguments args) {
1267 NoHandleAllocation na; 1259 NoHandleAllocation na;
1268 ASSERT(args.length() == 2); 1260 ASSERT(args.length() == 2);
1269 LoadIC ic; 1261 LoadIC ic;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 #undef ADDR 1377 #undef ADDR
1386 }; 1378 };
1387 1379
1388 1380
1389 Address IC::AddressFromUtilityId(IC::UtilityId id) { 1381 Address IC::AddressFromUtilityId(IC::UtilityId id) {
1390 return IC_utilities[id]; 1382 return IC_utilities[id];
1391 } 1383 }
1392 1384
1393 1385
1394 } } // namespace v8::internal 1386 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698