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

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

Issue 2659603003: Adapt use-site to new BoilerplateDescription. (Closed)
Patch Set: One more use-site. Created 3 years, 10 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/ast/ast.h ('k') | src/compiler/js-operator.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/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/compilation-info.h" 9 #include "src/compilation-info.h"
10 #include "src/compiler/compiler-source-position-table.h" 10 #include "src/compiler/compiler-source-position-table.h"
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 int number_of_elements = constant_elements->constant_values()->length(); 1206 int number_of_elements = constant_elements->constant_values()->length();
1207 Node* literal = NewNode( 1207 Node* literal = NewNode(
1208 javascript()->CreateLiteralArray(constant_elements, literal_flags, 1208 javascript()->CreateLiteralArray(constant_elements, literal_flags,
1209 literal_index, number_of_elements), 1209 literal_index, number_of_elements),
1210 GetFunctionClosure()); 1210 GetFunctionClosure());
1211 environment()->BindAccumulator(literal, Environment::kAttachFrameState); 1211 environment()->BindAccumulator(literal, Environment::kAttachFrameState);
1212 } 1212 }
1213 1213
1214 void BytecodeGraphBuilder::VisitCreateObjectLiteral() { 1214 void BytecodeGraphBuilder::VisitCreateObjectLiteral() {
1215 PrepareEagerCheckpoint(); 1215 PrepareEagerCheckpoint();
1216 Handle<FixedArray> constant_properties = Handle<FixedArray>::cast( 1216 Handle<BoilerplateDescription> constant_properties =
1217 bytecode_iterator().GetConstantForIndexOperand(0)); 1217 Handle<BoilerplateDescription>::cast(
1218 bytecode_iterator().GetConstantForIndexOperand(0));
1218 int literal_index = bytecode_iterator().GetIndexOperand(1); 1219 int literal_index = bytecode_iterator().GetIndexOperand(1);
1219 int bytecode_flags = bytecode_iterator().GetFlagOperand(2); 1220 int bytecode_flags = bytecode_iterator().GetFlagOperand(2);
1220 int literal_flags = 1221 int literal_flags =
1221 interpreter::CreateObjectLiteralFlags::FlagsBits::decode(bytecode_flags); 1222 interpreter::CreateObjectLiteralFlags::FlagsBits::decode(bytecode_flags);
1222 // TODO(mstarzinger): Thread through number of properties. The below number is 1223 // TODO(mstarzinger): Thread through number of properties. The below number is
1223 // only an estimate and does not match {ObjectLiteral::properties_count}. 1224 // only an estimate and does not match {ObjectLiteral::properties_count}.
1224 int number_of_properties = constant_properties->length() / 2; 1225 int number_of_properties = constant_properties->size();
Michael Starzinger 2017/01/27 12:11:31 This is the only note-worthy piece of the change,
1225 Node* literal = NewNode( 1226 Node* literal = NewNode(
1226 javascript()->CreateLiteralObject(constant_properties, literal_flags, 1227 javascript()->CreateLiteralObject(constant_properties, literal_flags,
1227 literal_index, number_of_properties), 1228 literal_index, number_of_properties),
1228 GetFunctionClosure()); 1229 GetFunctionClosure());
1229 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(3), 1230 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(3),
1230 literal, Environment::kAttachFrameState); 1231 literal, Environment::kAttachFrameState);
1231 } 1232 }
1232 1233
1233 Node* BytecodeGraphBuilder::ProcessCallArguments(const Operator* call_op, 1234 Node* BytecodeGraphBuilder::ProcessCallArguments(const Operator* call_op,
1234 Node* callee, 1235 Node* callee,
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
2299 it->source_position().ScriptOffset(), start_position_.InliningId())); 2300 it->source_position().ScriptOffset(), start_position_.InliningId()));
2300 it->Advance(); 2301 it->Advance();
2301 } else { 2302 } else {
2302 DCHECK_GT(it->code_offset(), offset); 2303 DCHECK_GT(it->code_offset(), offset);
2303 } 2304 }
2304 } 2305 }
2305 2306
2306 } // namespace compiler 2307 } // namespace compiler
2307 } // namespace internal 2308 } // namespace internal
2308 } // namespace v8 2309 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698