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

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

Issue 2190293003: [Interpreter] Collect type feedback for 'new' in the bytecode handler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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
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 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 } 1305 }
1306 1306
1307 void Interpreter::DoCallConstruct(InterpreterAssembler* assembler) { 1307 void Interpreter::DoCallConstruct(InterpreterAssembler* assembler) {
1308 Callable ic = CodeFactory::InterpreterPushArgsAndConstruct(isolate_); 1308 Callable ic = CodeFactory::InterpreterPushArgsAndConstruct(isolate_);
1309 Node* new_target = __ GetAccumulator(); 1309 Node* new_target = __ GetAccumulator();
1310 Node* constructor_reg = __ BytecodeOperandReg(0); 1310 Node* constructor_reg = __ BytecodeOperandReg(0);
1311 Node* constructor = __ LoadRegister(constructor_reg); 1311 Node* constructor = __ LoadRegister(constructor_reg);
1312 Node* first_arg_reg = __ BytecodeOperandReg(1); 1312 Node* first_arg_reg = __ BytecodeOperandReg(1);
1313 Node* first_arg = __ RegisterLocation(first_arg_reg); 1313 Node* first_arg = __ RegisterLocation(first_arg_reg);
1314 Node* args_count = __ BytecodeOperandCount(2); 1314 Node* args_count = __ BytecodeOperandCount(2);
1315 Node* slot_id = __ BytecodeOperandIdx(3);
1316 Node* type_feedback_vector = __ LoadTypeFeedbackVector();
1315 Node* context = __ GetContext(); 1317 Node* context = __ GetContext();
1316 Node* result = 1318 Node* result = __ CallConstruct(constructor, context, new_target, first_arg,
1317 __ CallConstruct(constructor, context, new_target, first_arg, args_count); 1319 args_count, slot_id, type_feedback_vector);
1318 __ SetAccumulator(result); 1320 __ SetAccumulator(result);
1319 __ Dispatch(); 1321 __ Dispatch();
1320 } 1322 }
1321 1323
1322 // New <constructor> <first_arg> <arg_count> 1324 // New <constructor> <first_arg> <arg_count>
1323 // 1325 //
1324 // Call operator new with |constructor| and the first argument in 1326 // Call operator new with |constructor| and the first argument in
1325 // register |first_arg| and |arg_count| arguments in subsequent 1327 // register |first_arg| and |arg_count| arguments in subsequent
1326 // registers. The new.target is in the accumulator. 1328 // registers. The new.target is in the accumulator.
1327 // 1329 //
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
2174 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2176 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2175 __ SmiTag(new_state)); 2177 __ SmiTag(new_state));
2176 __ SetAccumulator(old_state); 2178 __ SetAccumulator(old_state);
2177 2179
2178 __ Dispatch(); 2180 __ Dispatch();
2179 } 2181 }
2180 2182
2181 } // namespace interpreter 2183 } // namespace interpreter
2182 } // namespace internal 2184 } // namespace internal
2183 } // namespace v8 2185 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698