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

Side by Side Diff: src/ic.h

Issue 10615002: Track allocation info (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Diff with b_e Created 8 years, 1 month 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/macro-assembler-ia32.cc ('k') | src/objects.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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 kGrowICDelta); 419 kGrowICDelta);
420 } 420 }
421 return stub_kind; 421 return stub_kind;
422 } 422 }
423 423
424 virtual Handle<Code> GetElementStubWithoutMapCheck( 424 virtual Handle<Code> GetElementStubWithoutMapCheck(
425 bool is_js_array, 425 bool is_js_array,
426 ElementsKind elements_kind, 426 ElementsKind elements_kind,
427 KeyedAccessGrowMode grow_mode) = 0; 427 KeyedAccessGrowMode grow_mode) = 0;
428 428
429 static bool IsTransitionStubKind(StubKind stub_kind) {
430 return stub_kind > STORE_NO_TRANSITION &&
431 stub_kind != STORE_AND_GROW_NO_TRANSITION;
432 }
433
434 static bool IsGrowStubKind(StubKind stub_kind) {
435 return stub_kind >= STORE_AND_GROW_NO_TRANSITION;
436 }
437
429 protected: 438 protected:
430 virtual Handle<Code> string_stub() { 439 virtual Handle<Code> string_stub() {
431 return Handle<Code>::null(); 440 return Handle<Code>::null();
432 } 441 }
433 442
434 virtual Code::Kind kind() const = 0; 443 virtual Code::Kind kind() const = 0;
435 444
436 Handle<Code> ComputeStub(Handle<JSObject> receiver, 445 Handle<Code> ComputeStub(Handle<JSObject> receiver,
437 StubKind stub_kind, 446 StubKind stub_kind,
438 StrictModeFlag strict_mode, 447 StrictModeFlag strict_mode,
(...skipping 13 matching lines...) Expand all
452 void GetReceiverMapsForStub(Handle<Code> stub, MapHandleList* result); 461 void GetReceiverMapsForStub(Handle<Code> stub, MapHandleList* result);
453 462
454 Handle<Code> ComputeMonomorphicStub(Handle<Map> receiver_map, 463 Handle<Code> ComputeMonomorphicStub(Handle<Map> receiver_map,
455 StubKind stub_kind, 464 StubKind stub_kind,
456 StrictModeFlag strict_mode, 465 StrictModeFlag strict_mode,
457 Handle<Code> default_stub); 466 Handle<Code> default_stub);
458 467
459 Handle<Map> ComputeTransitionedMap(Handle<JSObject> receiver, 468 Handle<Map> ComputeTransitionedMap(Handle<JSObject> receiver,
460 StubKind stub_kind); 469 StubKind stub_kind);
461 470
462 static bool IsTransitionStubKind(StubKind stub_kind) {
463 return stub_kind > STORE_NO_TRANSITION &&
464 stub_kind != STORE_AND_GROW_NO_TRANSITION;
465 }
466
467 static bool IsGrowStubKind(StubKind stub_kind) {
468 return stub_kind >= STORE_AND_GROW_NO_TRANSITION;
469 }
470
471 static StubKind GetNoTransitionStubKind(StubKind stub_kind) { 471 static StubKind GetNoTransitionStubKind(StubKind stub_kind) {
472 if (!IsTransitionStubKind(stub_kind)) return stub_kind; 472 if (!IsTransitionStubKind(stub_kind)) return stub_kind;
473 if (IsGrowStubKind(stub_kind)) return STORE_AND_GROW_NO_TRANSITION; 473 if (IsGrowStubKind(stub_kind)) return STORE_AND_GROW_NO_TRANSITION;
474 return STORE_NO_TRANSITION; 474 return STORE_NO_TRANSITION;
475 } 475 }
476 }; 476 };
477 477
478 478
479 class KeyedLoadIC: public KeyedIC { 479 class KeyedLoadIC: public KeyedIC {
480 public: 480 public:
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 }; 849 };
850 850
851 851
852 // Helper for BinaryOpIC and CompareIC. 852 // Helper for BinaryOpIC and CompareIC.
853 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; 853 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK };
854 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); 854 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check);
855 855
856 } } // namespace v8::internal 856 } } // namespace v8::internal
857 857
858 #endif // V8_IC_H_ 858 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698