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

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

Issue 2423323002: [builtins] Remove the unused AllocationSite slot from ConstructFrame. (Closed)
Patch Set: Created 4 years, 2 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/mips64/builtins-mips64.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/x64/builtins-x64.cc
diff --git a/src/builtins/x64/builtins-x64.cc b/src/builtins/x64/builtins-x64.cc
index 6469614b6b083e13a34ef670b9c7183fc613a79d..ed8300598a88fd7dc3210fd0874d13f80738e04c 100644
--- a/src/builtins/x64/builtins-x64.cc
+++ b/src/builtins/x64/builtins-x64.cc
@@ -112,15 +112,15 @@ void Builtins::Generate_InOptimizationQueue(MacroAssembler* masm) {
GenerateTailCallToSharedCode(masm);
}
-static void Generate_JSConstructStubHelper(MacroAssembler* masm,
- bool is_api_function,
- bool create_implicit_receiver,
- bool check_derived_construct) {
+namespace {
+
+void Generate_JSConstructStubHelper(MacroAssembler* masm, bool is_api_function,
+ bool create_implicit_receiver,
+ bool check_derived_construct) {
// ----------- S t a t e -------------
// -- rax: number of arguments
// -- rsi: context
// -- rdi: constructor function
- // -- rbx: allocation site or undefined
// -- rdx: new target
// -----------------------------------
@@ -129,10 +129,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
FrameScope scope(masm, StackFrame::CONSTRUCT);
// Preserve the incoming parameters on the stack.
- __ AssertUndefinedOrAllocationSite(rbx);
- __ Push(rsi);
- __ Push(rbx);
__ Integer32ToSmi(rcx, rax);
+ __ Push(rsi);
__ Push(rcx);
if (create_implicit_receiver) {
@@ -197,13 +195,13 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// on page 74.
Label use_receiver, exit;
// If the result is a smi, it is *not* an object in the ECMA sense.
- __ JumpIfSmi(rax, &use_receiver);
+ __ JumpIfSmi(rax, &use_receiver, Label::kNear);
// If the type of the result (stored in its map) is less than
// FIRST_JS_RECEIVER_TYPE, it is not an object in the ECMA sense.
STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
__ CmpObjectType(rax, FIRST_JS_RECEIVER_TYPE, rcx);
- __ j(above_equal, &exit);
+ __ j(above_equal, &exit, Label::kNear);
// Throw away the result of the constructor invocation and use the
// on-stack receiver as the result.
@@ -246,6 +244,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ ret(0);
}
+} // namespace
+
void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
Generate_JSConstructStubHelper(masm, false, true, false);
}
« no previous file with comments | « src/builtins/mips64/builtins-mips64.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698