OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/deoptimizer.h" | 5 #include "src/deoptimizer.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
11 #include "src/codegen.h" | 11 #include "src/codegen.h" |
12 #include "src/disasm.h" | 12 #include "src/disasm.h" |
13 #include "src/frames-inl.h" | 13 #include "src/frames-inl.h" |
14 #include "src/full-codegen/full-codegen.h" | 14 #include "src/full-codegen/full-codegen.h" |
15 #include "src/global-handles.h" | 15 #include "src/global-handles.h" |
16 #include "src/interpreter/interpreter.h" | 16 #include "src/interpreter/interpreter.h" |
17 #include "src/macro-assembler.h" | 17 #include "src/macro-assembler.h" |
18 #include "src/tracing/trace-event.h" | 18 #include "src/tracing/trace-event.h" |
19 #include "src/v8.h" | 19 #include "src/v8.h" |
20 | 20 |
21 | 21 |
22 namespace v8 { | 22 namespace v8 { |
23 namespace internal { | 23 namespace internal { |
24 | 24 |
25 static MemoryChunk* AllocateCodeChunk(MemoryAllocator* allocator) { | 25 static MemoryChunk* AllocateCodeChunk(MemoryAllocator* allocator) { |
26 return allocator->AllocateChunk(Deoptimizer::GetMaxDeoptTableSize(), | 26 return allocator->AllocateChunk(Deoptimizer::GetMaxDeoptTableSize(), |
27 base::OS::CommitPageSize(), | 27 base::OS::CommitPageSize(), |
28 #if defined(__native_client__) | |
29 // The Native Client port of V8 uses an interpreter, | |
30 // so code pages don't need PROT_EXEC. | |
31 NOT_EXECUTABLE, | |
32 #else | |
33 EXECUTABLE, | 28 EXECUTABLE, |
34 #endif | |
35 NULL); | 29 NULL); |
36 } | 30 } |
37 | 31 |
38 | 32 |
39 DeoptimizerData::DeoptimizerData(MemoryAllocator* allocator) | 33 DeoptimizerData::DeoptimizerData(MemoryAllocator* allocator) |
40 : allocator_(allocator), | 34 : allocator_(allocator), |
41 current_(NULL) { | 35 current_(NULL) { |
42 for (int i = 0; i <= Deoptimizer::kLastBailoutType; ++i) { | 36 for (int i = 0; i <= Deoptimizer::kLastBailoutType; ++i) { |
43 deopt_entry_code_entries_[i] = -1; | 37 deopt_entry_code_entries_[i] = -1; |
44 deopt_entry_code_[i] = AllocateCodeChunk(allocator); | 38 deopt_entry_code_[i] = AllocateCodeChunk(allocator); |
(...skipping 3953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3998 CHECK(value_info->IsMaterializedObject()); | 3992 CHECK(value_info->IsMaterializedObject()); |
3999 | 3993 |
4000 value_info->value_ = | 3994 value_info->value_ = |
4001 Handle<Object>(previously_materialized_objects->get(i), isolate_); | 3995 Handle<Object>(previously_materialized_objects->get(i), isolate_); |
4002 } | 3996 } |
4003 } | 3997 } |
4004 } | 3998 } |
4005 | 3999 |
4006 } // namespace internal | 4000 } // namespace internal |
4007 } // namespace v8 | 4001 } // namespace v8 |
OLD | NEW |