OLD | NEW |
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 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1959 } | 1959 } |
1960 CHECK(t->IsSlicedString()); | 1960 CHECK(t->IsSlicedString()); |
1961 CHECK(!HEAP->InNewSpace(*t)); | 1961 CHECK(!HEAP->InNewSpace(*t)); |
1962 *slice.location() = *t.location(); | 1962 *slice.location() = *t.location(); |
1963 } | 1963 } |
1964 | 1964 |
1965 CHECK(SlicedString::cast(*slice)->parent()->IsSeqAsciiString()); | 1965 CHECK(SlicedString::cast(*slice)->parent()->IsSeqAsciiString()); |
1966 HEAP->CollectAllGarbage(Heap::kNoGCFlags); | 1966 HEAP->CollectAllGarbage(Heap::kNoGCFlags); |
1967 CHECK(SlicedString::cast(*slice)->parent()->IsSeqAsciiString()); | 1967 CHECK(SlicedString::cast(*slice)->parent()->IsSeqAsciiString()); |
1968 } | 1968 } |
| 1969 |
| 1970 |
| 1971 #ifdef OBJECT_PRINT |
| 1972 TEST(PrintSharedFunctionInfo) { |
| 1973 InitializeVM(); |
| 1974 v8::HandleScope scope; |
| 1975 const char* source = "f = function() { return 987654321; }\n" |
| 1976 "g = function() { return 123456789; }\n"; |
| 1977 CompileRun(source); |
| 1978 Handle<JSFunction> g = |
| 1979 v8::Utils::OpenHandle( |
| 1980 *v8::Handle<v8::Function>::Cast( |
| 1981 v8::Context::GetCurrent()->Global()->Get(v8_str("g")))); |
| 1982 |
| 1983 AssertNoAllocation no_alloc; |
| 1984 g->shared()->PrintLn(); |
| 1985 } |
| 1986 #endif // OBJECT_PRINT |
OLD | NEW |