OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
(...skipping 5242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5253 FinishCurrentBlock( | 5253 FinishCurrentBlock( |
5254 New<HCompareObjectEqAndBranch>(enumerable_map, type, if_fast, if_slow)); | 5254 New<HCompareObjectEqAndBranch>(enumerable_map, type, if_fast, if_slow)); |
5255 set_current_block(if_fast); | 5255 set_current_block(if_fast); |
5256 { | 5256 { |
5257 // The enum cache for enumerable is still valid, no need to check key. | 5257 // The enum cache for enumerable is still valid, no need to check key. |
5258 Push(key); | 5258 Push(key); |
5259 Goto(if_join); | 5259 Goto(if_join); |
5260 } | 5260 } |
5261 set_current_block(if_slow); | 5261 set_current_block(if_slow); |
5262 { | 5262 { |
5263 ForInFilterStub stub(isolate()); | 5263 Callable callable = CodeFactory::ForInFilter(isolate()); |
5264 HValue* values[] = {context(), key, enumerable}; | 5264 HValue* values[] = {context(), key, enumerable}; |
5265 HConstant* stub_value = Add<HConstant>(stub.GetCode()); | 5265 HConstant* stub_value = Add<HConstant>(callable.code()); |
5266 Push(Add<HCallWithDescriptor>(stub_value, 0, | 5266 Push(Add<HCallWithDescriptor>(stub_value, 0, callable.descriptor(), |
5267 stub.GetCallInterfaceDescriptor(), | |
5268 ArrayVector(values))); | 5267 ArrayVector(values))); |
5269 Add<HSimulate>(stmt->FilterId()); | 5268 Add<HSimulate>(stmt->FilterId()); |
5270 FinishCurrentBlock(New<HCompareObjectEqAndBranch>( | 5269 FinishCurrentBlock(New<HCompareObjectEqAndBranch>( |
5271 Top(), graph()->GetConstantUndefined(), if_slow_skip, if_slow_pass)); | 5270 Top(), graph()->GetConstantUndefined(), if_slow_skip, if_slow_pass)); |
5272 } | 5271 } |
5273 set_current_block(if_slow_pass); | 5272 set_current_block(if_slow_pass); |
5274 { Goto(if_join); } | 5273 { Goto(if_join); } |
5275 set_current_block(if_slow_skip); | 5274 set_current_block(if_slow_skip); |
5276 { | 5275 { |
5277 // The key is no longer valid for enumerable, skip it. | 5276 // The key is no longer valid for enumerable, skip it. |
(...skipping 8000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13278 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13277 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13279 } | 13278 } |
13280 | 13279 |
13281 #ifdef DEBUG | 13280 #ifdef DEBUG |
13282 graph_->Verify(false); // No full verify. | 13281 graph_->Verify(false); // No full verify. |
13283 #endif | 13282 #endif |
13284 } | 13283 } |
13285 | 13284 |
13286 } // namespace internal | 13285 } // namespace internal |
13287 } // namespace v8 | 13286 } // namespace v8 |
OLD | NEW |