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 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2065 prototype = factory->NewJSArray(32 * KB, FAST_HOLEY_ELEMENTS, TENURED); | 2065 prototype = factory->NewJSArray(32 * KB, FAST_HOLEY_ELEMENTS, TENURED); |
2066 } | 2066 } |
2067 | 2067 |
2068 // Add a prototype on an evacuation candidate and verify that transition | 2068 // Add a prototype on an evacuation candidate and verify that transition |
2069 // clearing correctly records slots in prototype transition array. | 2069 // clearing correctly records slots in prototype transition array. |
2070 i::FLAG_always_compact = true; | 2070 i::FLAG_always_compact = true; |
2071 Handle<Map> map(baseObject->map()); | 2071 Handle<Map> map(baseObject->map()); |
2072 CHECK(!space->LastPage()->Contains( | 2072 CHECK(!space->LastPage()->Contains( |
2073 map->GetPrototypeTransitions()->address())); | 2073 map->GetPrototypeTransitions()->address())); |
2074 CHECK(space->LastPage()->Contains(prototype->address())); | 2074 CHECK(space->LastPage()->Contains(prototype->address())); |
2075 JSObject::SetPrototype(baseObject, prototype, false); | |
2076 CHECK(Map::GetPrototypeTransition(map, prototype)->IsMap()); | |
2077 CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags); | |
2078 CHECK(Map::GetPrototypeTransition(map, prototype)->IsMap()); | |
2079 } | 2075 } |
2080 | 2076 |
2081 | 2077 |
2082 TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) { | 2078 TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) { |
2083 i::FLAG_stress_compaction = false; | 2079 i::FLAG_stress_compaction = false; |
2084 i::FLAG_allow_natives_syntax = true; | 2080 i::FLAG_allow_natives_syntax = true; |
2085 #ifdef VERIFY_HEAP | 2081 #ifdef VERIFY_HEAP |
2086 i::FLAG_verify_heap = true; | 2082 i::FLAG_verify_heap = true; |
2087 #endif | 2083 #endif |
2088 | 2084 |
(...skipping 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4048 v8::Context::Scope cscope(context); | 4044 v8::Context::Scope cscope(context); |
4049 | 4045 |
4050 v8::Local<v8::Value> result = CompileRun( | 4046 v8::Local<v8::Value> result = CompileRun( |
4051 "var locals = '';" | 4047 "var locals = '';" |
4052 "for (var i = 0; i < 512; i++) locals += 'var v' + i + '= 42;';" | 4048 "for (var i = 0; i < 512; i++) locals += 'var v' + i + '= 42;';" |
4053 "eval('function f() {' + locals + 'return function() { return v0; }; }');" | 4049 "eval('function f() {' + locals + 'return function() { return v0; }; }');" |
4054 "interrupt();" // This triggers a fake stack overflow in f. | 4050 "interrupt();" // This triggers a fake stack overflow in f. |
4055 "f()()"); | 4051 "f()()"); |
4056 CHECK_EQ(42.0, result->ToNumber()->Value()); | 4052 CHECK_EQ(42.0, result->ToNumber()->Value()); |
4057 } | 4053 } |
OLD | NEW |