OLD | NEW |
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 2353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2364 CcTest::InitializeVM(); | 2364 CcTest::InitializeVM(); |
2365 v8::HandleScope scope(CcTest::isolate()); | 2365 v8::HandleScope scope(CcTest::isolate()); |
2366 const char* source = "f = function() { return 987654321; }\n" | 2366 const char* source = "f = function() { return 987654321; }\n" |
2367 "g = function() { return 123456789; }\n"; | 2367 "g = function() { return 123456789; }\n"; |
2368 CompileRun(source); | 2368 CompileRun(source); |
2369 Handle<JSFunction> g = | 2369 Handle<JSFunction> g = |
2370 v8::Utils::OpenHandle( | 2370 v8::Utils::OpenHandle( |
2371 *v8::Handle<v8::Function>::Cast( | 2371 *v8::Handle<v8::Function>::Cast( |
2372 v8::Context::GetCurrent()->Global()->Get(v8_str("g")))); | 2372 v8::Context::GetCurrent()->Global()->Get(v8_str("g")))); |
2373 | 2373 |
2374 AssertNoAllocation no_alloc; | 2374 DisallowHeapAllocation no_allocation; |
2375 g->shared()->PrintLn(); | 2375 g->shared()->PrintLn(); |
2376 } | 2376 } |
2377 #endif // OBJECT_PRINT | 2377 #endif // OBJECT_PRINT |
2378 | 2378 |
2379 | 2379 |
2380 TEST(Regress2211) { | 2380 TEST(Regress2211) { |
2381 CcTest::InitializeVM(); | 2381 CcTest::InitializeVM(); |
2382 v8::HandleScope scope(CcTest::isolate()); | 2382 v8::HandleScope scope(CcTest::isolate()); |
2383 | 2383 |
2384 v8::Handle<v8::String> value = v8_str("val string"); | 2384 v8::Handle<v8::String> value = v8_str("val string"); |
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3116 " var a = new Array(n);" | 3116 " var a = new Array(n);" |
3117 " for (var i = 0; i < n; i += 100) a[i] = i;" | 3117 " for (var i = 0; i < n; i += 100) a[i] = i;" |
3118 "};" | 3118 "};" |
3119 "f(10 * 1024 * 1024);"); | 3119 "f(10 * 1024 * 1024);"); |
3120 IncrementalMarking* marking = HEAP->incremental_marking(); | 3120 IncrementalMarking* marking = HEAP->incremental_marking(); |
3121 if (marking->IsStopped()) marking->Start(); | 3121 if (marking->IsStopped()) marking->Start(); |
3122 // This big step should be sufficient to mark the whole array. | 3122 // This big step should be sufficient to mark the whole array. |
3123 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD); | 3123 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
3124 ASSERT(marking->IsComplete()); | 3124 ASSERT(marking->IsComplete()); |
3125 } | 3125 } |
OLD | NEW |