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/interpreter/interpreter.h" | 5 #include "src/interpreter/interpreter.h" |
6 | 6 |
7 #include <fstream> | 7 #include <fstream> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 2353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2364 Node* receiver = __ LoadRegister(object_reg); | 2364 Node* receiver = __ LoadRegister(object_reg); |
2365 Node* context = __ GetContext(); | 2365 Node* context = __ GetContext(); |
2366 Node* const zero_smi = __ SmiConstant(Smi::FromInt(0)); | 2366 Node* const zero_smi = __ SmiConstant(Smi::FromInt(0)); |
2367 | 2367 |
2368 Label nothing_to_iterate(assembler, Label::kDeferred), | 2368 Label nothing_to_iterate(assembler, Label::kDeferred), |
2369 use_enum_cache(assembler), use_runtime(assembler, Label::kDeferred); | 2369 use_enum_cache(assembler), use_runtime(assembler, Label::kDeferred); |
2370 | 2370 |
2371 if (FLAG_debug_code) { | 2371 if (FLAG_debug_code) { |
2372 Label already_receiver(assembler), abort(assembler); | 2372 Label already_receiver(assembler), abort(assembler); |
2373 Node* instance_type = __ LoadInstanceType(receiver); | 2373 Node* instance_type = __ LoadInstanceType(receiver); |
2374 Node* first_receiver_type = __ Int32Constant(FIRST_JS_RECEIVER_TYPE); | 2374 __ Branch(__ IsJSReceiverInstanceType(instance_type), &already_receiver, |
2375 __ BranchIfInt32GreaterThanOrEqual(instance_type, first_receiver_type, | 2375 &abort); |
2376 &already_receiver, &abort); | |
2377 __ Bind(&abort); | 2376 __ Bind(&abort); |
2378 { | 2377 { |
2379 __ Abort(kExpectedJSReceiver); | 2378 __ Abort(kExpectedJSReceiver); |
2380 // TODO(klaasb) remove this unreachable Goto once Abort ends the block | 2379 // TODO(klaasb) remove this unreachable Goto once Abort ends the block |
2381 __ Goto(&already_receiver); | 2380 __ Goto(&already_receiver); |
2382 } | 2381 } |
2383 __ Bind(&already_receiver); | 2382 __ Bind(&already_receiver); |
2384 } | 2383 } |
2385 | 2384 |
2386 __ CheckEnumCache(receiver, &use_enum_cache, &use_runtime); | 2385 __ CheckEnumCache(receiver, &use_enum_cache, &use_runtime); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2599 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2598 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2600 __ SmiTag(new_state)); | 2599 __ SmiTag(new_state)); |
2601 __ SetAccumulator(old_state); | 2600 __ SetAccumulator(old_state); |
2602 | 2601 |
2603 __ Dispatch(); | 2602 __ Dispatch(); |
2604 } | 2603 } |
2605 | 2604 |
2606 } // namespace interpreter | 2605 } // namespace interpreter |
2607 } // namespace internal | 2606 } // namespace internal |
2608 } // namespace v8 | 2607 } // namespace v8 |
OLD | NEW |