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 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/interpreter/bytecode-array-writer.h" | 9 #include "src/interpreter/bytecode-array-writer.h" |
10 #include "src/interpreter/bytecode-register-allocator.h" | 10 #include "src/interpreter/bytecode-register-allocator.h" |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 // latest value. | 305 // latest value. |
306 latest_source_info_.MakeExpressionPosition(expr->position()); | 306 latest_source_info_.MakeExpressionPosition(expr->position()); |
307 } | 307 } |
308 } | 308 } |
309 | 309 |
310 void SetExpressionAsStatementPosition(Expression* expr) { | 310 void SetExpressionAsStatementPosition(Expression* expr) { |
311 if (expr->position() == kNoSourcePosition) return; | 311 if (expr->position() == kNoSourcePosition) return; |
312 latest_source_info_.MakeStatementPosition(expr->position()); | 312 latest_source_info_.MakeStatementPosition(expr->position()); |
313 } | 313 } |
314 | 314 |
315 void EnsureReturn(); | 315 bool RequiresImplicitReturn() const { return !return_seen_in_block_; } |
316 | 316 |
317 // Accessors | 317 // Accessors |
318 BytecodeRegisterAllocator* register_allocator() { | 318 BytecodeRegisterAllocator* register_allocator() { |
319 return ®ister_allocator_; | 319 return ®ister_allocator_; |
320 } | 320 } |
321 const BytecodeRegisterAllocator* register_allocator() const { | 321 const BytecodeRegisterAllocator* register_allocator() const { |
322 return ®ister_allocator_; | 322 return ®ister_allocator_; |
323 } | 323 } |
324 Zone* zone() const { return zone_; } | 324 Zone* zone() const { return zone_; } |
325 | 325 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 static int const kNoFeedbackSlot = 0; | 405 static int const kNoFeedbackSlot = 0; |
406 | 406 |
407 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 407 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
408 }; | 408 }; |
409 | 409 |
410 } // namespace interpreter | 410 } // namespace interpreter |
411 } // namespace internal | 411 } // namespace internal |
412 } // namespace v8 | 412 } // namespace v8 |
413 | 413 |
414 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 414 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |