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

Side by Side Diff: test/cctest/test-heap.cc

Issue 9264033: Fix for an obscure ARM GCC bug (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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 | « no previous file | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 2
3 #include <stdlib.h> 3 #include <stdlib.h>
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "execution.h" 7 #include "execution.h"
8 #include "factory.h" 8 #include "factory.h"
9 #include "macro-assembler.h" 9 #include "macro-assembler.h"
10 #include "global-handles.h" 10 #include "global-handles.h"
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 CHECK(obj->HasLocalProperty(*second)); 605 CHECK(obj->HasLocalProperty(*second));
606 606
607 // delete second and then first 607 // delete second and then first
608 CHECK(obj->DeleteProperty(*second, JSObject::NORMAL_DELETION)); 608 CHECK(obj->DeleteProperty(*second, JSObject::NORMAL_DELETION));
609 CHECK(obj->HasLocalProperty(*first)); 609 CHECK(obj->HasLocalProperty(*first));
610 CHECK(obj->DeleteProperty(*first, JSObject::NORMAL_DELETION)); 610 CHECK(obj->DeleteProperty(*first, JSObject::NORMAL_DELETION));
611 CHECK(!obj->HasLocalProperty(*first)); 611 CHECK(!obj->HasLocalProperty(*first));
612 CHECK(!obj->HasLocalProperty(*second)); 612 CHECK(!obj->HasLocalProperty(*second));
613 613
614 // check string and symbol match 614 // check string and symbol match
615 static const char* string1 = "fisk"; 615 const char* string1 = "fisk";
616 Handle<String> s1 = FACTORY->NewStringFromAscii(CStrVector(string1)); 616 Handle<String> s1 = FACTORY->NewStringFromAscii(CStrVector(string1));
617 obj->SetProperty( 617 obj->SetProperty(
618 *s1, Smi::FromInt(1), NONE, kNonStrictMode)->ToObjectChecked(); 618 *s1, Smi::FromInt(1), NONE, kNonStrictMode)->ToObjectChecked();
619 Handle<String> s1_symbol = FACTORY->LookupAsciiSymbol(string1); 619 Handle<String> s1_symbol = FACTORY->LookupAsciiSymbol(string1);
620 CHECK(obj->HasLocalProperty(*s1_symbol)); 620 CHECK(obj->HasLocalProperty(*s1_symbol));
621 621
622 // check symbol and string match 622 // check symbol and string match
623 static const char* string2 = "fugl"; 623 const char* string2 = "fugl";
624 Handle<String> s2_symbol = FACTORY->LookupAsciiSymbol(string2); 624 Handle<String> s2_symbol = FACTORY->LookupAsciiSymbol(string2);
625 obj->SetProperty( 625 obj->SetProperty(
626 *s2_symbol, Smi::FromInt(1), NONE, kNonStrictMode)->ToObjectChecked(); 626 *s2_symbol, Smi::FromInt(1), NONE, kNonStrictMode)->ToObjectChecked();
627 Handle<String> s2 = FACTORY->NewStringFromAscii(CStrVector(string2)); 627 Handle<String> s2 = FACTORY->NewStringFromAscii(CStrVector(string2));
628 CHECK(obj->HasLocalProperty(*s2)); 628 CHECK(obj->HasLocalProperty(*s2));
629 } 629 }
630 630
631 631
632 TEST(JSObjectMaps) { 632 TEST(JSObjectMaps) {
633 InitializeVM(); 633 InitializeVM();
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 // clearing correctly records slots in prototype transition array. 1619 // clearing correctly records slots in prototype transition array.
1620 i::FLAG_always_compact = true; 1620 i::FLAG_always_compact = true;
1621 Handle<Map> map(baseObject->map()); 1621 Handle<Map> map(baseObject->map());
1622 CHECK(!space->LastPage()->Contains(map->prototype_transitions()->address())); 1622 CHECK(!space->LastPage()->Contains(map->prototype_transitions()->address()));
1623 CHECK(space->LastPage()->Contains(prototype->address())); 1623 CHECK(space->LastPage()->Contains(prototype->address()));
1624 baseObject->SetPrototype(*prototype, false)->ToObjectChecked(); 1624 baseObject->SetPrototype(*prototype, false)->ToObjectChecked();
1625 CHECK(map->GetPrototypeTransition(*prototype)->IsMap()); 1625 CHECK(map->GetPrototypeTransition(*prototype)->IsMap());
1626 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 1626 HEAP->CollectAllGarbage(Heap::kNoGCFlags);
1627 CHECK(map->GetPrototypeTransition(*prototype)->IsMap()); 1627 CHECK(map->GetPrototypeTransition(*prototype)->IsMap());
1628 } 1628 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698