| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 objs[next_objs_index++] = FACTORY->NewJSArray(10); | 813 objs[next_objs_index++] = FACTORY->NewJSArray(10); |
| 814 objs[next_objs_index++] = FACTORY->NewJSArray(10, TENURED); | 814 objs[next_objs_index++] = FACTORY->NewJSArray(10, TENURED); |
| 815 | 815 |
| 816 // Allocate a small string to OLD_DATA_SPACE and NEW_SPACE | 816 // Allocate a small string to OLD_DATA_SPACE and NEW_SPACE |
| 817 objs[next_objs_index++] = | 817 objs[next_objs_index++] = |
| 818 FACTORY->NewStringFromAscii(CStrVector("abcdefghij")); | 818 FACTORY->NewStringFromAscii(CStrVector("abcdefghij")); |
| 819 objs[next_objs_index++] = | 819 objs[next_objs_index++] = |
| 820 FACTORY->NewStringFromAscii(CStrVector("abcdefghij"), TENURED); | 820 FACTORY->NewStringFromAscii(CStrVector("abcdefghij"), TENURED); |
| 821 | 821 |
| 822 // Allocate a large string (for large object space). | 822 // Allocate a large string (for large object space). |
| 823 int large_size = HEAP->MaxObjectSizeInPagedSpace() + 1; | 823 int large_size = Page::kMaxNonCodeHeapObjectSize + 1; |
| 824 char* str = new char[large_size]; | 824 char* str = new char[large_size]; |
| 825 for (int i = 0; i < large_size - 1; ++i) str[i] = 'a'; | 825 for (int i = 0; i < large_size - 1; ++i) str[i] = 'a'; |
| 826 str[large_size - 1] = '\0'; | 826 str[large_size - 1] = '\0'; |
| 827 objs[next_objs_index++] = | 827 objs[next_objs_index++] = |
| 828 FACTORY->NewStringFromAscii(CStrVector(str), TENURED); | 828 FACTORY->NewStringFromAscii(CStrVector(str), TENURED); |
| 829 delete[] str; | 829 delete[] str; |
| 830 | 830 |
| 831 // Add a Map object to look for. | 831 // Add a Map object to look for. |
| 832 objs[next_objs_index++] = Handle<Map>(HeapObject::cast(*objs[0])->map()); | 832 objs[next_objs_index++] = Handle<Map>(HeapObject::cast(*objs[0])->map()); |
| 833 | 833 |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1498 v8::HandleScope scope; | 1498 v8::HandleScope scope; |
| 1499 v8::Handle<v8::Object> global = v8::Context::GetCurrent()->Global(); | 1499 v8::Handle<v8::Object> global = v8::Context::GetCurrent()->Global(); |
| 1500 v8::Handle<v8::Function> g = | 1500 v8::Handle<v8::Function> g = |
| 1501 v8::Handle<v8::Function>::Cast(global->Get(v8_str("g"))); | 1501 v8::Handle<v8::Function>::Cast(global->Get(v8_str("g"))); |
| 1502 g->Call(global, 0, NULL); | 1502 g->Call(global, 0, NULL); |
| 1503 } | 1503 } |
| 1504 | 1504 |
| 1505 HEAP->incremental_marking()->set_should_hurry(true); | 1505 HEAP->incremental_marking()->set_should_hurry(true); |
| 1506 HEAP->CollectGarbage(OLD_POINTER_SPACE); | 1506 HEAP->CollectGarbage(OLD_POINTER_SPACE); |
| 1507 } | 1507 } |
| OLD | NEW |