| 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(DeferredHandles* deferred_handles) { | 235 void set_deferred_handles(std::shared_ptr<DeferredHandles> deferred_handles); |
| 236 DCHECK(deferred_handles_ == NULL); | 236 void set_deferred_handles(DeferredHandles* deferred_handles); |
| 237 deferred_handles_ = deferred_handles; | 237 std::shared_ptr<DeferredHandles> deferred_handles() { |
| 238 return deferred_handles_; |
| 238 } | 239 } |
| 239 | 240 |
| 240 void ReopenHandlesInNewHandleScope(); | 241 void ReopenHandlesInNewHandleScope(); |
| 241 | 242 |
| 242 void AbortOptimization(BailoutReason reason) { | 243 void AbortOptimization(BailoutReason reason) { |
| 243 DCHECK(reason != kNoReason); | 244 DCHECK(reason != kNoReason); |
| 244 if (bailout_reason_ == kNoReason) bailout_reason_ = reason; | 245 if (bailout_reason_ == kNoReason) bailout_reason_ = reason; |
| 245 SetFlag(kDisableFutureOptimization); | 246 SetFlag(kDisableFutureOptimization); |
| 246 } | 247 } |
| 247 | 248 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 | 358 |
| 358 // Holds the bytecode array generated by the interpreter. | 359 // Holds the bytecode array generated by the interpreter. |
| 359 // TODO(rmcilroy/mstarzinger): Temporary work-around until compiler.cc is | 360 // TODO(rmcilroy/mstarzinger): Temporary work-around until compiler.cc is |
| 360 // refactored to avoid us needing to carry the BytcodeArray around. | 361 // refactored to avoid us needing to carry the BytcodeArray around. |
| 361 Handle<BytecodeArray> bytecode_array_; | 362 Handle<BytecodeArray> bytecode_array_; |
| 362 | 363 |
| 363 // The zone from which the compilation pipeline working on this | 364 // The zone from which the compilation pipeline working on this |
| 364 // CompilationInfo allocates. | 365 // CompilationInfo allocates. |
| 365 Zone* zone_; | 366 Zone* zone_; |
| 366 | 367 |
| 367 DeferredHandles* deferred_handles_; | 368 std::shared_ptr<DeferredHandles> deferred_handles_; |
| 368 | 369 |
| 369 // Dependencies for this compilation, e.g. stable maps. | 370 // Dependencies for this compilation, e.g. stable maps. |
| 370 CompilationDependencies dependencies_; | 371 CompilationDependencies dependencies_; |
| 371 | 372 |
| 372 BailoutReason bailout_reason_; | 373 BailoutReason bailout_reason_; |
| 373 | 374 |
| 374 int prologue_offset_; | 375 int prologue_offset_; |
| 375 | 376 |
| 376 InlinedFunctionList inlined_functions_; | 377 InlinedFunctionList inlined_functions_; |
| 377 | 378 |
| 378 // Number of parameters used for compilation of stubs that require arguments. | 379 // Number of parameters used for compilation of stubs that require arguments. |
| 379 int parameter_count_; | 380 int parameter_count_; |
| 380 | 381 |
| 381 int optimization_id_; | 382 int optimization_id_; |
| 382 | 383 |
| 383 int osr_expr_stack_height_; | 384 int osr_expr_stack_height_; |
| 384 | 385 |
| 385 // The current OSR frame for specialization or {nullptr}. | 386 // The current OSR frame for specialization or {nullptr}. |
| 386 JavaScriptFrame* osr_frame_ = nullptr; | 387 JavaScriptFrame* osr_frame_ = nullptr; |
| 387 | 388 |
| 388 Vector<const char> debug_name_; | 389 Vector<const char> debug_name_; |
| 389 | 390 |
| 390 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); | 391 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); |
| 391 }; | 392 }; |
| 392 | 393 |
| 393 } // namespace internal | 394 } // namespace internal |
| 394 } // namespace v8 | 395 } // namespace v8 |
| 395 | 396 |
| 396 #endif // V8_COMPILATION_INFO_H_ | 397 #endif // V8_COMPILATION_INFO_H_ |
| OLD | NEW |