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

Side by Side Diff: src/ic.h

Issue 6295013: Revert r6376 and r6373 which changes external array support. The ARM... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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/stub-cache-ia32.cc ('k') | src/ic.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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // Code generator routines. 338 // Code generator routines.
339 static void GenerateMiss(MacroAssembler* masm); 339 static void GenerateMiss(MacroAssembler* masm);
340 static void GenerateRuntimeGetProperty(MacroAssembler* masm); 340 static void GenerateRuntimeGetProperty(MacroAssembler* masm);
341 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } 341 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
342 static void GeneratePreMonomorphic(MacroAssembler* masm) { 342 static void GeneratePreMonomorphic(MacroAssembler* masm) {
343 GenerateMiss(masm); 343 GenerateMiss(masm);
344 } 344 }
345 static void GenerateGeneric(MacroAssembler* masm); 345 static void GenerateGeneric(MacroAssembler* masm);
346 static void GenerateString(MacroAssembler* masm); 346 static void GenerateString(MacroAssembler* masm);
347 347
348 // Generators for external array types. See objects.h.
349 // These are similar to the generic IC; they optimize the case of
350 // operating upon external array types but fall back to the runtime
351 // for all other types.
352 static void GenerateExternalArray(MacroAssembler* masm,
353 ExternalArrayType array_type);
348 static void GenerateIndexedInterceptor(MacroAssembler* masm); 354 static void GenerateIndexedInterceptor(MacroAssembler* masm);
349 355
350 // Clear the use of the inlined version. 356 // Clear the use of the inlined version.
351 static void ClearInlinedVersion(Address address); 357 static void ClearInlinedVersion(Address address);
352 358
353 // Bit mask to be tested against bit field for the cases when 359 // Bit mask to be tested against bit field for the cases when
354 // generic stub should go into slow case. 360 // generic stub should go into slow case.
355 // Access check is necessary explicitly since generic stub does not perform 361 // Access check is necessary explicitly since generic stub does not perform
356 // map checks. 362 // map checks.
357 static const int kSlowCaseBitFieldMask = 363 static const int kSlowCaseBitFieldMask =
(...skipping 15 matching lines...) Expand all
373 } 379 }
374 static Code* generic_stub() { 380 static Code* generic_stub() {
375 return Builtins::builtin(Builtins::KeyedLoadIC_Generic); 381 return Builtins::builtin(Builtins::KeyedLoadIC_Generic);
376 } 382 }
377 static Code* pre_monomorphic_stub() { 383 static Code* pre_monomorphic_stub() {
378 return Builtins::builtin(Builtins::KeyedLoadIC_PreMonomorphic); 384 return Builtins::builtin(Builtins::KeyedLoadIC_PreMonomorphic);
379 } 385 }
380 static Code* string_stub() { 386 static Code* string_stub() {
381 return Builtins::builtin(Builtins::KeyedLoadIC_String); 387 return Builtins::builtin(Builtins::KeyedLoadIC_String);
382 } 388 }
389 static Code* external_array_stub(JSObject::ElementsKind elements_kind);
383 390
384 static Code* indexed_interceptor_stub() { 391 static Code* indexed_interceptor_stub() {
385 return Builtins::builtin(Builtins::KeyedLoadIC_IndexedInterceptor); 392 return Builtins::builtin(Builtins::KeyedLoadIC_IndexedInterceptor);
386 } 393 }
387 394
388 static void Clear(Address address, Code* target); 395 static void Clear(Address address, Code* target);
389 396
390 // Support for patching the map that is checked in an inlined 397 // Support for patching the map that is checked in an inlined
391 // version of keyed load. 398 // version of keyed load.
392 static bool PatchInlinedLoad(Address address, Object* map); 399 static bool PatchInlinedLoad(Address address, Object* map);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 Handle<Object> object, 463 Handle<Object> object,
457 Handle<Object> name, 464 Handle<Object> name,
458 Handle<Object> value); 465 Handle<Object> value);
459 466
460 // Code generators for stub routines. Only called once at startup. 467 // Code generators for stub routines. Only called once at startup.
461 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } 468 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
462 static void GenerateMiss(MacroAssembler* masm); 469 static void GenerateMiss(MacroAssembler* masm);
463 static void GenerateRuntimeSetProperty(MacroAssembler* masm); 470 static void GenerateRuntimeSetProperty(MacroAssembler* masm);
464 static void GenerateGeneric(MacroAssembler* masm); 471 static void GenerateGeneric(MacroAssembler* masm);
465 472
473 // Generators for external array types. See objects.h.
474 // These are similar to the generic IC; they optimize the case of
475 // operating upon external array types but fall back to the runtime
476 // for all other types.
477 static void GenerateExternalArray(MacroAssembler* masm,
478 ExternalArrayType array_type);
479
466 // Clear the inlined version so the IC is always hit. 480 // Clear the inlined version so the IC is always hit.
467 static void ClearInlinedVersion(Address address); 481 static void ClearInlinedVersion(Address address);
468 482
469 // Restore the inlined version so the fast case can get hit. 483 // Restore the inlined version so the fast case can get hit.
470 static void RestoreInlinedVersion(Address address); 484 static void RestoreInlinedVersion(Address address);
471 485
472 private: 486 private:
473 // Update the inline cache. 487 // Update the inline cache.
474 void UpdateCaches(LookupResult* lookup, 488 void UpdateCaches(LookupResult* lookup,
475 State state, 489 State state,
476 Handle<JSObject> receiver, 490 Handle<JSObject> receiver,
477 Handle<String> name, 491 Handle<String> name,
478 Handle<Object> value); 492 Handle<Object> value);
479 493
480 // Stub accessors. 494 // Stub accessors.
481 static Code* initialize_stub() { 495 static Code* initialize_stub() {
482 return Builtins::builtin(Builtins::KeyedStoreIC_Initialize); 496 return Builtins::builtin(Builtins::KeyedStoreIC_Initialize);
483 } 497 }
484 static Code* megamorphic_stub() { 498 static Code* megamorphic_stub() {
485 return Builtins::builtin(Builtins::KeyedStoreIC_Generic); 499 return Builtins::builtin(Builtins::KeyedStoreIC_Generic);
486 } 500 }
487 static Code* generic_stub() { 501 static Code* generic_stub() {
488 return Builtins::builtin(Builtins::KeyedStoreIC_Generic); 502 return Builtins::builtin(Builtins::KeyedStoreIC_Generic);
489 } 503 }
504 static Code* external_array_stub(JSObject::ElementsKind elements_kind);
490 505
491 static void Clear(Address address, Code* target); 506 static void Clear(Address address, Code* target);
492 507
493 // Support for patching the map that is checked in an inlined 508 // Support for patching the map that is checked in an inlined
494 // version of keyed store. 509 // version of keyed store.
495 // The address is the patch point for the IC call 510 // The address is the patch point for the IC call
496 // (Assembler::kCallTargetAddressOffset before the end of 511 // (Assembler::kCallTargetAddressOffset before the end of
497 // the call/return address). 512 // the call/return address).
498 // The map is the new map that the inlined code should check against. 513 // The map is the new map that the inlined code should check against.
499 static bool PatchInlinedStore(Address address, Object* map); 514 static bool PatchInlinedStore(Address address, Object* map);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 604
590 Token::Value op_; 605 Token::Value op_;
591 }; 606 };
592 607
593 // Helper for TRBinaryOpIC and CompareIC. 608 // Helper for TRBinaryOpIC and CompareIC.
594 void PatchInlinedSmiCode(Address address); 609 void PatchInlinedSmiCode(Address address);
595 610
596 } } // namespace v8::internal 611 } } // namespace v8::internal
597 612
598 #endif // V8_IC_H_ 613 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698