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

Side by Side Diff: src/stub-cache.cc

Issue 7036016: Reland 7917: (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes to make re-land work Created 9 years, 7 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.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 2011 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
11 // with the distribution. 11 // with the distribution.
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 Object* result; 450 Object* result;
451 { MaybeObject* maybe_result = 451 { MaybeObject* maybe_result =
452 receiver->UpdateMapCodeCache(name, Code::cast(code)); 452 receiver->UpdateMapCodeCache(name, Code::cast(code));
453 if (!maybe_result->ToObject(&result)) return maybe_result; 453 if (!maybe_result->ToObject(&result)) return maybe_result;
454 } 454 }
455 } 455 }
456 return code; 456 return code;
457 } 457 }
458 458
459 459
460 MaybeObject* StubCache::ComputeKeyedLoadSpecialized(JSObject* receiver) {
461 // Using NORMAL as the PropertyType for array element loads is a misuse. The
462 // generated stub always accesses fast elements, not slow-mode fields, but
463 // some property type is required for the stub lookup. Note that overloading
464 // the NORMAL PropertyType is only safe as long as no stubs are generated for
465 // other keyed field loads. This is guaranteed to be the case since all field
466 // keyed loads that are not array elements go through a generic builtin stub.
467 Code::Flags flags =
468 Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, NORMAL);
469 String* name = heap()->KeyedLoadSpecialized_symbol();
470 Object* code = receiver->map()->FindInCodeCache(name, flags);
471 if (code->IsUndefined()) {
472 KeyedLoadStubCompiler compiler;
473 { MaybeObject* maybe_code = compiler.CompileLoadSpecialized(receiver);
474 if (!maybe_code->ToObject(&code)) return maybe_code;
475 }
476 PROFILE(isolate_,
477 CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), 0));
478 Object* result;
479 { MaybeObject* maybe_result =
480 receiver->UpdateMapCodeCache(name, Code::cast(code));
481 if (!maybe_result->ToObject(&result)) return maybe_result;
482 }
483 }
484 return code;
485 }
486
487
488 MaybeObject* StubCache::ComputeStoreField(String* name, 460 MaybeObject* StubCache::ComputeStoreField(String* name,
489 JSObject* receiver, 461 JSObject* receiver,
490 int field_index, 462 int field_index,
491 Map* transition, 463 Map* transition,
492 StrictModeFlag strict_mode) { 464 StrictModeFlag strict_mode) {
493 PropertyType type = (transition == NULL) ? FIELD : MAP_TRANSITION; 465 PropertyType type = (transition == NULL) ? FIELD : MAP_TRANSITION;
494 Code::Flags flags = Code::ComputeMonomorphicFlags( 466 Code::Flags flags = Code::ComputeMonomorphicFlags(
495 Code::STORE_IC, type, strict_mode); 467 Code::STORE_IC, type, strict_mode);
496 Object* code = receiver->map()->FindInCodeCache(name, flags); 468 Object* code = receiver->map()->FindInCodeCache(name, flags);
497 if (code->IsUndefined()) { 469 if (code->IsUndefined()) {
498 StoreStubCompiler compiler(strict_mode); 470 StoreStubCompiler compiler(strict_mode);
499 { MaybeObject* maybe_code = 471 { MaybeObject* maybe_code =
500 compiler.CompileStoreField(receiver, field_index, transition, name); 472 compiler.CompileStoreField(receiver, field_index, transition, name);
501 if (!maybe_code->ToObject(&code)) return maybe_code; 473 if (!maybe_code->ToObject(&code)) return maybe_code;
502 } 474 }
503 PROFILE(isolate_, 475 PROFILE(isolate_,
504 CodeCreateEvent(Logger::STORE_IC_TAG, Code::cast(code), name)); 476 CodeCreateEvent(Logger::STORE_IC_TAG, Code::cast(code), name));
505 GDBJIT(AddCode(GDBJITInterface::STORE_IC, name, Code::cast(code))); 477 GDBJIT(AddCode(GDBJITInterface::STORE_IC, name, Code::cast(code)));
506 Object* result; 478 Object* result;
507 { MaybeObject* maybe_result = 479 { MaybeObject* maybe_result =
508 receiver->UpdateMapCodeCache(name, Code::cast(code)); 480 receiver->UpdateMapCodeCache(name, Code::cast(code));
509 if (!maybe_result->ToObject(&result)) return maybe_result; 481 if (!maybe_result->ToObject(&result)) return maybe_result;
510 } 482 }
511 } 483 }
512 return code; 484 return code;
513 } 485 }
514 486
515 487
516 MaybeObject* StubCache::ComputeKeyedStoreSpecialized(
517 JSObject* receiver,
518 StrictModeFlag strict_mode) {
519 Code::Flags flags =
520 Code::ComputeMonomorphicFlags(Code::KEYED_STORE_IC, NORMAL, strict_mode);
521 String* name = heap()->KeyedStoreSpecialized_symbol();
522 Object* code = receiver->map()->FindInCodeCache(name, flags);
523 if (code->IsUndefined()) {
524 KeyedStoreStubCompiler compiler(strict_mode);
525 { MaybeObject* maybe_code = compiler.CompileStoreSpecialized(receiver);
526 if (!maybe_code->ToObject(&code)) return maybe_code;
527 }
528 PROFILE(isolate_,
529 CodeCreateEvent(Logger::KEYED_STORE_IC_TAG, Code::cast(code), 0));
530 Object* result;
531 { MaybeObject* maybe_result =
532 receiver->UpdateMapCodeCache(name, Code::cast(code));
533 if (!maybe_result->ToObject(&result)) return maybe_result;
534 }
535 }
536 return code;
537 }
538
539
540 namespace { 488 namespace {
541 489
542 ExternalArrayType ElementsKindToExternalArrayType(JSObject::ElementsKind kind) { 490 ExternalArrayType ElementsKindToExternalArrayType(JSObject::ElementsKind kind) {
543 switch (kind) { 491 switch (kind) {
544 case JSObject::EXTERNAL_BYTE_ELEMENTS: 492 case JSObject::EXTERNAL_BYTE_ELEMENTS:
545 return kExternalByteArray; 493 return kExternalByteArray;
546 case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS: 494 case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
547 return kExternalUnsignedByteArray; 495 return kExternalUnsignedByteArray;
548 case JSObject::EXTERNAL_SHORT_ELEMENTS: 496 case JSObject::EXTERNAL_SHORT_ELEMENTS:
549 return kExternalShortArray; 497 return kExternalShortArray;
550 case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 498 case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
551 return kExternalUnsignedShortArray; 499 return kExternalUnsignedShortArray;
552 case JSObject::EXTERNAL_INT_ELEMENTS: 500 case JSObject::EXTERNAL_INT_ELEMENTS:
553 return kExternalIntArray; 501 return kExternalIntArray;
554 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: 502 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS:
555 return kExternalUnsignedIntArray; 503 return kExternalUnsignedIntArray;
556 case JSObject::EXTERNAL_FLOAT_ELEMENTS: 504 case JSObject::EXTERNAL_FLOAT_ELEMENTS:
557 return kExternalFloatArray; 505 return kExternalFloatArray;
558 case JSObject::EXTERNAL_DOUBLE_ELEMENTS: 506 case JSObject::EXTERNAL_DOUBLE_ELEMENTS:
559 return kExternalDoubleArray; 507 return kExternalDoubleArray;
560 case JSObject::EXTERNAL_PIXEL_ELEMENTS: 508 case JSObject::EXTERNAL_PIXEL_ELEMENTS:
561 return kExternalPixelArray; 509 return kExternalPixelArray;
562 default: 510 default:
563 UNREACHABLE(); 511 UNREACHABLE();
564 return static_cast<ExternalArrayType>(0); 512 return static_cast<ExternalArrayType>(0);
565 } 513 }
566 } 514 }
567 515
568 String* ExternalArrayTypeToStubName(Heap* heap,
569 ExternalArrayType array_type,
570 bool is_store) {
571 if (is_store) {
572 switch (array_type) {
573 case kExternalByteArray:
574 return heap->KeyedStoreExternalByteArray_symbol();
575 case kExternalUnsignedByteArray:
576 return heap->KeyedStoreExternalUnsignedByteArray_symbol();
577 case kExternalShortArray:
578 return heap->KeyedStoreExternalShortArray_symbol();
579 case kExternalUnsignedShortArray:
580 return heap->KeyedStoreExternalUnsignedShortArray_symbol();
581 case kExternalIntArray:
582 return heap->KeyedStoreExternalIntArray_symbol();
583 case kExternalUnsignedIntArray:
584 return heap->KeyedStoreExternalUnsignedIntArray_symbol();
585 case kExternalFloatArray:
586 return heap->KeyedStoreExternalFloatArray_symbol();
587 case kExternalDoubleArray:
588 return heap->KeyedStoreExternalDoubleArray_symbol();
589 case kExternalPixelArray:
590 return heap->KeyedStoreExternalPixelArray_symbol();
591 default:
592 UNREACHABLE();
593 return NULL;
594 }
595 } else {
596 switch (array_type) {
597 case kExternalByteArray:
598 return heap->KeyedLoadExternalByteArray_symbol();
599 case kExternalUnsignedByteArray:
600 return heap->KeyedLoadExternalUnsignedByteArray_symbol();
601 case kExternalShortArray:
602 return heap->KeyedLoadExternalShortArray_symbol();
603 case kExternalUnsignedShortArray:
604 return heap->KeyedLoadExternalUnsignedShortArray_symbol();
605 case kExternalIntArray:
606 return heap->KeyedLoadExternalIntArray_symbol();
607 case kExternalUnsignedIntArray:
608 return heap->KeyedLoadExternalUnsignedIntArray_symbol();
609 case kExternalFloatArray:
610 return heap->KeyedLoadExternalFloatArray_symbol();
611 case kExternalDoubleArray:
612 return heap->KeyedLoadExternalDoubleArray_symbol();
613 case kExternalPixelArray:
614 return heap->KeyedLoadExternalPixelArray_symbol();
615 default:
616 UNREACHABLE();
617 return NULL;
618 }
619 }
620 }
621
622 } // anonymous namespace 516 } // anonymous namespace
623 517
624 518
625 MaybeObject* StubCache::ComputeKeyedLoadOrStoreExternalArray( 519 MaybeObject* StubCache::ComputeKeyedLoadOrStoreExternalArray(
626 JSObject* receiver, 520 JSObject* receiver,
627 bool is_store, 521 bool is_store,
628 StrictModeFlag strict_mode) { 522 StrictModeFlag strict_mode) {
629 Code::Flags flags = 523 Code::Flags flags =
630 Code::ComputeMonomorphicFlags( 524 Code::ComputeMonomorphicFlags(
631 is_store ? Code::KEYED_EXTERNAL_ARRAY_STORE_IC : 525 is_store ? Code::KEYED_STORE_IC :
632 Code::KEYED_EXTERNAL_ARRAY_LOAD_IC, 526 Code::KEYED_LOAD_IC,
633 NORMAL, 527 NORMAL,
634 strict_mode); 528 strict_mode);
635 ExternalArrayType array_type = 529 ExternalArrayType array_type =
636 ElementsKindToExternalArrayType(receiver->GetElementsKind()); 530 ElementsKindToExternalArrayType(receiver->GetElementsKind());
637 String* name = ExternalArrayTypeToStubName(heap(), array_type, is_store); 531 String* name = is_store
638 Object* code = receiver->map()->FindInCodeCache(name, flags); 532 ? isolate()->heap()->KeyedStoreSpecializedMonomorphic_symbol()
639 if (code->IsUndefined()) { 533 : isolate()->heap()->KeyedLoadSpecializedMonomorphic_symbol();
640 ExternalArrayStubCompiler compiler; 534 Object* maybe_code = receiver->map()->FindInCodeCache(name, flags);
641 { MaybeObject* maybe_code = 535 if (!maybe_code->IsUndefined()) return Code::cast(maybe_code);
642 is_store ? 536
643 compiler.CompileKeyedStoreStub(receiver, array_type, flags) : 537 MaybeObject* maybe_new_code = NULL;
644 compiler.CompileKeyedLoadStub(receiver, array_type, flags); 538 if (is_store) {
645 if (!maybe_code->ToObject(&code)) return maybe_code; 539 ExternalArrayStoreStubCompiler compiler(strict_mode);
646 } 540 maybe_new_code = compiler.CompileStore(receiver, array_type);
647 Code::cast(code)->set_external_array_type(array_type); 541 } else {
648 if (is_store) { 542 ExternalArrayLoadStubCompiler compiler(strict_mode);
649 PROFILE(isolate_, 543 maybe_new_code = compiler.CompileLoad(receiver, array_type);
650 CodeCreateEvent(Logger::KEYED_EXTERNAL_ARRAY_STORE_IC_TAG, 544 }
651 Code::cast(code), 0)); 545 Code* code;
652 } else { 546 if (!maybe_new_code->To(&code)) return maybe_new_code;
653 PROFILE(isolate_, 547 code->set_external_array_type(array_type);
654 CodeCreateEvent(Logger::KEYED_EXTERNAL_ARRAY_LOAD_IC_TAG, 548 if (is_store) {
655 Code::cast(code), 0)); 549 PROFILE(isolate_,
656 } 550 CodeCreateEvent(Logger::KEYED_EXTERNAL_ARRAY_STORE_IC_TAG,
657 Object* result; 551 Code::cast(code), 0));
658 { MaybeObject* maybe_result = 552 } else {
659 receiver->UpdateMapCodeCache(name, Code::cast(code)); 553 PROFILE(isolate_,
660 if (!maybe_result->ToObject(&result)) return maybe_result; 554 CodeCreateEvent(Logger::KEYED_EXTERNAL_ARRAY_LOAD_IC_TAG,
661 } 555 Code::cast(code), 0));
556 }
557 ASSERT(code->IsCode());
558 Object* result;
559 { MaybeObject* maybe_result =
560 receiver->UpdateMapCodeCache(name, Code::cast(code));
561 if (!maybe_result->ToObject(&result)) return maybe_result;
662 } 562 }
663 return code; 563 return code;
664 } 564 }
565
566
567 MaybeObject* StubCache::ComputeKeyedLoadOrStoreFastElement(
568 JSObject* receiver,
569 bool is_store,
570 StrictModeFlag strict_mode) {
571 Code::Flags flags =
572 Code::ComputeMonomorphicFlags(
573 is_store ? Code::KEYED_STORE_IC :
574 Code::KEYED_LOAD_IC,
575 NORMAL,
576 strict_mode);
577 String* name = is_store
578 ? isolate()->heap()->KeyedStoreSpecializedMonomorphic_symbol()
579 : isolate()->heap()->KeyedLoadSpecializedMonomorphic_symbol();
580 Object* maybe_code = receiver->map()->FindInCodeCache(name, flags);
581 if (!maybe_code->IsUndefined()) return Code::cast(maybe_code);
582
583 MaybeObject* maybe_new_code = NULL;
584 if (is_store) {
585 KeyedStoreStubCompiler compiler(strict_mode);
586 maybe_new_code = compiler.CompileStoreFastElement(receiver->map());
587 } else {
588 KeyedLoadStubCompiler compiler;
589 maybe_new_code = compiler.CompileLoadFastElement(receiver->map());
590 }
591 Code* code;
592 if (!maybe_new_code->To(&code)) return maybe_new_code;
593 if (is_store) {
594 PROFILE(isolate_,
595 CodeCreateEvent(Logger::KEYED_STORE_IC_TAG,
596 Code::cast(code), 0));
597 } else {
598 PROFILE(isolate_,
599 CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG,
600 Code::cast(code), 0));
601 }
602 ASSERT(code->IsCode());
603 Object* result;
604 { MaybeObject* maybe_result =
605 receiver->UpdateMapCodeCache(name, Code::cast(code));
606 if (!maybe_result->ToObject(&result)) return maybe_result;
607 }
608 return code;
609 }
665 610
666 611
667 MaybeObject* StubCache::ComputeStoreNormal(StrictModeFlag strict_mode) { 612 MaybeObject* StubCache::ComputeStoreNormal(StrictModeFlag strict_mode) {
668 return isolate_->builtins()->builtin((strict_mode == kStrictMode) 613 return isolate_->builtins()->builtin((strict_mode == kStrictMode)
669 ? Builtins::kStoreIC_Normal_Strict 614 ? Builtins::kStoreIC_Normal_Strict
670 : Builtins::kStoreIC_Normal); 615 : Builtins::kStoreIC_Normal);
671 } 616 }
672 617
673 618
674 MaybeObject* StubCache::ComputeStoreGlobal(String* name, 619 MaybeObject* StubCache::ComputeStoreGlobal(String* name,
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 Code::cast(result->ToObjectUnchecked()), 1655 Code::cast(result->ToObjectUnchecked()),
1711 name)); 1656 name));
1712 GDBJIT(AddCode(GDBJITInterface::LOAD_IC, 1657 GDBJIT(AddCode(GDBJITInterface::LOAD_IC,
1713 name, 1658 name,
1714 Code::cast(result->ToObjectUnchecked()))); 1659 Code::cast(result->ToObjectUnchecked())));
1715 } 1660 }
1716 return result; 1661 return result;
1717 } 1662 }
1718 1663
1719 1664
1720 MaybeObject* KeyedLoadStubCompiler::GetCode(PropertyType type, String* name) { 1665 MaybeObject* KeyedLoadStubCompiler::GetCode(PropertyType type,
1721 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, type); 1666 String* name,
1667 InlineCacheState state) {
1668 Code::Flags flags = Code::ComputeFlags(
1669 Code::KEYED_LOAD_IC, NOT_IN_LOOP, state, Code::kNoExtraICState, type);
1722 MaybeObject* result = GetCodeWithFlags(flags, name); 1670 MaybeObject* result = GetCodeWithFlags(flags, name);
1723 if (!result->IsFailure()) { 1671 if (!result->IsFailure()) {
1724 PROFILE(isolate(), 1672 PROFILE(isolate(),
1725 CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, 1673 CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG,
1726 Code::cast(result->ToObjectUnchecked()), 1674 Code::cast(result->ToObjectUnchecked()),
1727 name)); 1675 name));
1728 GDBJIT(AddCode(GDBJITInterface::LOAD_IC, 1676 GDBJIT(AddCode(GDBJITInterface::LOAD_IC,
1729 name, 1677 name,
1730 Code::cast(result->ToObjectUnchecked()))); 1678 Code::cast(result->ToObjectUnchecked())));
1731 } 1679 }
(...skipping 11 matching lines...) Expand all
1743 Code::cast(result->ToObjectUnchecked()), 1691 Code::cast(result->ToObjectUnchecked()),
1744 name)); 1692 name));
1745 GDBJIT(AddCode(GDBJITInterface::STORE_IC, 1693 GDBJIT(AddCode(GDBJITInterface::STORE_IC,
1746 name, 1694 name,
1747 Code::cast(result->ToObjectUnchecked()))); 1695 Code::cast(result->ToObjectUnchecked())));
1748 } 1696 }
1749 return result; 1697 return result;
1750 } 1698 }
1751 1699
1752 1700
1753 MaybeObject* KeyedStoreStubCompiler::GetCode(PropertyType type, String* name) { 1701 MaybeObject* KeyedStoreStubCompiler::GetCode(PropertyType type,
1754 Code::Flags flags = Code::ComputeMonomorphicFlags( 1702 String* name,
1755 Code::KEYED_STORE_IC, type, strict_mode_); 1703 InlineCacheState state) {
1704 Code::Flags flags = Code::ComputeFlags(
1705 Code::KEYED_STORE_IC, NOT_IN_LOOP, state, strict_mode_, type);
1756 MaybeObject* result = GetCodeWithFlags(flags, name); 1706 MaybeObject* result = GetCodeWithFlags(flags, name);
1757 if (!result->IsFailure()) { 1707 if (!result->IsFailure()) {
1758 PROFILE(isolate(), 1708 PROFILE(isolate(),
1759 CodeCreateEvent(Logger::KEYED_STORE_IC_TAG, 1709 CodeCreateEvent(Logger::KEYED_STORE_IC_TAG,
1760 Code::cast(result->ToObjectUnchecked()), 1710 Code::cast(result->ToObjectUnchecked()),
1761 name)); 1711 name));
1762 GDBJIT(AddCode(GDBJITInterface::KEYED_STORE_IC, 1712 GDBJIT(AddCode(GDBJITInterface::KEYED_STORE_IC,
1763 name, 1713 name,
1764 Code::cast(result->ToObjectUnchecked()))); 1714 Code::cast(result->ToObjectUnchecked())));
1765 } 1715 }
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1923 if (!signature->receiver()->IsUndefined()) { 1873 if (!signature->receiver()->IsUndefined()) {
1924 expected_receiver_type_ = 1874 expected_receiver_type_ =
1925 FunctionTemplateInfo::cast(signature->receiver()); 1875 FunctionTemplateInfo::cast(signature->receiver());
1926 } 1876 }
1927 } 1877 }
1928 1878
1929 is_simple_api_call_ = true; 1879 is_simple_api_call_ = true;
1930 } 1880 }
1931 1881
1932 1882
1933 MaybeObject* ExternalArrayStubCompiler::GetCode(Code::Flags flags) { 1883 MaybeObject* ExternalArrayLoadStubCompiler::GetCode() {
1934 Object* result; 1884 Object* result;
1935 { MaybeObject* maybe_result = GetCodeWithFlags(flags, "ExternalArrayStub"); 1885 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC,
1886 NORMAL,
1887 strict_mode_);
1888 { MaybeObject* maybe_result = GetCodeWithFlags(flags,
1889 "ExternalArrayLoadStub");
1936 if (!maybe_result->ToObject(&result)) return maybe_result; 1890 if (!maybe_result->ToObject(&result)) return maybe_result;
1937 } 1891 }
1938 Code* code = Code::cast(result); 1892 Code* code = Code::cast(result);
1939 USE(code); 1893 USE(code);
1940 PROFILE(isolate(), 1894 PROFILE(isolate(),
1941 CodeCreateEvent(Logger::STUB_TAG, code, "ExternalArrayStub")); 1895 CodeCreateEvent(Logger::STUB_TAG, code, "ExternalArrayLoadStub"));
1942 return result; 1896 return result;
1943 } 1897 }
1944 1898
1899
1900 MaybeObject* ExternalArrayStoreStubCompiler::GetCode() {
1901 Object* result;
1902 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_STORE_IC,
1903 NORMAL,
1904 strict_mode_);
1905 { MaybeObject* maybe_result = GetCodeWithFlags(flags,
1906 "ExternalArrayStoreStub");
1907 if (!maybe_result->ToObject(&result)) return maybe_result;
1908 }
1909 Code* code = Code::cast(result);
1910 USE(code);
1911 PROFILE(isolate(),
1912 CodeCreateEvent(Logger::STUB_TAG, code, "ExternalArrayStoreStub"));
1913 return result;
1914 }
1915
1945 1916
1946 } } // namespace v8::internal 1917 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698