OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/interpreter/interpreter.h" | 5 #include "src/interpreter/interpreter.h" |
6 | 6 |
7 #include <fstream> | 7 #include <fstream> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 DISALLOW_COPY_AND_ASSIGN(InterpreterCompilationJob); | 48 DISALLOW_COPY_AND_ASSIGN(InterpreterCompilationJob); |
49 }; | 49 }; |
50 | 50 |
51 Interpreter::Interpreter(Isolate* isolate) : isolate_(isolate) { | 51 Interpreter::Interpreter(Isolate* isolate) : isolate_(isolate) { |
52 memset(dispatch_table_, 0, sizeof(dispatch_table_)); | 52 memset(dispatch_table_, 0, sizeof(dispatch_table_)); |
53 } | 53 } |
54 | 54 |
55 void Interpreter::Initialize() { | 55 void Interpreter::Initialize() { |
56 if (IsDispatchTableInitialized()) return; | 56 if (IsDispatchTableInitialized()) return; |
57 Zone zone(isolate_->allocator()); | 57 Zone zone(isolate_->allocator(), ZONE_NAME); |
58 HandleScope scope(isolate_); | 58 HandleScope scope(isolate_); |
59 | 59 |
60 if (FLAG_trace_ignition_dispatches) { | 60 if (FLAG_trace_ignition_dispatches) { |
61 static const int kBytecodeCount = static_cast<int>(Bytecode::kLast) + 1; | 61 static const int kBytecodeCount = static_cast<int>(Bytecode::kLast) + 1; |
62 bytecode_dispatch_counters_table_.reset( | 62 bytecode_dispatch_counters_table_.reset( |
63 new uintptr_t[kBytecodeCount * kBytecodeCount]); | 63 new uintptr_t[kBytecodeCount * kBytecodeCount]); |
64 memset(bytecode_dispatch_counters_table_.get(), 0, | 64 memset(bytecode_dispatch_counters_table_.get(), 0, |
65 sizeof(uintptr_t) * kBytecodeCount * kBytecodeCount); | 65 sizeof(uintptr_t) * kBytecodeCount * kBytecodeCount); |
66 } | 66 } |
67 | 67 |
(...skipping 2569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2637 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2637 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2638 __ SmiTag(new_state)); | 2638 __ SmiTag(new_state)); |
2639 __ SetAccumulator(old_state); | 2639 __ SetAccumulator(old_state); |
2640 | 2640 |
2641 __ Dispatch(); | 2641 __ Dispatch(); |
2642 } | 2642 } |
2643 | 2643 |
2644 } // namespace interpreter | 2644 } // namespace interpreter |
2645 } // namespace internal | 2645 } // namespace internal |
2646 } // namespace v8 | 2646 } // namespace v8 |
OLD | NEW |