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

Side by Side Diff: src/interpreter/bytecode-generator.cc

Issue 1688283003: [Interpreter] Implements calls through CallICStub in the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
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/bytecode-generator.h" 5 #include "src/interpreter/bytecode-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/interpreter/bytecode-register-allocator.h" 9 #include "src/interpreter/bytecode-register-allocator.h"
10 #include "src/interpreter/control-flow-builders.h" 10 #include "src/interpreter/control-flow-builders.h"
(...skipping 2267 matching lines...) Expand 10 before | Expand all | Expand 10 after
2278 Smi::FromInt(execution_context()->scope()->start_position())) 2278 Smi::FromInt(execution_context()->scope()->start_position()))
2279 .StoreAccumulatorInRegister(position); 2279 .StoreAccumulatorInRegister(position);
2280 2280
2281 // Call ResolvePossiblyDirectEval and modify the callee. 2281 // Call ResolvePossiblyDirectEval and modify the callee.
2282 builder() 2282 builder()
2283 ->CallRuntime(Runtime::kResolvePossiblyDirectEval, callee_for_eval, 5) 2283 ->CallRuntime(Runtime::kResolvePossiblyDirectEval, callee_for_eval, 5)
2284 .StoreAccumulatorInRegister(callee); 2284 .StoreAccumulatorInRegister(callee);
2285 } 2285 }
2286 2286
2287 builder()->SetExpressionPosition(expr); 2287 builder()->SetExpressionPosition(expr);
2288 builder()->Call(callee, receiver, 1 + args->length(), 2288 if (call_type == Call::POSSIBLY_EVAL_CALL ||
2289 feedback_index(expr->CallFeedbackICSlot())); 2289 call_type == Call::LOOKUP_SLOT_CALL) {
rmcilroy 2016/02/12 14:21:03 Would this be the same if you did: if (expr->CallF
mythria 2016/02/17 11:02:48 Done. Yes, indeed. I missed it but Lookup_slot_cal
2290 builder()->Call(callee, receiver, 1 + args->length());
2291 } else {
2292 builder()->CallIC(callee, receiver, 1 + args->length(),
2293 feedback_index(expr->CallFeedbackICSlot()));
2294 }
2290 execution_result()->SetResultInAccumulator(); 2295 execution_result()->SetResultInAccumulator();
2291 } 2296 }
2292 2297
2293 2298
2294 void BytecodeGenerator::VisitCallNew(CallNew* expr) { 2299 void BytecodeGenerator::VisitCallNew(CallNew* expr) {
2295 Register constructor = register_allocator()->NewRegister(); 2300 Register constructor = register_allocator()->NewRegister();
2296 VisitForAccumulatorValue(expr->expression()); 2301 VisitForAccumulatorValue(expr->expression());
2297 builder()->StoreAccumulatorInRegister(constructor); 2302 builder()->StoreAccumulatorInRegister(constructor);
2298 2303
2299 ZoneList<Expression*>* args = expr->arguments(); 2304 ZoneList<Expression*>* args = expr->arguments();
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
2891 } 2896 }
2892 2897
2893 2898
2894 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 2899 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
2895 return info()->feedback_vector()->GetIndex(slot); 2900 return info()->feedback_vector()->GetIndex(slot);
2896 } 2901 }
2897 2902
2898 } // namespace interpreter 2903 } // namespace interpreter
2899 } // namespace internal 2904 } // namespace internal
2900 } // namespace v8 2905 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698