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

Unified Diff: src/fast-accessor-assembler.cc

Issue 2498073002: [refactoring] Split CodeAssemblerState out of CodeAssembler (Closed)
Patch Set: Created 4 years, 1 month 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
Index: src/fast-accessor-assembler.cc
diff --git a/src/fast-accessor-assembler.cc b/src/fast-accessor-assembler.cc
index ee9b241186e0e76218071dbbc44de5da97f79c89..92f98fd0cfe1952a48805524c2103cefc23ae732 100644
--- a/src/fast-accessor-assembler.cc
+++ b/src/fast-accessor-assembler.cc
@@ -19,9 +19,9 @@ namespace internal {
FastAccessorAssembler::FastAccessorAssembler(Isolate* isolate)
: zone_(isolate->allocator(), ZONE_NAME),
isolate_(isolate),
- assembler_(new CodeStubAssembler(isolate, zone(), 1,
- Code::ComputeFlags(Code::STUB),
- "FastAccessorAssembler")),
+ assembler_state_(isolate, zone(), 1, Code::ComputeFlags(Code::STUB),
+ "FastAccessorAssembler"),
+ assembler_(new CodeStubAssembler(&assembler_state_)),
state_(kBuilding) {}
FastAccessorAssembler::~FastAccessorAssembler() { Clear(); }
@@ -248,7 +248,7 @@ void FastAccessorAssembler::CheckIsJSObjectOrJump(ValueId value_id,
MaybeHandle<Code> FastAccessorAssembler::Build() {
CHECK_EQ(kBuilding, state_);
- Handle<Code> code = assembler_->GenerateCode();
+ Handle<Code> code = assembler_state_.GenerateCode();
state_ = !code.is_null() ? kBuilt : kError;
Clear();
return code;

Powered by Google App Engine
This is Rietveld 408576698