| 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 2089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2100 void Interpreter::DoCreateObjectLiteral(InterpreterAssembler* assembler) { | 2100 void Interpreter::DoCreateObjectLiteral(InterpreterAssembler* assembler) { |
| 2101 Node* literal_index_raw = __ BytecodeOperandIdx(1); | 2101 Node* literal_index_raw = __ BytecodeOperandIdx(1); |
| 2102 Node* literal_index = __ SmiTag(literal_index_raw); | 2102 Node* literal_index = __ SmiTag(literal_index_raw); |
| 2103 Node* bytecode_flags = __ BytecodeOperandFlag(2); | 2103 Node* bytecode_flags = __ BytecodeOperandFlag(2); |
| 2104 Node* closure = __ LoadRegister(Register::function_closure()); | 2104 Node* closure = __ LoadRegister(Register::function_closure()); |
| 2105 | 2105 |
| 2106 // Check if we can do a fast clone or have to call the runtime. | 2106 // Check if we can do a fast clone or have to call the runtime. |
| 2107 Label if_fast_clone(assembler), | 2107 Label if_fast_clone(assembler), |
| 2108 if_not_fast_clone(assembler, Label::kDeferred); | 2108 if_not_fast_clone(assembler, Label::kDeferred); |
| 2109 Node* fast_clone_properties_count = | 2109 Node* fast_clone_properties_count = |
| 2110 __ BitFieldDecode<CreateObjectLiteralFlags::FastClonePropertiesCountBits>( | 2110 __ DecodeWord32<CreateObjectLiteralFlags::FastClonePropertiesCountBits>( |
| 2111 bytecode_flags); | 2111 bytecode_flags); |
| 2112 __ Branch(fast_clone_properties_count, &if_fast_clone, &if_not_fast_clone); | 2112 __ Branch(fast_clone_properties_count, &if_fast_clone, &if_not_fast_clone); |
| 2113 | 2113 |
| 2114 __ Bind(&if_fast_clone); | 2114 __ Bind(&if_fast_clone); |
| 2115 { | 2115 { |
| 2116 // If we can do a fast clone do the fast-path in FastCloneShallowObjectStub. | 2116 // If we can do a fast clone do the fast-path in FastCloneShallowObjectStub. |
| 2117 Node* result = FastCloneShallowObjectStub::GenerateFastPath( | 2117 Node* result = FastCloneShallowObjectStub::GenerateFastPath( |
| 2118 assembler, &if_not_fast_clone, closure, literal_index, | 2118 assembler, &if_not_fast_clone, closure, literal_index, |
| 2119 fast_clone_properties_count); | 2119 fast_clone_properties_count); |
| 2120 __ StoreRegister(result, __ BytecodeOperandReg(3)); | 2120 __ StoreRegister(result, __ BytecodeOperandReg(3)); |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2637 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2637 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
| 2638 __ SmiTag(new_state)); | 2638 __ SmiTag(new_state)); |
| 2639 __ SetAccumulator(old_state); | 2639 __ SetAccumulator(old_state); |
| 2640 | 2640 |
| 2641 __ Dispatch(); | 2641 __ Dispatch(); |
| 2642 } | 2642 } |
| 2643 | 2643 |
| 2644 } // namespace interpreter | 2644 } // namespace interpreter |
| 2645 } // namespace internal | 2645 } // namespace internal |
| 2646 } // namespace v8 | 2646 } // namespace v8 |
| OLD | NEW |