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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 1479233002: Deprecate the %IsConstructCall intrinsic completely. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_js-use-new-target-3
Patch Set: Rebased. Created 5 years 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/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 3127 matching lines...) Expand 10 before | Expand all | Expand 10 after
3138 __ CmpInstanceType(map, FIRST_JS_PROXY_TYPE); 3138 __ CmpInstanceType(map, FIRST_JS_PROXY_TYPE);
3139 __ j(less, if_false); 3139 __ j(less, if_false);
3140 __ CmpInstanceType(map, LAST_JS_PROXY_TYPE); 3140 __ CmpInstanceType(map, LAST_JS_PROXY_TYPE);
3141 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3141 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3142 Split(less_equal, if_true, if_false, fall_through); 3142 Split(less_equal, if_true, if_false, fall_through);
3143 3143
3144 context()->Plug(if_true, if_false); 3144 context()->Plug(if_true, if_false);
3145 } 3145 }
3146 3146
3147 3147
3148 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) {
3149 DCHECK(expr->arguments()->length() == 0);
3150
3151 Label materialize_true, materialize_false;
3152 Label* if_true = NULL;
3153 Label* if_false = NULL;
3154 Label* fall_through = NULL;
3155 context()->PrepareTest(&materialize_true, &materialize_false,
3156 &if_true, &if_false, &fall_through);
3157
3158 // Get the frame pointer for the calling frame.
3159 __ movp(rax, Operand(rbp, StandardFrameConstants::kCallerFPOffset));
3160
3161 // Skip the arguments adaptor frame if it exists.
3162 Label check_frame_marker;
3163 __ Cmp(Operand(rax, StandardFrameConstants::kContextOffset),
3164 Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
3165 __ j(not_equal, &check_frame_marker);
3166 __ movp(rax, Operand(rax, StandardFrameConstants::kCallerFPOffset));
3167
3168 // Check the marker in the calling frame.
3169 __ bind(&check_frame_marker);
3170 __ Cmp(Operand(rax, StandardFrameConstants::kMarkerOffset),
3171 Smi::FromInt(StackFrame::CONSTRUCT));
3172 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3173 Split(equal, if_true, if_false, fall_through);
3174
3175 context()->Plug(if_true, if_false);
3176 }
3177
3178
3179 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { 3148 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) {
3180 ZoneList<Expression*>* args = expr->arguments(); 3149 ZoneList<Expression*>* args = expr->arguments();
3181 DCHECK(args->length() == 2); 3150 DCHECK(args->length() == 2);
3182 3151
3183 // Load the two objects into registers and perform the comparison. 3152 // Load the two objects into registers and perform the comparison.
3184 VisitForStackValue(args->at(0)); 3153 VisitForStackValue(args->at(0));
3185 VisitForAccumulatorValue(args->at(1)); 3154 VisitForAccumulatorValue(args->at(1));
3186 3155
3187 Label materialize_true, materialize_false; 3156 Label materialize_true, materialize_false;
3188 Label* if_true = NULL; 3157 Label* if_true = NULL;
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
4879 Assembler::target_address_at(call_target_address, 4848 Assembler::target_address_at(call_target_address,
4880 unoptimized_code)); 4849 unoptimized_code));
4881 return OSR_AFTER_STACK_CHECK; 4850 return OSR_AFTER_STACK_CHECK;
4882 } 4851 }
4883 4852
4884 4853
4885 } // namespace internal 4854 } // namespace internal
4886 } // namespace v8 4855 } // namespace v8
4887 4856
4888 #endif // V8_TARGET_ARCH_X64 4857 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698