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

Side by Side Diff: src/compiler/bytecode-graph-builder.cc

Issue 1922523002: [Interpreter] Use FastCloneShallowObjectStub in CreateObjectLiteral bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add todo Created 4 years, 7 months 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/code-stubs.cc ('k') | src/compiler/code-assembler.h » ('j') | 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/compiler/bytecode-graph-builder.h" 5 #include "src/compiler/bytecode-graph-builder.h"
6 6
7 #include "src/compiler/bytecode-branch-analysis.h" 7 #include "src/compiler/bytecode-branch-analysis.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/operator-properties.h" 9 #include "src/compiler/operator-properties.h"
10 #include "src/interpreter/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 int number_of_elements = constant_elements->length(); 875 int number_of_elements = constant_elements->length();
876 const Operator* op = javascript()->CreateLiteralArray( 876 const Operator* op = javascript()->CreateLiteralArray(
877 constant_elements, literal_flags, literal_index, number_of_elements); 877 constant_elements, literal_flags, literal_index, number_of_elements);
878 BuildCreateLiteral(op); 878 BuildCreateLiteral(op);
879 } 879 }
880 880
881 void BytecodeGraphBuilder::VisitCreateObjectLiteral() { 881 void BytecodeGraphBuilder::VisitCreateObjectLiteral() {
882 Handle<FixedArray> constant_properties = Handle<FixedArray>::cast( 882 Handle<FixedArray> constant_properties = Handle<FixedArray>::cast(
883 bytecode_iterator().GetConstantForIndexOperand(0)); 883 bytecode_iterator().GetConstantForIndexOperand(0));
884 int literal_index = bytecode_iterator().GetIndexOperand(1); 884 int literal_index = bytecode_iterator().GetIndexOperand(1);
885 int literal_flags = bytecode_iterator().GetFlagOperand(2); 885 int bytecode_flags = bytecode_iterator().GetFlagOperand(2);
886 int literal_flags =
887 interpreter::CreateObjectLiteralFlags::FlagsBits::decode(bytecode_flags);
886 // TODO(mstarzinger): Thread through number of properties. 888 // TODO(mstarzinger): Thread through number of properties.
887 int number_of_properties = constant_properties->length() / 2; 889 int number_of_properties = constant_properties->length() / 2;
888 const Operator* op = javascript()->CreateLiteralObject( 890 const Operator* op = javascript()->CreateLiteralObject(
889 constant_properties, literal_flags, literal_index, number_of_properties); 891 constant_properties, literal_flags, literal_index, number_of_properties);
890 BuildCreateLiteral(op); 892 BuildCreateLiteral(op);
891 } 893 }
892 894
893 Node* BytecodeGraphBuilder::ProcessCallArguments(const Operator* call_op, 895 Node* BytecodeGraphBuilder::ProcessCallArguments(const Operator* call_op,
894 Node* callee, 896 Node* callee,
895 interpreter::Register receiver, 897 interpreter::Register receiver,
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 // Phi does not exist yet, introduce one. 1654 // Phi does not exist yet, introduce one.
1653 value = NewPhi(inputs, value, control); 1655 value = NewPhi(inputs, value, control);
1654 value->ReplaceInput(inputs - 1, other); 1656 value->ReplaceInput(inputs - 1, other);
1655 } 1657 }
1656 return value; 1658 return value;
1657 } 1659 }
1658 1660
1659 } // namespace compiler 1661 } // namespace compiler
1660 } // namespace internal 1662 } // namespace internal
1661 } // namespace v8 1663 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler/code-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698