Index: src/builtins/builtins-call-gen.cc |
diff --git a/src/builtins/builtins-call.cc b/src/builtins/builtins-call-gen.cc |
similarity index 57% |
copy from src/builtins/builtins-call.cc |
copy to src/builtins/builtins-call-gen.cc |
index 40ef3f04302ce0af8b856bf8249acc7b4801652b..88fa2321c75d032837756ed6cbbb0161e4b5616e 100644 |
--- a/src/builtins/builtins-call.cc |
+++ b/src/builtins/builtins-call-gen.cc |
@@ -1,83 +1,15 @@ |
-// Copyright 2016 the V8 project authors. All rights reserved. |
+// Copyright 2017 the V8 project authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "src/builtins/builtins-utils.h" |
#include "src/builtins/builtins.h" |
+#include "src/globals.h" |
#include "src/isolate.h" |
#include "src/macro-assembler.h" |
-#include "src/objects-inl.h" |
namespace v8 { |
namespace internal { |
-Handle<Code> Builtins::CallFunction(ConvertReceiverMode mode, |
- TailCallMode tail_call_mode) { |
- switch (tail_call_mode) { |
- case TailCallMode::kDisallow: |
- switch (mode) { |
- case ConvertReceiverMode::kNullOrUndefined: |
- return CallFunction_ReceiverIsNullOrUndefined(); |
- case ConvertReceiverMode::kNotNullOrUndefined: |
- return CallFunction_ReceiverIsNotNullOrUndefined(); |
- case ConvertReceiverMode::kAny: |
- return CallFunction_ReceiverIsAny(); |
- } |
- break; |
- case TailCallMode::kAllow: |
- switch (mode) { |
- case ConvertReceiverMode::kNullOrUndefined: |
- return TailCallFunction_ReceiverIsNullOrUndefined(); |
- case ConvertReceiverMode::kNotNullOrUndefined: |
- return TailCallFunction_ReceiverIsNotNullOrUndefined(); |
- case ConvertReceiverMode::kAny: |
- return TailCallFunction_ReceiverIsAny(); |
- } |
- break; |
- } |
- UNREACHABLE(); |
- return Handle<Code>::null(); |
-} |
- |
-Handle<Code> Builtins::Call(ConvertReceiverMode mode, |
- TailCallMode tail_call_mode) { |
- switch (tail_call_mode) { |
- case TailCallMode::kDisallow: |
- switch (mode) { |
- case ConvertReceiverMode::kNullOrUndefined: |
- return Call_ReceiverIsNullOrUndefined(); |
- case ConvertReceiverMode::kNotNullOrUndefined: |
- return Call_ReceiverIsNotNullOrUndefined(); |
- case ConvertReceiverMode::kAny: |
- return Call_ReceiverIsAny(); |
- } |
- break; |
- case TailCallMode::kAllow: |
- switch (mode) { |
- case ConvertReceiverMode::kNullOrUndefined: |
- return TailCall_ReceiverIsNullOrUndefined(); |
- case ConvertReceiverMode::kNotNullOrUndefined: |
- return TailCall_ReceiverIsNotNullOrUndefined(); |
- case ConvertReceiverMode::kAny: |
- return TailCall_ReceiverIsAny(); |
- } |
- break; |
- } |
- UNREACHABLE(); |
- return Handle<Code>::null(); |
-} |
- |
-Handle<Code> Builtins::CallBoundFunction(TailCallMode tail_call_mode) { |
- switch (tail_call_mode) { |
- case TailCallMode::kDisallow: |
- return CallBoundFunction(); |
- case TailCallMode::kAllow: |
- return TailCallBoundFunction(); |
- } |
- UNREACHABLE(); |
- return Handle<Code>::null(); |
-} |
- |
void Builtins::Generate_CallFunction_ReceiverIsNullOrUndefined( |
MacroAssembler* masm) { |
Generate_CallFunction(masm, ConvertReceiverMode::kNullOrUndefined, |