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

Side by Side Diff: src/code-factory.cc

Issue 1609893003: [es6] Tail calls support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 4 years, 11 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-factory.h ('k') | src/code-stubs.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/code-factory.h" 5 #include "src/code-factory.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 isolate, initialization_state, state); 52 isolate, initialization_state, state);
53 if (initialization_state != MEGAMORPHIC) { 53 if (initialization_state != MEGAMORPHIC) {
54 return Callable(code, LoadWithVectorDescriptor(isolate)); 54 return Callable(code, LoadWithVectorDescriptor(isolate));
55 } 55 }
56 return Callable(code, LoadDescriptor(isolate)); 56 return Callable(code, LoadDescriptor(isolate));
57 } 57 }
58 58
59 59
60 // static 60 // static
61 Callable CodeFactory::CallIC(Isolate* isolate, int argc, 61 Callable CodeFactory::CallIC(Isolate* isolate, int argc,
62 ConvertReceiverMode mode) { 62 ConvertReceiverMode mode,
63 return Callable(CallIC::initialize_stub(isolate, argc, mode), 63 TailCallMode tail_call_mode) {
64 return Callable(CallIC::initialize_stub(isolate, argc, mode, tail_call_mode),
64 CallFunctionWithFeedbackDescriptor(isolate)); 65 CallFunctionWithFeedbackDescriptor(isolate));
65 } 66 }
66 67
67 68
68 // static 69 // static
69 Callable CodeFactory::CallICInOptimizedCode(Isolate* isolate, int argc, 70 Callable CodeFactory::CallICInOptimizedCode(Isolate* isolate, int argc,
70 ConvertReceiverMode mode) { 71 ConvertReceiverMode mode,
71 return Callable( 72 TailCallMode tail_call_mode) {
72 CallIC::initialize_stub_in_optimized_code(isolate, argc, mode), 73 return Callable(CallIC::initialize_stub_in_optimized_code(isolate, argc, mode,
73 CallFunctionWithFeedbackAndVectorDescriptor(isolate)); 74 tail_call_mode),
75 CallFunctionWithFeedbackAndVectorDescriptor(isolate));
74 } 76 }
75 77
76 78
77 // static 79 // static
78 Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) { 80 Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) {
79 return Callable( 81 return Callable(
80 StoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED), 82 StoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED),
81 VectorStoreICTrampolineDescriptor(isolate)); 83 VectorStoreICTrampolineDescriptor(isolate));
82 } 84 }
83 85
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 // static 370 // static
369 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { 371 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) {
370 // Note: If we ever use fpregs in the interpreter then we will need to 372 // Note: If we ever use fpregs in the interpreter then we will need to
371 // save fpregs too. 373 // save fpregs too.
372 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); 374 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister);
373 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); 375 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate));
374 } 376 }
375 377
376 } // namespace internal 378 } // namespace internal
377 } // namespace v8 379 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-factory.h ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698