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 4032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4043 while (code->next_code_link()->IsCode()) { | 4043 while (code->next_code_link()->IsCode()) { |
4044 result++; | 4044 result++; |
4045 code = Code::cast(code->next_code_link()); | 4045 code = Code::cast(code->next_code_link()); |
4046 } | 4046 } |
4047 return result; | 4047 return result; |
4048 } | 4048 } |
4049 | 4049 |
4050 | 4050 |
4051 TEST(NextCodeLinkIsWeak) { | 4051 TEST(NextCodeLinkIsWeak) { |
4052 i::FLAG_allow_natives_syntax = true; | 4052 i::FLAG_allow_natives_syntax = true; |
| 4053 i::FLAG_turbo_deoptimization = true; |
4053 CcTest::InitializeVM(); | 4054 CcTest::InitializeVM(); |
4054 Isolate* isolate = CcTest::i_isolate(); | 4055 Isolate* isolate = CcTest::i_isolate(); |
4055 v8::internal::Heap* heap = CcTest::heap(); | 4056 v8::internal::Heap* heap = CcTest::heap(); |
4056 | 4057 |
4057 if (!isolate->use_crankshaft()) return; | 4058 if (!isolate->use_crankshaft()) return; |
4058 HandleScope outer_scope(heap->isolate()); | 4059 HandleScope outer_scope(heap->isolate()); |
4059 Handle<Code> code; | 4060 Handle<Code> code; |
4060 heap->CollectAllAvailableGarbage(); | 4061 heap->CollectAllAvailableGarbage(); |
4061 int code_chain_length_before, code_chain_length_after; | 4062 int code_chain_length_before, code_chain_length_after; |
4062 { | 4063 { |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4478 #ifdef DEBUG | 4479 #ifdef DEBUG |
4479 TEST(PathTracer) { | 4480 TEST(PathTracer) { |
4480 CcTest::InitializeVM(); | 4481 CcTest::InitializeVM(); |
4481 v8::HandleScope scope(CcTest::isolate()); | 4482 v8::HandleScope scope(CcTest::isolate()); |
4482 | 4483 |
4483 v8::Local<v8::Value> result = CompileRun("'abc'"); | 4484 v8::Local<v8::Value> result = CompileRun("'abc'"); |
4484 Handle<Object> o = v8::Utils::OpenHandle(*result); | 4485 Handle<Object> o = v8::Utils::OpenHandle(*result); |
4485 CcTest::i_isolate()->heap()->TracePathToObject(*o); | 4486 CcTest::i_isolate()->heap()->TracePathToObject(*o); |
4486 } | 4487 } |
4487 #endif // DEBUG | 4488 #endif // DEBUG |
OLD | NEW |