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

Side by Side Diff: src/interpreter/interpreter.cc

Issue 2544793002: [stubs] Cleanup storing of maps to objects. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « src/ic/keyed-store-generic.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2606 matching lines...) Expand 10 before | Expand all | Expand 10 after
2617 Node* cache_type = __ LoadRegister(cache_type_reg); 2617 Node* cache_type = __ LoadRegister(cache_type_reg);
2618 Node* cache_array_reg = __ NextRegister(cache_type_reg); 2618 Node* cache_array_reg = __ NextRegister(cache_type_reg);
2619 Node* cache_array = __ LoadRegister(cache_array_reg); 2619 Node* cache_array = __ LoadRegister(cache_array_reg);
2620 2620
2621 // Load the next key from the enumeration array. 2621 // Load the next key from the enumeration array.
2622 Node* key = __ LoadFixedArrayElement(cache_array, index, 0, 2622 Node* key = __ LoadFixedArrayElement(cache_array, index, 0,
2623 CodeStubAssembler::SMI_PARAMETERS); 2623 CodeStubAssembler::SMI_PARAMETERS);
2624 2624
2625 // Check if we can use the for-in fast path potentially using the enum cache. 2625 // Check if we can use the for-in fast path potentially using the enum cache.
2626 Label if_fast(assembler), if_slow(assembler, Label::kDeferred); 2626 Label if_fast(assembler), if_slow(assembler, Label::kDeferred);
2627 Node* receiver_map = __ LoadObjectField(receiver, HeapObject::kMapOffset); 2627 Node* receiver_map = __ LoadMap(receiver);
2628 __ Branch(__ WordEqual(receiver_map, cache_type), &if_fast, &if_slow); 2628 __ Branch(__ WordEqual(receiver_map, cache_type), &if_fast, &if_slow);
2629 __ Bind(&if_fast); 2629 __ Bind(&if_fast);
2630 { 2630 {
2631 // Enum cache in use for {receiver}, the {key} is definitely valid. 2631 // Enum cache in use for {receiver}, the {key} is definitely valid.
2632 __ SetAccumulator(key); 2632 __ SetAccumulator(key);
2633 __ Dispatch(); 2633 __ Dispatch();
2634 } 2634 }
2635 __ Bind(&if_slow); 2635 __ Bind(&if_slow);
2636 { 2636 {
2637 // Record the fact that we hit the for-in slow path. 2637 // Record the fact that we hit the for-in slow path.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
2777 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2777 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2778 __ SmiTag(new_state)); 2778 __ SmiTag(new_state));
2779 __ SetAccumulator(old_state); 2779 __ SetAccumulator(old_state);
2780 2780
2781 __ Dispatch(); 2781 __ Dispatch();
2782 } 2782 }
2783 2783
2784 } // namespace interpreter 2784 } // namespace interpreter
2785 } // namespace internal 2785 } // namespace internal
2786 } // namespace v8 2786 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/keyed-store-generic.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698