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

Side by Side Diff: test/cctest/test-code-stub-assembler.cc

Issue 2079823002: [stubs] Implementing CodeStubAssembler::GetOwnProperty(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
« src/code-stub-assembler.cc ('K') | « src/objects-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/base/utils/random-number-generator.h" 5 #include "src/base/utils/random-number-generator.h"
6 #include "src/ic/stub-cache.h" 6 #include "src/ic/stub-cache.h"
7 #include "src/isolate.h" 7 #include "src/isolate.h"
8 #include "test/cctest/compiler/code-assembler-tester.h" 8 #include "test/cctest/compiler/code-assembler-tester.h"
9 #include "test/cctest/compiler/function-tester.h" 9 #include "test/cctest/compiler/function-tester.h"
10 10
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 enum Result { kFound, kNotFound }; 226 enum Result { kFound, kNotFound };
227 { 227 {
228 Node* dictionary = m.Parameter(0); 228 Node* dictionary = m.Parameter(0);
229 Node* unique_name = m.Parameter(1); 229 Node* unique_name = m.Parameter(1);
230 Node* expected_result = m.Parameter(2); 230 Node* expected_result = m.Parameter(2);
231 Node* expected_arg = m.Parameter(3); 231 Node* expected_arg = m.Parameter(3);
232 232
233 Label passed(&m), failed(&m); 233 Label passed(&m), failed(&m);
234 Label if_found(&m), if_not_found(&m); 234 Label if_found(&m), if_not_found(&m);
235 Variable var_entry(&m, MachineRepresentation::kWord32); 235 Variable var_name_index(&m, MachineRepresentation::kWord32);
236 236
237 m.NameDictionaryLookup<Dictionary>(dictionary, unique_name, &if_found, 237 m.NameDictionaryLookup<Dictionary>(dictionary, unique_name, &if_found,
238 &var_entry, &if_not_found); 238 &var_name_index, &if_not_found);
239 m.Bind(&if_found); 239 m.Bind(&if_found);
240 m.GotoUnless( 240 m.GotoUnless(
241 m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))), 241 m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
242 &failed); 242 &failed);
243 m.Branch(m.Word32Equal(m.SmiToWord32(expected_arg), var_entry.value()), 243 m.Branch(m.Word32Equal(m.SmiToWord32(expected_arg), var_name_index.value()),
244 &passed, &failed); 244 &passed, &failed);
245 245
246 m.Bind(&if_not_found); 246 m.Bind(&if_not_found);
247 m.Branch( 247 m.Branch(
248 m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))), 248 m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))),
249 &passed, &failed); 249 &passed, &failed);
250 250
251 m.Bind(&passed); 251 m.Bind(&passed);
252 m.Return(m.BooleanConstant(true)); 252 m.Return(m.BooleanConstant(true));
253 253
(...skipping 23 matching lines...) Expand all
277 factory->NewPrivateSymbol(), 277 factory->NewPrivateSymbol(),
278 }; 278 };
279 279
280 for (size_t i = 0; i < arraysize(keys); i++) { 280 for (size_t i = 0; i < arraysize(keys); i++) {
281 Handle<Object> value = factory->NewPropertyCell(); 281 Handle<Object> value = factory->NewPropertyCell();
282 dictionary = Dictionary::Add(dictionary, keys[i], value, fake_details); 282 dictionary = Dictionary::Add(dictionary, keys[i], value, fake_details);
283 } 283 }
284 284
285 for (size_t i = 0; i < arraysize(keys); i++) { 285 for (size_t i = 0; i < arraysize(keys); i++) {
286 int entry = dictionary->FindEntry(keys[i]); 286 int entry = dictionary->FindEntry(keys[i]);
287 int name_index =
288 Dictionary::EntryToIndex(entry) + Dictionary::kEntryKeyIndex;
287 CHECK_NE(Dictionary::kNotFound, entry); 289 CHECK_NE(Dictionary::kNotFound, entry);
288 290
289 Handle<Object> expected_entry(Smi::FromInt(entry), isolate); 291 Handle<Object> expected_name_index(Smi::FromInt(name_index), isolate);
290 ft.CheckTrue(dictionary, keys[i], expect_found, expected_entry); 292 ft.CheckTrue(dictionary, keys[i], expect_found, expected_name_index);
291 } 293 }
292 294
293 Handle<Name> non_existing_keys[] = { 295 Handle<Name> non_existing_keys[] = {
294 factory->InternalizeUtf8String("1"), 296 factory->InternalizeUtf8String("1"),
295 factory->InternalizeUtf8String("-42"), 297 factory->InternalizeUtf8String("-42"),
296 factory->InternalizeUtf8String("153"), 298 factory->InternalizeUtf8String("153"),
297 factory->InternalizeUtf8String("-1.0"), 299 factory->InternalizeUtf8String("-1.0"),
298 factory->InternalizeUtf8String("1.3"), 300 factory->InternalizeUtf8String("1.3"),
299 factory->InternalizeUtf8String("a"), 301 factory->InternalizeUtf8String("a"),
300 factory->InternalizeUtf8String("boom"), 302 factory->InternalizeUtf8String("boom"),
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 } 413 }
412 414
413 TEST(UnseededNumberDictionaryLookup) { 415 TEST(UnseededNumberDictionaryLookup) {
414 TestNumberDictionaryLookup<UnseededNumberDictionary>(); 416 TestNumberDictionaryLookup<UnseededNumberDictionary>();
415 } 417 }
416 418
417 namespace { 419 namespace {
418 420
419 void AddProperties(Handle<JSObject> object, Handle<Name> names[], 421 void AddProperties(Handle<JSObject> object, Handle<Name> names[],
420 size_t count) { 422 size_t count) {
421 Handle<Object> value(Smi::FromInt(42), object->GetIsolate()); 423 Isolate* isolate = object->GetIsolate();
422 for (size_t i = 0; i < count; i++) { 424 for (size_t i = 0; i < count; i++) {
425 Handle<Object> value(Smi::FromInt(static_cast<int>(42 + i)), isolate);
423 JSObject::AddProperty(object, names[i], value, NONE); 426 JSObject::AddProperty(object, names[i], value, NONE);
424 } 427 }
425 } 428 }
426 429
430 Handle<AccessorPair> CreateAccessorPair(FunctionTester* ft,
431 const char* getter_body,
432 const char* setter_body) {
433 Handle<AccessorPair> pair = ft->isolate->factory()->NewAccessorPair();
434 if (getter_body) {
435 pair->set_getter(*ft->NewFunction(getter_body));
436 }
437 if (setter_body) {
438 pair->set_setter(*ft->NewFunction(setter_body));
439 }
440 return pair;
441 }
442
443 void AddProperties(Handle<JSObject> object, Handle<Name> names[],
444 size_t names_count, Handle<Object> values[],
445 size_t values_count, int seed = 0) {
446 Isolate* isolate = object->GetIsolate();
447 for (size_t i = 0; i < names_count; i++) {
448 Handle<Object> value = values[(seed + i) % values_count];
449 if (value->IsAccessorPair()) {
450 Handle<AccessorPair> pair = Handle<AccessorPair>::cast(value);
451 Handle<Object> getter(pair->getter(), isolate);
452 Handle<Object> setter(pair->setter(), isolate);
453 JSObject::DefineAccessor(object, names[i], getter, setter, NONE).Check();
454 } else {
455 JSObject::AddProperty(object, names[i], value, NONE);
456 }
457 }
458 }
459
427 } // namespace 460 } // namespace
428 461
429 TEST(TryLookupProperty) { 462 TEST(TryHasOwnProperty) {
430 typedef CodeStubAssembler::Label Label; 463 typedef CodeStubAssembler::Label Label;
431 Isolate* isolate(CcTest::InitIsolateOnce()); 464 Isolate* isolate(CcTest::InitIsolateOnce());
432 465
433 const int kNumParams = 4; 466 const int kNumParams = 4;
434 CodeStubAssemblerTester m(isolate, kNumParams); 467 CodeStubAssemblerTester m(isolate, kNumParams);
435 468
436 enum Result { kFound, kNotFound, kBailout }; 469 enum Result { kFound, kNotFound, kBailout };
437 { 470 {
438 Node* object = m.Parameter(0); 471 Node* object = m.Parameter(0);
439 Node* unique_name = m.Parameter(1); 472 Node* unique_name = m.Parameter(1);
440 Node* expected_result = m.Parameter(2); 473 Node* expected_result = m.Parameter(2);
441 474
442 Label passed(&m), failed(&m); 475 Label passed(&m), failed(&m);
443 Label if_found(&m), if_not_found(&m), if_bailout(&m); 476 Label if_found(&m), if_not_found(&m), if_bailout(&m);
444 477
445 Node* map = m.LoadMap(object); 478 Node* map = m.LoadMap(object);
446 Node* instance_type = m.LoadMapInstanceType(map); 479 Node* instance_type = m.LoadMapInstanceType(map);
447 480
448 m.TryLookupProperty(object, map, instance_type, unique_name, &if_found, 481 m.TryHasOwnProperty(object, map, instance_type, unique_name, &if_found,
449 &if_not_found, &if_bailout); 482 &if_not_found, &if_bailout);
450 483
451 m.Bind(&if_found); 484 m.Bind(&if_found);
452 m.Branch(m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))), 485 m.Branch(m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
453 &passed, &failed); 486 &passed, &failed);
454 487
455 m.Bind(&if_not_found); 488 m.Bind(&if_not_found);
456 m.Branch( 489 m.Branch(
457 m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))), 490 m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))),
458 &passed, &failed); 491 &passed, &failed);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 for (size_t name_index = 0; name_index < arraysize(names); name_index++) { 561 for (size_t name_index = 0; name_index < arraysize(names); name_index++) {
529 Handle<Name> name = names[name_index]; 562 Handle<Name> name = names[name_index];
530 CHECK(JSReceiver::HasProperty(object, name).FromJust()); 563 CHECK(JSReceiver::HasProperty(object, name).FromJust());
531 ft.CheckTrue(object, name, expect_found); 564 ft.CheckTrue(object, name, expect_found);
532 } 565 }
533 } 566 }
534 } 567 }
535 568
536 { 569 {
537 Handle<Name> non_existing_names[] = { 570 Handle<Name> non_existing_names[] = {
571 factory->NewSymbol(),
538 factory->InternalizeUtf8String("ne_a"), 572 factory->InternalizeUtf8String("ne_a"),
539 factory->InternalizeUtf8String("ne_bb"), 573 factory->InternalizeUtf8String("ne_bb"),
574 factory->NewPrivateSymbol(),
540 factory->InternalizeUtf8String("ne_ccc"), 575 factory->InternalizeUtf8String("ne_ccc"),
541 factory->InternalizeUtf8String("ne_dddd"), 576 factory->InternalizeUtf8String("ne_dddd"),
542 }; 577 };
543 for (Handle<JSObject> object : objects) { 578 for (Handle<JSObject> object : objects) {
544 for (size_t key_index = 0; key_index < arraysize(non_existing_names); 579 for (size_t key_index = 0; key_index < arraysize(non_existing_names);
545 key_index++) { 580 key_index++) {
546 Handle<Name> key = non_existing_names[key_index]; 581 Handle<Name> name = non_existing_names[key_index];
547 CHECK(!JSReceiver::HasProperty(object, key).FromJust()); 582 CHECK(!JSReceiver::HasProperty(object, name).FromJust());
548 ft.CheckTrue(object, key, expect_not_found); 583 ft.CheckTrue(object, name, expect_not_found);
549 } 584 }
550 } 585 }
551 } 586 }
552 587
553 { 588 {
554 Handle<JSFunction> function = factory->NewFunction(factory->empty_string()); 589 Handle<JSFunction> function = factory->NewFunction(factory->empty_string());
555 Handle<JSProxy> object = factory->NewJSProxy(function, objects[0]); 590 Handle<JSProxy> object = factory->NewJSProxy(function, objects[0]);
556 CHECK_EQ(JS_PROXY_TYPE, object->map()->instance_type()); 591 CHECK_EQ(JS_PROXY_TYPE, object->map()->instance_type());
557 ft.CheckTrue(object, names[0], expect_bailout); 592 ft.CheckTrue(object, names[0], expect_bailout);
558 } 593 }
559 594
560 { 595 {
561 Handle<JSObject> object = isolate->global_proxy(); 596 Handle<JSObject> object = isolate->global_proxy();
562 CHECK_EQ(JS_GLOBAL_PROXY_TYPE, object->map()->instance_type()); 597 CHECK_EQ(JS_GLOBAL_PROXY_TYPE, object->map()->instance_type());
563 ft.CheckTrue(object, names[0], expect_bailout); 598 ft.CheckTrue(object, names[0], expect_bailout);
564 } 599 }
565 } 600 }
566 601
602 TEST(TryGetOwnProperty) {
603 typedef CodeStubAssembler::Label Label;
604 typedef CodeStubAssembler::Variable Variable;
605 Isolate* isolate(CcTest::InitIsolateOnce());
606 Factory* factory = isolate->factory();
607
608 const int kNumParams = 2;
609 CodeStubAssemblerTester m(isolate, kNumParams);
610
611 Handle<Symbol> not_found_symbol = factory->NewSymbol();
612 Handle<Symbol> bailout_symbol = factory->NewSymbol();
613 {
614 Node* object = m.Parameter(0);
615 Node* unique_name = m.Parameter(1);
616 Node* context = m.Parameter(kNumParams + 2);
617
618 Variable var_value(&m, MachineRepresentation::kTagged);
619 Label if_found(&m), if_not_found(&m), if_bailout(&m);
620
621 Node* map = m.LoadMap(object);
622 Node* instance_type = m.LoadMapInstanceType(map);
623
624 m.TryGetOwnProperty(context, object, object, map, instance_type,
625 unique_name, &if_found, &var_value, &if_not_found,
626 &if_bailout);
627
628 m.Bind(&if_found);
629 m.Return(var_value.value());
630
631 m.Bind(&if_not_found);
632 m.Return(m.HeapConstant(not_found_symbol));
633
634 m.Bind(&if_bailout);
635 m.Return(m.HeapConstant(bailout_symbol));
636 }
637
638 Handle<Code> code = m.GenerateCode();
639 FunctionTester ft(code, kNumParams);
640
641 Handle<Name> deleted_property_name =
642 factory->InternalizeUtf8String("deleted");
643
644 Handle<Name> names[] = {
645 factory->InternalizeUtf8String("bb"),
646 factory->NewSymbol(),
647 factory->InternalizeUtf8String("a"),
648 factory->InternalizeUtf8String("ccc"),
649 factory->InternalizeUtf8String("esajefe"),
650 factory->NewPrivateSymbol(),
651 factory->InternalizeUtf8String("eeeee"),
652 factory->InternalizeUtf8String("p1"),
653 factory->InternalizeUtf8String("acshw23e"),
654 factory->InternalizeUtf8String(""),
655 factory->InternalizeUtf8String("dddd"),
656 factory->NewPrivateSymbol(),
657 factory->InternalizeUtf8String("name"),
658 factory->InternalizeUtf8String("p2"),
659 factory->InternalizeUtf8String("p3"),
660 factory->InternalizeUtf8String("p4"),
661 factory->NewPrivateSymbol(),
662 };
663 Handle<Object> values[] = {
664 factory->NewFunction(factory->empty_string()),
665 factory->NewSymbol(),
666 factory->InternalizeUtf8String("a"),
667 CreateAccessorPair(&ft, "() => 188;", "() => 199;"),
668 factory->NewFunction(factory->InternalizeUtf8String("bb")),
669 factory->InternalizeUtf8String("ccc"),
670 CreateAccessorPair(&ft, "() => 88;", nullptr),
671 handle(Smi::FromInt(1), isolate),
672 factory->InternalizeUtf8String(""),
673 CreateAccessorPair(&ft, nullptr, "() => 99;"),
674 factory->NewHeapNumber(4.2),
675 handle(Smi::FromInt(153), isolate),
676 factory->NewJSObject(factory->NewFunction(factory->empty_string())),
677 factory->NewPrivateSymbol(),
678 };
679 STATIC_ASSERT(arraysize(values) < arraysize(names));
680
681 base::RandomNumberGenerator rand_gen(FLAG_random_seed);
682
683 std::vector<Handle<JSObject>> objects;
684
685 if (false) {
686 // Fast object, no inobject properties.
687 int inobject_properties = 0;
688 Handle<Map> map = Map::Create(isolate, inobject_properties);
689 Handle<JSObject> object = factory->NewJSObjectFromMap(map);
690 AddProperties(object, names, arraysize(names), values, arraysize(values),
691 rand_gen.NextInt());
692 CHECK_EQ(JS_OBJECT_TYPE, object->map()->instance_type());
693 CHECK_EQ(inobject_properties, object->map()->GetInObjectProperties());
694 CHECK(!object->map()->is_dictionary_map());
695 objects.push_back(object);
696 }
697
698 {
699 // Fast object, all inobject properties.
700 int inobject_properties = arraysize(names) * 2;
701 Handle<Map> map = Map::Create(isolate, inobject_properties);
702 Handle<JSObject> object = factory->NewJSObjectFromMap(map);
703 AddProperties(object, names, arraysize(names), values, arraysize(values),
704 rand_gen.NextInt());
705 CHECK_EQ(JS_OBJECT_TYPE, object->map()->instance_type());
706 CHECK_EQ(inobject_properties, object->map()->GetInObjectProperties());
707 CHECK(!object->map()->is_dictionary_map());
708 objects.push_back(object);
709 }
710
711 {
712 // Fast object, half inobject properties.
713 int inobject_properties = arraysize(names) / 2;
714 Handle<Map> map = Map::Create(isolate, inobject_properties);
715 Handle<JSObject> object = factory->NewJSObjectFromMap(map);
716 AddProperties(object, names, arraysize(names), values, arraysize(values),
717 rand_gen.NextInt());
718 CHECK_EQ(JS_OBJECT_TYPE, object->map()->instance_type());
719 CHECK_EQ(inobject_properties, object->map()->GetInObjectProperties());
720 CHECK(!object->map()->is_dictionary_map());
721 objects.push_back(object);
722 }
723
724 {
725 // Dictionary mode object.
726 Handle<JSFunction> function = factory->NewFunction(factory->empty_string());
727 Handle<JSObject> object = factory->NewJSObject(function);
728 AddProperties(object, names, arraysize(names), values, arraysize(values),
729 rand_gen.NextInt());
730 JSObject::NormalizeProperties(object, CLEAR_INOBJECT_PROPERTIES, 0, "test");
731
732 JSObject::AddProperty(object, deleted_property_name, object, NONE);
733 CHECK(JSObject::DeleteProperty(object, deleted_property_name, SLOPPY)
734 .FromJust());
735
736 CHECK_EQ(JS_OBJECT_TYPE, object->map()->instance_type());
737 CHECK(object->map()->is_dictionary_map());
738 objects.push_back(object);
739 }
740
741 {
742 // Global mode object.
743 Handle<JSGlobalObject> object = isolate->global_object();
744 AddProperties(object, names, arraysize(names), values, arraysize(values),
745 rand_gen.NextInt());
746
747 JSObject::AddProperty(object, deleted_property_name, object, NONE);
748 CHECK(JSObject::DeleteProperty(object, deleted_property_name, SLOPPY)
749 .FromJust());
750
751 CHECK_EQ(JS_GLOBAL_OBJECT_TYPE, object->map()->instance_type());
752 CHECK(object->map()->is_dictionary_map());
753 objects.push_back(object);
754 }
755
756 // TODO(ishell): test proxy and interceptors when they are supported.
757
758 {
759 for (Handle<JSObject> object : objects) {
760 for (size_t name_index = 0; name_index < arraysize(names); name_index++) {
761 Handle<Name> name = names[name_index];
762 Handle<Object> expected_value =
763 JSReceiver::GetProperty(object, name).ToHandleChecked();
764 Handle<Object> value = ft.Call(object, name).ToHandleChecked();
765 CHECK(expected_value->SameValue(*value));
766 }
767 }
768 }
769
770 {
771 Handle<Name> non_existing_names[] = {
772 factory->NewSymbol(),
773 factory->InternalizeUtf8String("ne_a"),
774 factory->InternalizeUtf8String("ne_bb"),
775 factory->NewPrivateSymbol(),
776 factory->InternalizeUtf8String("ne_ccc"),
777 factory->InternalizeUtf8String("ne_dddd"),
778 deleted_property_name,
779 };
780 for (Handle<JSObject> object : objects) {
781 for (size_t key_index = 0; key_index < arraysize(non_existing_names);
782 key_index++) {
783 Handle<Name> name = non_existing_names[key_index];
784 Handle<Object> expected_value =
785 JSReceiver::GetProperty(object, name).ToHandleChecked();
786 CHECK(expected_value->IsUndefined(isolate));
787 Handle<Object> value = ft.Call(object, name).ToHandleChecked();
788 CHECK_EQ(*not_found_symbol, *value);
789 }
790 }
791 }
792
793 {
794 Handle<JSFunction> function = factory->NewFunction(factory->empty_string());
795 Handle<JSProxy> object = factory->NewJSProxy(function, objects[0]);
796 CHECK_EQ(JS_PROXY_TYPE, object->map()->instance_type());
797 Handle<Object> value = ft.Call(object, names[0]).ToHandleChecked();
798 // Proxies are not supported yet.
799 CHECK_EQ(*bailout_symbol, *value);
800 }
801
802 {
803 Handle<JSObject> object = isolate->global_proxy();
804 CHECK_EQ(JS_GLOBAL_PROXY_TYPE, object->map()->instance_type());
805 // Global proxies are not supported yet.
806 Handle<Object> value = ft.Call(object, names[0]).ToHandleChecked();
807 CHECK_EQ(*bailout_symbol, *value);
808 }
809 }
810
567 namespace { 811 namespace {
568 812
569 void AddElement(Handle<JSObject> object, uint32_t index, Handle<Object> value, 813 void AddElement(Handle<JSObject> object, uint32_t index, Handle<Object> value,
570 PropertyAttributes attributes = NONE) { 814 PropertyAttributes attributes = NONE) {
571 JSObject::AddDataElement(object, index, value, attributes).ToHandleChecked(); 815 JSObject::AddDataElement(object, index, value, attributes).ToHandleChecked();
572 } 816 }
573 817
574 } // namespace 818 } // namespace
575 819
576 TEST(TryLookupElement) { 820 TEST(TryLookupElement) {
577 typedef CodeStubAssembler::Label Label; 821 typedef CodeStubAssembler::Label Label;
578 Isolate* isolate(CcTest::InitIsolateOnce()); 822 Isolate* isolate(CcTest::InitIsolateOnce());
579 823
580 const int kNumParams = 4; 824 const int kNumParams = 3;
581 CodeStubAssemblerTester m(isolate, kNumParams); 825 CodeStubAssemblerTester m(isolate, kNumParams);
582 826
583 enum Result { kFound, kNotFound, kBailout }; 827 enum Result { kFound, kNotFound, kBailout };
584 { 828 {
585 Node* object = m.Parameter(0); 829 Node* object = m.Parameter(0);
586 Node* index = m.SmiToWord32(m.Parameter(1)); 830 Node* index = m.SmiToWord32(m.Parameter(1));
587 Node* expected_result = m.Parameter(2); 831 Node* expected_result = m.Parameter(2);
588 832
589 Label passed(&m), failed(&m); 833 Label passed(&m), failed(&m);
590 Label if_found(&m), if_not_found(&m), if_bailout(&m); 834 Label if_found(&m), if_not_found(&m), if_bailout(&m);
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 1322
1079 Handle<Code> expected_handler(handler, isolate); 1323 Handle<Code> expected_handler(handler, isolate);
1080 ft.CheckTrue(receiver, name, expected_handler); 1324 ft.CheckTrue(receiver, name, expected_handler);
1081 } 1325 }
1082 // Ensure we performed both kind of queries. 1326 // Ensure we performed both kind of queries.
1083 CHECK(queried_existing && queried_non_existing); 1327 CHECK(queried_existing && queried_non_existing);
1084 } 1328 }
1085 1329
1086 } // namespace internal 1330 } // namespace internal
1087 } // namespace v8 1331 } // namespace v8
OLDNEW
« src/code-stub-assembler.cc ('K') | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698