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

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

Issue 7348008: Merge up to 8597 to experimental/gc from the bleeding edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 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/stub-cache.h ('k') | src/token.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 2011 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
(...skipping 11 matching lines...) Expand all
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "api.h" 30 #include "api.h"
31 #include "arguments.h" 31 #include "arguments.h"
32 #include "code-stubs.h"
32 #include "gdb-jit.h" 33 #include "gdb-jit.h"
33 #include "ic-inl.h" 34 #include "ic-inl.h"
34 #include "stub-cache.h" 35 #include "stub-cache.h"
35 #include "vm-state-inl.h" 36 #include "vm-state-inl.h"
36 37
37 namespace v8 { 38 namespace v8 {
38 namespace internal { 39 namespace internal {
39 40
40 // ----------------------------------------------------------------------- 41 // -----------------------------------------------------------------------
41 // StubCache implementation. 42 // StubCache implementation.
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 Object* result; 479 Object* result;
479 { MaybeObject* maybe_result = 480 { MaybeObject* maybe_result =
480 receiver->UpdateMapCodeCache(name, Code::cast(code)); 481 receiver->UpdateMapCodeCache(name, Code::cast(code));
481 if (!maybe_result->ToObject(&result)) return maybe_result; 482 if (!maybe_result->ToObject(&result)) return maybe_result;
482 } 483 }
483 } 484 }
484 return code; 485 return code;
485 } 486 }
486 487
487 488
488 namespace { 489 MaybeObject* StubCache::ComputeKeyedLoadOrStoreElement(
489
490 ExternalArrayType ElementsKindToExternalArrayType(JSObject::ElementsKind kind) {
491 switch (kind) {
492 case JSObject::EXTERNAL_BYTE_ELEMENTS:
493 return kExternalByteArray;
494 case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
495 return kExternalUnsignedByteArray;
496 case JSObject::EXTERNAL_SHORT_ELEMENTS:
497 return kExternalShortArray;
498 case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
499 return kExternalUnsignedShortArray;
500 case JSObject::EXTERNAL_INT_ELEMENTS:
501 return kExternalIntArray;
502 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS:
503 return kExternalUnsignedIntArray;
504 case JSObject::EXTERNAL_FLOAT_ELEMENTS:
505 return kExternalFloatArray;
506 case JSObject::EXTERNAL_DOUBLE_ELEMENTS:
507 return kExternalDoubleArray;
508 case JSObject::EXTERNAL_PIXEL_ELEMENTS:
509 return kExternalPixelArray;
510 default:
511 UNREACHABLE();
512 return static_cast<ExternalArrayType>(0);
513 }
514 }
515
516 } // anonymous namespace
517
518
519 MaybeObject* StubCache::ComputeKeyedLoadOrStoreExternalArray(
520 JSObject* receiver, 490 JSObject* receiver,
521 bool is_store, 491 bool is_store,
522 StrictModeFlag strict_mode) { 492 StrictModeFlag strict_mode) {
523 Code::Flags flags = 493 Code::Flags flags =
524 Code::ComputeMonomorphicFlags( 494 Code::ComputeMonomorphicFlags(
525 is_store ? Code::KEYED_STORE_IC : 495 is_store ? Code::KEYED_STORE_IC :
526 Code::KEYED_LOAD_IC, 496 Code::KEYED_LOAD_IC,
527 NORMAL, 497 NORMAL,
528 strict_mode); 498 strict_mode);
529 ExternalArrayType array_type =
530 ElementsKindToExternalArrayType(receiver->GetElementsKind());
531 String* name = is_store 499 String* name = is_store
532 ? isolate()->heap()->KeyedStoreSpecializedMonomorphic_symbol() 500 ? isolate()->heap()->KeyedStoreElementMonomorphic_symbol()
533 : isolate()->heap()->KeyedLoadSpecializedMonomorphic_symbol(); 501 : isolate()->heap()->KeyedLoadElementMonomorphic_symbol();
534 Object* maybe_code = receiver->map()->FindInCodeCache(name, flags); 502 Object* maybe_code = receiver->map()->FindInCodeCache(name, flags);
535 if (!maybe_code->IsUndefined()) return Code::cast(maybe_code); 503 if (!maybe_code->IsUndefined()) return Code::cast(maybe_code);
536 504
537 MaybeObject* maybe_new_code = NULL; 505 MaybeObject* maybe_new_code = NULL;
506 Map* receiver_map = receiver->map();
538 if (is_store) { 507 if (is_store) {
539 ExternalArrayStoreStubCompiler compiler(strict_mode); 508 KeyedStoreStubCompiler compiler(strict_mode);
540 maybe_new_code = compiler.CompileStore(receiver, array_type); 509 maybe_new_code = compiler.CompileStoreElement(receiver_map);
541 } else { 510 } else {
542 ExternalArrayLoadStubCompiler compiler(strict_mode); 511 KeyedLoadStubCompiler compiler;
543 maybe_new_code = compiler.CompileLoad(receiver, array_type); 512 maybe_new_code = compiler.CompileLoadElement(receiver_map);
544 } 513 }
545 Code* code; 514 Code* code;
546 if (!maybe_new_code->To(&code)) return maybe_new_code; 515 if (!maybe_new_code->To(&code)) return maybe_new_code;
547 code->set_external_array_type(array_type);
548 if (is_store) {
549 PROFILE(isolate_,
550 CodeCreateEvent(Logger::KEYED_EXTERNAL_ARRAY_STORE_IC_TAG,
551 Code::cast(code), 0));
552 } else {
553 PROFILE(isolate_,
554 CodeCreateEvent(Logger::KEYED_EXTERNAL_ARRAY_LOAD_IC_TAG,
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;
562 }
563 return code;
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) { 516 if (is_store) {
594 PROFILE(isolate_, 517 PROFILE(isolate_,
595 CodeCreateEvent(Logger::KEYED_STORE_IC_TAG, 518 CodeCreateEvent(Logger::KEYED_STORE_IC_TAG,
596 Code::cast(code), 0)); 519 Code::cast(code), 0));
597 } else { 520 } else {
598 PROFILE(isolate_, 521 PROFILE(isolate_,
599 CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, 522 CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG,
600 Code::cast(code), 0)); 523 Code::cast(code), 0));
601 } 524 }
602 ASSERT(code->IsCode()); 525 ASSERT(code->IsCode());
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 Object* code = map_holder->map()->FindInCodeCache(name, flags); 845 Object* code = map_holder->map()->FindInCodeCache(name, flags);
923 if (code->IsUndefined()) { 846 if (code->IsUndefined()) {
924 // If the function hasn't been compiled yet, we cannot do it now 847 // If the function hasn't been compiled yet, we cannot do it now
925 // because it may cause GC. To avoid this issue, we return an 848 // because it may cause GC. To avoid this issue, we return an
926 // internal error which will make sure we do not update any 849 // internal error which will make sure we do not update any
927 // caches. 850 // caches.
928 if (!function->is_compiled()) return Failure::InternalError(); 851 if (!function->is_compiled()) return Failure::InternalError();
929 CallStubCompiler compiler( 852 CallStubCompiler compiler(
930 argc, in_loop, kind, extra_ic_state, cache_holder); 853 argc, in_loop, kind, extra_ic_state, cache_holder);
931 { MaybeObject* maybe_code = 854 { MaybeObject* maybe_code =
932 compiler.CompileCallGlobal(receiver, 855 compiler.CompileCallGlobal(receiver, holder, cell, function, name);
933 holder,
934 cell,
935 function,
936 name,
937 extra_ic_state);
938 if (!maybe_code->ToObject(&code)) return maybe_code; 856 if (!maybe_code->ToObject(&code)) return maybe_code;
939 } 857 }
940 ASSERT_EQ(flags, Code::cast(code)->flags()); 858 ASSERT_EQ(flags, Code::cast(code)->flags());
941 PROFILE(isolate(), 859 PROFILE(isolate(),
942 CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG), 860 CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG),
943 Code::cast(code), name)); 861 Code::cast(code), name));
944 GDBJIT(AddCode(GDBJITInterface::CALL_IC, name, Code::cast(code))); 862 GDBJIT(AddCode(GDBJITInterface::CALL_IC, name, Code::cast(code)));
945 Object* result; 863 Object* result;
946 { MaybeObject* maybe_result = 864 { MaybeObject* maybe_result =
947 map_holder->UpdateMapCodeCache(name, Code::cast(code)); 865 map_holder->UpdateMapCodeCache(name, Code::cast(code));
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 Object* probe; 1033 Object* probe;
1116 { MaybeObject* maybe_probe = ProbeCache(isolate_, flags); 1034 { MaybeObject* maybe_probe = ProbeCache(isolate_, flags);
1117 if (!maybe_probe->ToObject(&probe)) return maybe_probe; 1035 if (!maybe_probe->ToObject(&probe)) return maybe_probe;
1118 } 1036 }
1119 if (!probe->IsUndefined()) return probe; 1037 if (!probe->IsUndefined()) return probe;
1120 StubCompiler compiler; 1038 StubCompiler compiler;
1121 return FillCache(isolate_, compiler.CompileCallNormal(flags)); 1039 return FillCache(isolate_, compiler.CompileCallNormal(flags));
1122 } 1040 }
1123 1041
1124 1042
1043 MaybeObject* StubCache::ComputeCallArguments(int argc,
1044 InLoopFlag in_loop,
1045 Code::Kind kind) {
1046 ASSERT(kind == Code::KEYED_CALL_IC);
1047 Code::Flags flags = Code::ComputeFlags(kind,
1048 in_loop,
1049 MEGAMORPHIC,
1050 Code::kNoExtraICState,
1051 NORMAL,
1052 argc);
1053 Object* probe;
1054 { MaybeObject* maybe_probe = ProbeCache(isolate_, flags);
1055 if (!maybe_probe->ToObject(&probe)) return maybe_probe;
1056 }
1057 if (!probe->IsUndefined()) return probe;
1058 StubCompiler compiler;
1059 return FillCache(isolate_, compiler.CompileCallArguments(flags));
1060 }
1061
1062
1125 MaybeObject* StubCache::ComputeCallMegamorphic( 1063 MaybeObject* StubCache::ComputeCallMegamorphic(
1126 int argc, 1064 int argc,
1127 InLoopFlag in_loop, 1065 InLoopFlag in_loop,
1128 Code::Kind kind, 1066 Code::Kind kind,
1129 Code::ExtraICState extra_ic_state) { 1067 Code::ExtraICState extra_ic_state) {
1130 Code::Flags flags = Code::ComputeFlags(kind, 1068 Code::Flags flags = Code::ComputeFlags(kind,
1131 in_loop, 1069 in_loop,
1132 MEGAMORPHIC, 1070 MEGAMORPHIC,
1133 extra_ic_state, 1071 extra_ic_state,
1134 NORMAL, 1072 NORMAL,
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 // function. 1383 // function.
1446 return result; 1384 return result;
1447 } 1385 }
1448 1386
1449 1387
1450 RUNTIME_FUNCTION(MaybeObject*, StoreInterceptorProperty) { 1388 RUNTIME_FUNCTION(MaybeObject*, StoreInterceptorProperty) {
1451 ASSERT(args.length() == 4); 1389 ASSERT(args.length() == 4);
1452 JSObject* recv = JSObject::cast(args[0]); 1390 JSObject* recv = JSObject::cast(args[0]);
1453 String* name = String::cast(args[1]); 1391 String* name = String::cast(args[1]);
1454 Object* value = args[2]; 1392 Object* value = args[2];
1455 StrictModeFlag strict_mode = 1393 StrictModeFlag strict_mode = static_cast<StrictModeFlag>(args.smi_at(3));
1456 static_cast<StrictModeFlag>(Smi::cast(args[3])->value());
1457 ASSERT(strict_mode == kStrictMode || strict_mode == kNonStrictMode); 1394 ASSERT(strict_mode == kStrictMode || strict_mode == kNonStrictMode);
1458 ASSERT(recv->HasNamedInterceptor()); 1395 ASSERT(recv->HasNamedInterceptor());
1459 PropertyAttributes attr = NONE; 1396 PropertyAttributes attr = NONE;
1460 MaybeObject* result = recv->SetPropertyWithInterceptor( 1397 MaybeObject* result = recv->SetPropertyWithInterceptor(
1461 name, value, attr, strict_mode); 1398 name, value, attr, strict_mode);
1462 return result; 1399 return result;
1463 } 1400 }
1464 1401
1465 1402
1466 RUNTIME_FUNCTION(MaybeObject*, KeyedLoadPropertyWithInterceptor) { 1403 RUNTIME_FUNCTION(MaybeObject*, KeyedLoadPropertyWithInterceptor) {
1467 JSObject* receiver = JSObject::cast(args[0]); 1404 JSObject* receiver = JSObject::cast(args[0]);
1468 ASSERT(Smi::cast(args[1])->value() >= 0); 1405 ASSERT(args.smi_at(1) >= 0);
1469 uint32_t index = Smi::cast(args[1])->value(); 1406 uint32_t index = args.smi_at(1);
1470 return receiver->GetElementWithInterceptor(receiver, index); 1407 return receiver->GetElementWithInterceptor(receiver, index);
1471 } 1408 }
1472 1409
1473 1410
1474 MaybeObject* StubCompiler::CompileCallInitialize(Code::Flags flags) { 1411 MaybeObject* StubCompiler::CompileCallInitialize(Code::Flags flags) {
1475 HandleScope scope(isolate()); 1412 HandleScope scope(isolate());
1476 int argc = Code::ExtractArgumentsCountFromFlags(flags); 1413 int argc = Code::ExtractArgumentsCountFromFlags(flags);
1477 Code::Kind kind = Code::ExtractKindFromFlags(flags); 1414 Code::Kind kind = Code::ExtractKindFromFlags(flags);
1478 Code::ExtraICState extra_ic_state = Code::ExtractExtraICStateFromFlags(flags); 1415 Code::ExtraICState extra_ic_state = Code::ExtractExtraICStateFromFlags(flags);
1479 if (kind == Code::CALL_IC) { 1416 if (kind == Code::CALL_IC) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 Code* code = Code::cast(result); 1508 Code* code = Code::cast(result);
1572 USE(code); 1509 USE(code);
1573 PROFILE(isolate(), 1510 PROFILE(isolate(),
1574 CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_MEGAMORPHIC_TAG), 1511 CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_MEGAMORPHIC_TAG),
1575 code, code->arguments_count())); 1512 code, code->arguments_count()));
1576 GDBJIT(AddCode(GDBJITInterface::CALL_MEGAMORPHIC, Code::cast(code))); 1513 GDBJIT(AddCode(GDBJITInterface::CALL_MEGAMORPHIC, Code::cast(code)));
1577 return result; 1514 return result;
1578 } 1515 }
1579 1516
1580 1517
1518 MaybeObject* StubCompiler::CompileCallArguments(Code::Flags flags) {
1519 HandleScope scope(isolate());
1520 int argc = Code::ExtractArgumentsCountFromFlags(flags);
1521 KeyedCallIC::GenerateNonStrictArguments(masm(), argc);
1522 Code::Kind kind = Code::ExtractKindFromFlags(flags);
1523 Object* result;
1524 { MaybeObject* maybe_result =
1525 GetCodeWithFlags(flags, "CompileCallArguments");
1526 if (!maybe_result->ToObject(&result)) return maybe_result;
1527 }
1528 Code* code = Code::cast(result);
1529 USE(code);
1530 PROFILE(isolate(),
1531 CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_MEGAMORPHIC_TAG),
1532 code, code->arguments_count()));
1533 GDBJIT(AddCode(GDBJITInterface::CALL_MEGAMORPHIC, Code::cast(code)));
1534 return result;
1535 }
1536
1537
1581 MaybeObject* StubCompiler::CompileCallMiss(Code::Flags flags) { 1538 MaybeObject* StubCompiler::CompileCallMiss(Code::Flags flags) {
1582 HandleScope scope(isolate()); 1539 HandleScope scope(isolate());
1583 int argc = Code::ExtractArgumentsCountFromFlags(flags); 1540 int argc = Code::ExtractArgumentsCountFromFlags(flags);
1584 Code::Kind kind = Code::ExtractKindFromFlags(flags); 1541 Code::Kind kind = Code::ExtractKindFromFlags(flags);
1585 Code::ExtraICState extra_ic_state = Code::ExtractExtraICStateFromFlags(flags); 1542 Code::ExtraICState extra_ic_state = Code::ExtractExtraICStateFromFlags(flags);
1586 if (kind == Code::CALL_IC) { 1543 if (kind == Code::CALL_IC) {
1587 CallIC::GenerateMiss(masm(), argc, extra_ic_state); 1544 CallIC::GenerateMiss(masm(), argc, extra_ic_state);
1588 } else { 1545 } else {
1589 KeyedCallIC::GenerateMiss(masm(), argc); 1546 KeyedCallIC::GenerateMiss(masm(), argc);
1590 } 1547 }
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1758 Code::cast(result->ToObjectUnchecked()), 1715 Code::cast(result->ToObjectUnchecked()),
1759 name)); 1716 name));
1760 GDBJIT(AddCode(GDBJITInterface::KEYED_STORE_IC, 1717 GDBJIT(AddCode(GDBJITInterface::KEYED_STORE_IC,
1761 name, 1718 name,
1762 Code::cast(result->ToObjectUnchecked()))); 1719 Code::cast(result->ToObjectUnchecked())));
1763 } 1720 }
1764 return result; 1721 return result;
1765 } 1722 }
1766 1723
1767 1724
1725 void KeyedStoreStubCompiler::GenerateStoreDictionaryElement(
1726 MacroAssembler* masm) {
1727 KeyedStoreIC::GenerateSlow(masm);
1728 }
1729
1730
1768 CallStubCompiler::CallStubCompiler(int argc, 1731 CallStubCompiler::CallStubCompiler(int argc,
1769 InLoopFlag in_loop, 1732 InLoopFlag in_loop,
1770 Code::Kind kind, 1733 Code::Kind kind,
1771 Code::ExtraICState extra_ic_state, 1734 Code::ExtraICState extra_ic_state,
1772 InlineCacheHolderFlag cache_holder) 1735 InlineCacheHolderFlag cache_holder)
1773 : arguments_(argc), 1736 : arguments_(argc),
1774 in_loop_(in_loop), 1737 in_loop_(in_loop),
1775 kind_(kind), 1738 kind_(kind),
1776 extra_ic_state_(extra_ic_state), 1739 extra_ic_state_(extra_ic_state),
1777 cache_holder_(cache_holder) { 1740 cache_holder_(cache_holder) {
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1921 if (!signature->receiver()->IsUndefined()) { 1884 if (!signature->receiver()->IsUndefined()) {
1922 expected_receiver_type_ = 1885 expected_receiver_type_ =
1923 FunctionTemplateInfo::cast(signature->receiver()); 1886 FunctionTemplateInfo::cast(signature->receiver());
1924 } 1887 }
1925 } 1888 }
1926 1889
1927 is_simple_api_call_ = true; 1890 is_simple_api_call_ = true;
1928 } 1891 }
1929 1892
1930 1893
1931 MaybeObject* ExternalArrayLoadStubCompiler::GetCode() {
1932 Object* result;
1933 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC,
1934 NORMAL,
1935 strict_mode_);
1936 { MaybeObject* maybe_result = GetCodeWithFlags(flags,
1937 "ExternalArrayLoadStub");
1938 if (!maybe_result->ToObject(&result)) return maybe_result;
1939 }
1940 Code* code = Code::cast(result);
1941 USE(code);
1942 PROFILE(isolate(),
1943 CodeCreateEvent(Logger::STUB_TAG, code, "ExternalArrayLoadStub"));
1944 return result;
1945 }
1946
1947
1948 MaybeObject* ExternalArrayStoreStubCompiler::GetCode() {
1949 Object* result;
1950 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_STORE_IC,
1951 NORMAL,
1952 strict_mode_);
1953 { MaybeObject* maybe_result = GetCodeWithFlags(flags,
1954 "ExternalArrayStoreStub");
1955 if (!maybe_result->ToObject(&result)) return maybe_result;
1956 }
1957 Code* code = Code::cast(result);
1958 USE(code);
1959 PROFILE(isolate(),
1960 CodeCreateEvent(Logger::STUB_TAG, code, "ExternalArrayStoreStub"));
1961 return result;
1962 }
1963
1964
1965 } } // namespace v8::internal 1894 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698