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/compiler/code-assembler.h" | 5 #include "src/compiler/code-assembler.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 CodeAssemblerState::~CodeAssemblerState() {} | 64 CodeAssemblerState::~CodeAssemblerState() {} |
65 | 65 |
66 CodeAssembler::~CodeAssembler() {} | 66 CodeAssembler::~CodeAssembler() {} |
67 | 67 |
68 void CodeAssembler::CallPrologue() {} | 68 void CodeAssembler::CallPrologue() {} |
69 | 69 |
70 void CodeAssembler::CallEpilogue() {} | 70 void CodeAssembler::CallEpilogue() {} |
71 | 71 |
72 // static | 72 // static |
73 Handle<Code> CodeAssembler::GenerateCode(CodeAssemblerState* state) { | 73 Handle<Code> CodeAssembler::GenerateCode(CodeAssemblerState* state, |
| 74 bool verify_graph) { |
| 75 // TODO(ishell): Remove verify_graph parameter and always enable the |
| 76 // verification once all the issues are fixed. |
74 DCHECK(!state->code_generated_); | 77 DCHECK(!state->code_generated_); |
75 | 78 |
76 RawMachineAssembler* rasm = state->raw_assembler_.get(); | 79 RawMachineAssembler* rasm = state->raw_assembler_.get(); |
77 Schedule* schedule = rasm->Export(); | 80 Schedule* schedule = rasm->Export(); |
78 Handle<Code> code = Pipeline::GenerateCodeForCodeStub( | 81 Handle<Code> code = Pipeline::GenerateCodeForCodeStub( |
79 rasm->isolate(), rasm->call_descriptor(), rasm->graph(), schedule, | 82 rasm->isolate(), rasm->call_descriptor(), rasm->graph(), schedule, |
80 state->flags_, state->name_); | 83 state->flags_, state->name_, verify_graph); |
81 | 84 |
82 state->code_generated_ = true; | 85 state->code_generated_ = true; |
83 return code; | 86 return code; |
84 } | 87 } |
85 | 88 |
86 bool CodeAssembler::Is64() const { return raw_assembler()->machine()->Is64(); } | 89 bool CodeAssembler::Is64() const { return raw_assembler()->machine()->Is64(); } |
87 | 90 |
88 bool CodeAssembler::IsFloat64RoundUpSupported() const { | 91 bool CodeAssembler::IsFloat64RoundUpSupported() const { |
89 return raw_assembler()->machine()->Float64RoundUp().IsSupported(); | 92 return raw_assembler()->machine()->Float64RoundUp().IsSupported(); |
90 } | 93 } |
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 } | 1194 } |
1192 } | 1195 } |
1193 } | 1196 } |
1194 | 1197 |
1195 bound_ = true; | 1198 bound_ = true; |
1196 } | 1199 } |
1197 | 1200 |
1198 } // namespace compiler | 1201 } // namespace compiler |
1199 } // namespace internal | 1202 } // namespace internal |
1200 } // namespace v8 | 1203 } // namespace v8 |
OLD | NEW |