| 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 | 8 |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1644 STATIC_ASSERT(CreateObjectLiteralFlags::FlagsBits::kShift == 0); | 1644 STATIC_ASSERT(CreateObjectLiteralFlags::FlagsBits::kShift == 0); |
| 1645 Node* flags_raw = __ Word32And( | 1645 Node* flags_raw = __ Word32And( |
| 1646 bytecode_flags, | 1646 bytecode_flags, |
| 1647 __ Int32Constant(CreateObjectLiteralFlags::FlagsBits::kMask)); | 1647 __ Int32Constant(CreateObjectLiteralFlags::FlagsBits::kMask)); |
| 1648 Node* flags = __ SmiTag(flags_raw); | 1648 Node* flags = __ SmiTag(flags_raw); |
| 1649 | 1649 |
| 1650 Node* result = | 1650 Node* result = |
| 1651 __ CallRuntime(Runtime::kCreateObjectLiteral, context, closure, | 1651 __ CallRuntime(Runtime::kCreateObjectLiteral, context, closure, |
| 1652 literal_index, constant_elements, flags); | 1652 literal_index, constant_elements, flags); |
| 1653 __ SetAccumulator(result); | 1653 __ SetAccumulator(result); |
| 1654 // TODO(klaasb) build a single dispatch once the call is inlined |
| 1654 __ Dispatch(); | 1655 __ Dispatch(); |
| 1655 } | 1656 } |
| 1656 } | 1657 } |
| 1657 | 1658 |
| 1658 // CreateClosure <index> <tenured> | 1659 // CreateClosure <index> <tenured> |
| 1659 // | 1660 // |
| 1660 // Creates a new closure for SharedFunctionInfo at position |index| in the | 1661 // Creates a new closure for SharedFunctionInfo at position |index| in the |
| 1661 // constant pool and with the PretenureFlag <tenured>. | 1662 // constant pool and with the PretenureFlag <tenured>. |
| 1662 void Interpreter::DoCreateClosure(InterpreterAssembler* assembler) { | 1663 void Interpreter::DoCreateClosure(InterpreterAssembler* assembler) { |
| 1663 Node* index = __ BytecodeOperandIdx(0); | 1664 Node* index = __ BytecodeOperandIdx(0); |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2024 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2025 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
| 2025 __ SmiTag(new_state)); | 2026 __ SmiTag(new_state)); |
| 2026 __ SetAccumulator(old_state); | 2027 __ SetAccumulator(old_state); |
| 2027 | 2028 |
| 2028 __ Dispatch(); | 2029 __ Dispatch(); |
| 2029 } | 2030 } |
| 2030 | 2031 |
| 2031 } // namespace interpreter | 2032 } // namespace interpreter |
| 2032 } // namespace internal | 2033 } // namespace internal |
| 2033 } // namespace v8 | 2034 } // namespace v8 |
| OLD | NEW |