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

Side by Side Diff: test/cctest/test-mark-compact.cc

Issue 234893003: Revert "Handlify GetProperty." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | « test/cctest/test-heap.cc ('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 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 JSReceiver::SetProperty(global, func_name, function, NONE, SLOPPY).Check(); 166 JSReceiver::SetProperty(global, func_name, function, NONE, SLOPPY).Check();
167 167
168 factory->NewJSObject(function); 168 factory->NewJSObject(function);
169 } 169 }
170 170
171 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 4"); 171 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 4");
172 172
173 { HandleScope scope(isolate); 173 { HandleScope scope(isolate);
174 Handle<String> func_name = factory->InternalizeUtf8String("theFunction"); 174 Handle<String> func_name = factory->InternalizeUtf8String("theFunction");
175 CHECK(JSReceiver::HasLocalProperty(global, func_name)); 175 CHECK(JSReceiver::HasLocalProperty(global, func_name));
176 Handle<Object> func_value = 176 Handle<Object> func_value = Object::GetProperty(global, func_name);
177 Object::GetProperty(global, func_name).ToHandleChecked();
178 CHECK(func_value->IsJSFunction()); 177 CHECK(func_value->IsJSFunction());
179 Handle<JSFunction> function = Handle<JSFunction>::cast(func_value); 178 Handle<JSFunction> function = Handle<JSFunction>::cast(func_value);
180 Handle<JSObject> obj = factory->NewJSObject(function); 179 Handle<JSObject> obj = factory->NewJSObject(function);
181 180
182 Handle<String> obj_name = factory->InternalizeUtf8String("theObject"); 181 Handle<String> obj_name = factory->InternalizeUtf8String("theObject");
183 JSReceiver::SetProperty(global, obj_name, obj, NONE, SLOPPY).Check(); 182 JSReceiver::SetProperty(global, obj_name, obj, NONE, SLOPPY).Check();
184 Handle<String> prop_name = factory->InternalizeUtf8String("theSlot"); 183 Handle<String> prop_name = factory->InternalizeUtf8String("theSlot");
185 Handle<Smi> twenty_three(Smi::FromInt(23), isolate); 184 Handle<Smi> twenty_three(Smi::FromInt(23), isolate);
186 JSReceiver::SetProperty(obj, prop_name, twenty_three, NONE, SLOPPY).Check(); 185 JSReceiver::SetProperty(obj, prop_name, twenty_three, NONE, SLOPPY).Check();
187 } 186 }
188 187
189 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 5"); 188 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 5");
190 189
191 { HandleScope scope(isolate); 190 { HandleScope scope(isolate);
192 Handle<String> obj_name = factory->InternalizeUtf8String("theObject"); 191 Handle<String> obj_name = factory->InternalizeUtf8String("theObject");
193 CHECK(JSReceiver::HasLocalProperty(global, obj_name)); 192 CHECK(JSReceiver::HasLocalProperty(global, obj_name));
194 Handle<Object> object = 193 Handle<Object> object = Object::GetProperty(global, obj_name);
195 Object::GetProperty(global, obj_name).ToHandleChecked();
196 CHECK(object->IsJSObject()); 194 CHECK(object->IsJSObject());
197 Handle<String> prop_name = factory->InternalizeUtf8String("theSlot"); 195 Handle<String> prop_name = factory->InternalizeUtf8String("theSlot");
198 CHECK_EQ(*Object::GetProperty(object, prop_name).ToHandleChecked(), 196 CHECK_EQ(*Object::GetProperty(object, prop_name), Smi::FromInt(23));
199 Smi::FromInt(23));
200 } 197 }
201 } 198 }
202 199
203 200
204 // TODO(1600): compaction of map space is temporary removed from GC. 201 // TODO(1600): compaction of map space is temporary removed from GC.
205 #if 0 202 #if 0
206 static Handle<Map> CreateMap(Isolate* isolate) { 203 static Handle<Map> CreateMap(Isolate* isolate) {
207 return isolate->factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); 204 return isolate->factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
208 } 205 }
209 206
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 524
528 525
529 TEST(RegressJoinThreadsOnIsolateDeinit) { 526 TEST(RegressJoinThreadsOnIsolateDeinit) {
530 intptr_t size_limit = ShortLivingIsolate() * 2; 527 intptr_t size_limit = ShortLivingIsolate() * 2;
531 for (int i = 0; i < 10; i++) { 528 for (int i = 0; i < 10; i++) {
532 CHECK_GT(size_limit, ShortLivingIsolate()); 529 CHECK_GT(size_limit, ShortLivingIsolate());
533 } 530 }
534 } 531 }
535 532
536 #endif // __linux__ and !USE_SIMULATOR 533 #endif // __linux__ and !USE_SIMULATOR
OLDNEW
« no previous file with comments | « test/cctest/test-heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698