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

Unified Diff: src/builtins/x87/builtins-x87.cc

Issue 2145023002: [builtins] move builtin files to src/builtins/. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/x87/OWNERS ('k') | src/compiler/code-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/x87/builtins-x87.cc
diff --git a/src/x87/builtins-x87.cc b/src/builtins/x87/builtins-x87.cc
similarity index 99%
rename from src/x87/builtins-x87.cc
rename to src/builtins/x87/builtins-x87.cc
index aca76dbb9ec1148934c6e717cda5cd0ff86f0796..ed7179a4f9e35e2efdd2fd2d92af6a715d655098 100644
--- a/src/x87/builtins-x87.cc
+++ b/src/builtins/x87/builtins-x87.cc
@@ -13,7 +13,6 @@
namespace v8 {
namespace internal {
-
#define __ ACCESS_MASM(masm)
void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id,
@@ -246,38 +245,31 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ ret(0);
}
-
void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
Generate_JSConstructStubHelper(masm, false, true, false);
}
-
void Builtins::Generate_JSConstructStubApi(MacroAssembler* masm) {
Generate_JSConstructStubHelper(masm, true, false, false);
}
-
void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
Generate_JSConstructStubHelper(masm, false, false, false);
}
-
void Builtins::Generate_JSBuiltinsConstructStubForDerived(
MacroAssembler* masm) {
Generate_JSConstructStubHelper(masm, false, false, true);
}
-
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
__ push(edi);
__ CallRuntime(Runtime::kThrowConstructedNonConstructable);
}
-
enum IsTagged { kEaxIsSmiTagged, kEaxIsUntaggedInt };
-
// Clobbers ecx, edx, edi; preserves all other registers.
static void Generate_CheckStackOverflow(MacroAssembler* masm,
IsTagged eax_is_tagged) {
@@ -309,7 +301,6 @@ static void Generate_CheckStackOverflow(MacroAssembler* masm,
__ bind(&okay);
}
-
static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
bool is_construct) {
ProfileEntryHookStub::MaybeCallEntryHook(masm);
@@ -343,7 +334,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
__ jmp(&entry, Label::kNear);
__ bind(&loop);
__ mov(edx, Operand(ebx, ecx, times_4, 0)); // push parameter from argv
- __ push(Operand(edx, 0)); // dereference handle
+ __ push(Operand(edx, 0)); // dereference handle
__ inc(ecx);
__ bind(&entry);
__ cmp(ecx, eax);
@@ -369,12 +360,10 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
__ ret(kPointerSize); // Remove receiver.
}
-
void Builtins::Generate_JSEntryTrampoline(MacroAssembler* masm) {
Generate_JSEntryTrampolineHelper(masm, false);
}
-
void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) {
Generate_JSEntryTrampolineHelper(masm, true);
}
@@ -769,7 +758,6 @@ void Builtins::Generate_InterpreterPushArgsAndCallImpl(
}
}
-
// static
void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) {
// ----------- S t a t e -------------
@@ -1027,7 +1015,6 @@ void Builtins::Generate_CompileOptimized(MacroAssembler* masm) {
Runtime::kCompileOptimized_NotConcurrent);
}
-
void Builtins::Generate_CompileOptimizedConcurrent(MacroAssembler* masm) {
GenerateTailCallToReturnedCode(masm, Runtime::kCompileOptimized_Concurrent);
}
@@ -1098,19 +1085,18 @@ static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) {
__ ret(0);
}
-#define DEFINE_CODE_AGE_BUILTIN_GENERATOR(C) \
-void Builtins::Generate_Make##C##CodeYoungAgainEvenMarking( \
- MacroAssembler* masm) { \
- GenerateMakeCodeYoungAgainCommon(masm); \
-} \
-void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \
- MacroAssembler* masm) { \
- GenerateMakeCodeYoungAgainCommon(masm); \
-}
+#define DEFINE_CODE_AGE_BUILTIN_GENERATOR(C) \
+ void Builtins::Generate_Make##C##CodeYoungAgainEvenMarking( \
+ MacroAssembler* masm) { \
+ GenerateMakeCodeYoungAgainCommon(masm); \
+ } \
+ void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \
+ MacroAssembler* masm) { \
+ GenerateMakeCodeYoungAgainCommon(masm); \
+ }
CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR)
#undef DEFINE_CODE_AGE_BUILTIN_GENERATOR
-
void Builtins::Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm) {
// For now, as in GenerateMakeCodeYoungAgainCommon, we are relying on the fact
// that make_code_young doesn't do any garbage collection which allows us to
@@ -1143,17 +1129,14 @@ void Builtins::Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm) {
__ ret(0);
}
-
void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) {
GenerateMakeCodeYoungAgainCommon(masm);
}
-
void Builtins::Generate_MarkCodeAsToBeExecutedOnce(MacroAssembler* masm) {
Generate_MarkCodeAsExecutedOnce(masm);
}
-
static void Generate_NotifyStubFailureHelper(MacroAssembler* masm,
SaveFPRegsMode save_doubles) {
// Enter an internal frame.
@@ -1173,17 +1156,14 @@ static void Generate_NotifyStubFailureHelper(MacroAssembler* masm,
__ ret(0); // Return to IC Miss stub, continuation still on stack.
}
-
void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) {
Generate_NotifyStubFailureHelper(masm, kDontSaveFPRegs);
}
-
void Builtins::Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm) {
Generate_NotifyStubFailureHelper(masm, kSaveFPRegs);
}
-
static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm,
Deoptimizer::BailoutType type) {
{
@@ -1217,22 +1197,18 @@ static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm,
__ Abort(kNoCasesLeft);
}
-
void Builtins::Generate_NotifyDeoptimized(MacroAssembler* masm) {
Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::EAGER);
}
-
void Builtins::Generate_NotifySoftDeoptimized(MacroAssembler* masm) {
Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::SOFT);
}
-
void Builtins::Generate_NotifyLazyDeoptimized(MacroAssembler* masm) {
Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::LAZY);
}
-
// static
void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm,
int field_index) {
@@ -1365,7 +1341,6 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
}
}
-
// static
void Builtins::Generate_FunctionPrototypeCall(MacroAssembler* masm) {
// Stack Layout:
@@ -1412,7 +1387,6 @@ void Builtins::Generate_FunctionPrototypeCall(MacroAssembler* masm) {
__ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
}
-
void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- eax : argc
@@ -1553,7 +1527,6 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
}
}
-
void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- eax : argc
@@ -1582,7 +1555,6 @@ void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) {
__ TailCallStub(&stub);
}
-
void Builtins::Generate_ArrayCode(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- eax : argc
@@ -1612,7 +1584,6 @@ void Builtins::Generate_ArrayCode(MacroAssembler* masm) {
__ TailCallStub(&stub);
}
-
// static
void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
// ----------- S t a t e -------------
@@ -1791,7 +1762,6 @@ void Builtins::Generate_NumberConstructor(MacroAssembler* masm) {
__ ret(1 * kPointerSize);
}
-
// static
void Builtins::Generate_NumberConstructor_ConstructStub(MacroAssembler* masm) {
// ----------- S t a t e -------------
@@ -1878,7 +1848,6 @@ void Builtins::Generate_NumberConstructor_ConstructStub(MacroAssembler* masm) {
}
}
-
// static
void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
// ----------- S t a t e -------------
@@ -1951,7 +1920,6 @@ void Builtins::Generate_StringConstructor(MacroAssembler* masm) {
}
}
-
// static
void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
// ----------- S t a t e -------------
@@ -2045,7 +2013,6 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
}
}
-
static void ArgumentsAdaptorStackCheck(MacroAssembler* masm,
Label* stack_overflow) {
// ----------- S t a t e -------------
@@ -2072,7 +2039,6 @@ static void ArgumentsAdaptorStackCheck(MacroAssembler* masm,
__ j(less_equal, stack_overflow); // Signed comparison.
}
-
static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) {
__ push(ebp);
__ mov(ebp, esp);
@@ -2091,7 +2057,6 @@ static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) {
__ push(edi);
}
-
static void LeaveArgumentsAdaptorFrame(MacroAssembler* masm) {
// Retrieve the number of arguments from the stack.
__ mov(ebx, Operand(ebp, ArgumentsAdaptorFrameConstants::kLengthOffset));
@@ -2106,7 +2071,6 @@ static void LeaveArgumentsAdaptorFrame(MacroAssembler* masm) {
__ push(ecx);
}
-
// static
void Builtins::Generate_Apply(MacroAssembler* masm) {
// ----------- S t a t e -------------
@@ -2448,7 +2412,6 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
}
}
-
namespace {
void Generate_PushBoundArguments(MacroAssembler* masm) {
@@ -2535,7 +2498,6 @@ void Generate_PushBoundArguments(MacroAssembler* masm) {
} // namespace
-
// static
void Builtins::Generate_CallBoundFunctionImpl(MacroAssembler* masm,
TailCallMode tail_call_mode) {
@@ -2564,7 +2526,6 @@ void Builtins::Generate_CallBoundFunctionImpl(MacroAssembler* masm,
__ jmp(ecx);
}
-
// static
void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode,
TailCallMode tail_call_mode) {
@@ -2627,7 +2588,6 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode,
}
}
-
// static
void Builtins::Generate_ConstructFunction(MacroAssembler* masm) {
// ----------- S t a t e -------------
@@ -2649,7 +2609,6 @@ void Builtins::Generate_ConstructFunction(MacroAssembler* masm) {
__ jmp(ecx);
}
-
// static
void Builtins::Generate_ConstructBoundFunction(MacroAssembler* masm) {
// ----------- S t a t e -------------
@@ -2679,7 +2638,6 @@ void Builtins::Generate_ConstructBoundFunction(MacroAssembler* masm) {
__ jmp(ecx);
}
-
// static
void Builtins::Generate_ConstructProxy(MacroAssembler* masm) {
// ----------- S t a t e -------------
@@ -2701,7 +2659,6 @@ void Builtins::Generate_ConstructProxy(MacroAssembler* masm) {
ExternalReference(Runtime::kJSProxyConstruct, masm->isolate()));
}
-
// static
void Builtins::Generate_Construct(MacroAssembler* masm) {
// ----------- S t a t e -------------
@@ -2965,7 +2922,6 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
}
}
-
static void CompatibleReceiverCheck(MacroAssembler* masm, Register receiver,
Register function_template_info,
Register scratch0, Register scratch1,
@@ -3029,7 +2985,6 @@ static void CompatibleReceiverCheck(MacroAssembler* masm, Register receiver,
__ bind(&receiver_check_passed);
}
-
void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- eax : number of arguments (not including the receiver)
@@ -3073,7 +3028,6 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
}
}
-
void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
// Lookup the function in the JavaScript frame.
__ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
@@ -3097,7 +3051,8 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
// Load the OSR entrypoint offset from the deoptimization data.
__ mov(ebx, Operand(ebx, FixedArray::OffsetOfElementAt(
- DeoptimizationInputData::kOsrPcOffsetIndex) - kHeapObjectTag));
+ DeoptimizationInputData::kOsrPcOffsetIndex) -
+ kHeapObjectTag));
__ SmiUntag(ebx);
// Compute the target address = code_obj + header_size + osr_offset
@@ -3110,7 +3065,6 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
__ ret(0);
}
-
#undef __
} // namespace internal
} // namespace v8
« no previous file with comments | « src/builtins/x87/OWNERS ('k') | src/compiler/code-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698