Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: src/interpreter/bytecode-array-builder.h

Issue 1744123003: [debugger] fix break locations for assignments and return. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixes and addressed comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.h
diff --git a/src/interpreter/bytecode-array-builder.h b/src/interpreter/bytecode-array-builder.h
index fe693371845c3f56c12d10e37a37debe1552aad3..87c1138efae438c80d36974c063f8d28ae71e03d 100644
--- a/src/interpreter/bytecode-array-builder.h
+++ b/src/interpreter/bytecode-array-builder.h
@@ -27,7 +27,8 @@ class Register;
class BytecodeArrayBuilder final : public ZoneObject, private RegisterMover {
public:
BytecodeArrayBuilder(Isolate* isolate, Zone* zone, int parameter_count,
- int context_count, int locals_count);
+ int context_count, int locals_count,
+ FunctionLiteral* literal = nullptr);
~BytecodeArrayBuilder();
Handle<BytecodeArray> ToBytecodeArray();
@@ -257,6 +258,8 @@ class BytecodeArrayBuilder final : public ZoneObject, private RegisterMover {
// entry, so that it can be referenced by above exception handling support.
int NewHandlerEntry() { return handler_table_builder()->NewHandlerEntry(); }
+ void InitializeReturnPosition(FunctionLiteral* literal);
+
void SetStatementPosition(Statement* stmt);
void SetExpressionPosition(Expression* expr);
@@ -269,7 +272,7 @@ class BytecodeArrayBuilder final : public ZoneObject, private RegisterMover {
return &temporary_allocator_;
}
- void EnsureReturn(FunctionLiteral* literal);
+ void EnsureReturn();
private:
class PreviousBytecodeHelper;
@@ -334,8 +337,8 @@ class BytecodeArrayBuilder final : public ZoneObject, private RegisterMover {
bool NeedToBooleanCast();
bool IsRegisterInAccumulator(Register reg);
- // Set position for implicit return.
- void SetReturnPosition(FunctionLiteral* fun);
+ // Set position for return.
+ void SetReturnPosition();
// Gets a constant pool entry for the |object|.
size_t GetConstantPoolEntry(Handle<Object> object);
@@ -371,6 +374,7 @@ class BytecodeArrayBuilder final : public ZoneObject, private RegisterMover {
int parameter_count_;
int local_register_count_;
int context_register_count_;
+ int return_position_;
TemporaryRegisterAllocator temporary_allocator_;
RegisterTranslator register_translator_;
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698