OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef V8_COMPILATION_INFO_H_ | 5 #ifndef V8_COMPILATION_INFO_H_ |
6 #define V8_COMPILATION_INFO_H_ | 6 #define V8_COMPILATION_INFO_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/compilation-dependencies.h" | 10 #include "src/compilation-dependencies.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 DCHECK_EQ(BASE, mode_); | 225 DCHECK_EQ(BASE, mode_); |
226 SetFlag(kDeoptimizationSupport); | 226 SetFlag(kDeoptimizationSupport); |
227 } | 227 } |
228 bool ShouldEnsureSpaceForLazyDeopt() { return !IsStub(); } | 228 bool ShouldEnsureSpaceForLazyDeopt() { return !IsStub(); } |
229 | 229 |
230 bool ExpectsJSReceiverAsReceiver(); | 230 bool ExpectsJSReceiverAsReceiver(); |
231 | 231 |
232 // Determines whether or not to insert a self-optimization header. | 232 // Determines whether or not to insert a self-optimization header. |
233 bool ShouldSelfOptimize(); | 233 bool ShouldSelfOptimize(); |
234 | 234 |
235 void set_deferred_handles(std::shared_ptr<DeferredHandles> deferred_handles); | 235 void set_deferred_handles(DeferredHandles* deferred_handles) { |
236 void set_deferred_handles(DeferredHandles* deferred_handles); | 236 DCHECK(deferred_handles_ == NULL); |
237 std::shared_ptr<DeferredHandles> deferred_handles() { | 237 deferred_handles_ = deferred_handles; |
238 return deferred_handles_; | |
239 } | 238 } |
240 | 239 |
241 void ReopenHandlesInNewHandleScope(); | 240 void ReopenHandlesInNewHandleScope(); |
242 | 241 |
243 void AbortOptimization(BailoutReason reason) { | 242 void AbortOptimization(BailoutReason reason) { |
244 DCHECK(reason != kNoReason); | 243 DCHECK(reason != kNoReason); |
245 if (bailout_reason_ == kNoReason) bailout_reason_ = reason; | 244 if (bailout_reason_ == kNoReason) bailout_reason_ = reason; |
246 SetFlag(kDisableFutureOptimization); | 245 SetFlag(kDisableFutureOptimization); |
247 } | 246 } |
248 | 247 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 357 |
359 // Holds the bytecode array generated by the interpreter. | 358 // Holds the bytecode array generated by the interpreter. |
360 // TODO(rmcilroy/mstarzinger): Temporary work-around until compiler.cc is | 359 // TODO(rmcilroy/mstarzinger): Temporary work-around until compiler.cc is |
361 // refactored to avoid us needing to carry the BytcodeArray around. | 360 // refactored to avoid us needing to carry the BytcodeArray around. |
362 Handle<BytecodeArray> bytecode_array_; | 361 Handle<BytecodeArray> bytecode_array_; |
363 | 362 |
364 // The zone from which the compilation pipeline working on this | 363 // The zone from which the compilation pipeline working on this |
365 // CompilationInfo allocates. | 364 // CompilationInfo allocates. |
366 Zone* zone_; | 365 Zone* zone_; |
367 | 366 |
368 std::shared_ptr<DeferredHandles> deferred_handles_; | 367 DeferredHandles* deferred_handles_; |
369 | 368 |
370 // Dependencies for this compilation, e.g. stable maps. | 369 // Dependencies for this compilation, e.g. stable maps. |
371 CompilationDependencies dependencies_; | 370 CompilationDependencies dependencies_; |
372 | 371 |
373 BailoutReason bailout_reason_; | 372 BailoutReason bailout_reason_; |
374 | 373 |
375 int prologue_offset_; | 374 int prologue_offset_; |
376 | 375 |
377 InlinedFunctionList inlined_functions_; | 376 InlinedFunctionList inlined_functions_; |
378 | 377 |
379 // Number of parameters used for compilation of stubs that require arguments. | 378 // Number of parameters used for compilation of stubs that require arguments. |
380 int parameter_count_; | 379 int parameter_count_; |
381 | 380 |
382 int optimization_id_; | 381 int optimization_id_; |
383 | 382 |
384 int osr_expr_stack_height_; | 383 int osr_expr_stack_height_; |
385 | 384 |
386 // The current OSR frame for specialization or {nullptr}. | 385 // The current OSR frame for specialization or {nullptr}. |
387 JavaScriptFrame* osr_frame_ = nullptr; | 386 JavaScriptFrame* osr_frame_ = nullptr; |
388 | 387 |
389 Vector<const char> debug_name_; | 388 Vector<const char> debug_name_; |
390 | 389 |
391 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); | 390 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); |
392 }; | 391 }; |
393 | 392 |
394 } // namespace internal | 393 } // namespace internal |
395 } // namespace v8 | 394 } // namespace v8 |
396 | 395 |
397 #endif // V8_COMPILATION_INFO_H_ | 396 #endif // V8_COMPILATION_INFO_H_ |
OLD | NEW |