| 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 #include "src/fast-accessor-assembler.h" | 5 #include "src/fast-accessor-assembler.h" |
| 6 | 6 |
| 7 #include "src/base/logging.h" | 7 #include "src/base/logging.h" |
| 8 #include "src/code-stub-assembler.h" | 8 #include "src/code-stub-assembler.h" |
| 9 #include "src/code-stubs.h" // For CallApiCallbackStub. | 9 #include "src/code-stubs.h" // For CallApiCallbackStub. |
| 10 #include "src/handles-inl.h" | 10 #include "src/handles-inl.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 Internals::kJSApiObjectType)), | 233 Internals::kJSApiObjectType)), |
| 234 FromId(label_id)); | 234 FromId(label_id)); |
| 235 | 235 |
| 236 // Continue. | 236 // Continue. |
| 237 assembler_->Goto(&is_jsobject); | 237 assembler_->Goto(&is_jsobject); |
| 238 assembler_->Bind(&is_jsobject); | 238 assembler_->Bind(&is_jsobject); |
| 239 } | 239 } |
| 240 | 240 |
| 241 MaybeHandle<Code> FastAccessorAssembler::Build() { | 241 MaybeHandle<Code> FastAccessorAssembler::Build() { |
| 242 CHECK_EQ(kBuilding, state_); | 242 CHECK_EQ(kBuilding, state_); |
| 243 Handle<Code> code = compiler::CodeAssembler::GenerateCode( | 243 Handle<Code> code = |
| 244 assembler_state_.get(), FLAG_csa_verify); | 244 compiler::CodeAssembler::GenerateCode(assembler_state_.get()); |
| 245 state_ = !code.is_null() ? kBuilt : kError; | 245 state_ = !code.is_null() ? kBuilt : kError; |
| 246 Clear(); | 246 Clear(); |
| 247 return code; | 247 return code; |
| 248 } | 248 } |
| 249 | 249 |
| 250 FastAccessorAssembler::ValueId FastAccessorAssembler::FromRaw(Node* node) { | 250 FastAccessorAssembler::ValueId FastAccessorAssembler::FromRaw(Node* node) { |
| 251 nodes_.push_back(node); | 251 nodes_.push_back(node); |
| 252 ValueId value_id = {nodes_.size() - 1}; | 252 ValueId value_id = {nodes_.size() - 1}; |
| 253 return value_id; | 253 return value_id; |
| 254 } | 254 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 275 void FastAccessorAssembler::Clear() { | 275 void FastAccessorAssembler::Clear() { |
| 276 for (auto label : labels_) { | 276 for (auto label : labels_) { |
| 277 delete label; | 277 delete label; |
| 278 } | 278 } |
| 279 nodes_.clear(); | 279 nodes_.clear(); |
| 280 labels_.clear(); | 280 labels_.clear(); |
| 281 } | 281 } |
| 282 | 282 |
| 283 } // namespace internal | 283 } // namespace internal |
| 284 } // namespace v8 | 284 } // namespace v8 |
| OLD | NEW |