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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.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/x64/full-codegen-x64.cc ('k') | src/runtime/runtime.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 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_X87 5 #if V8_TARGET_ARCH_X87
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 3135 matching lines...) Expand 10 before | Expand all | Expand 10 after
3146 __ CmpInstanceType(map, FIRST_JS_PROXY_TYPE); 3146 __ CmpInstanceType(map, FIRST_JS_PROXY_TYPE);
3147 __ j(less, if_false); 3147 __ j(less, if_false);
3148 __ CmpInstanceType(map, LAST_JS_PROXY_TYPE); 3148 __ CmpInstanceType(map, LAST_JS_PROXY_TYPE);
3149 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3149 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3150 Split(less_equal, if_true, if_false, fall_through); 3150 Split(less_equal, if_true, if_false, fall_through);
3151 3151
3152 context()->Plug(if_true, if_false); 3152 context()->Plug(if_true, if_false);
3153 } 3153 }
3154 3154
3155 3155
3156 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) {
3157 DCHECK(expr->arguments()->length() == 0);
3158
3159 Label materialize_true, materialize_false;
3160 Label* if_true = NULL;
3161 Label* if_false = NULL;
3162 Label* fall_through = NULL;
3163 context()->PrepareTest(&materialize_true, &materialize_false,
3164 &if_true, &if_false, &fall_through);
3165
3166 // Get the frame pointer for the calling frame.
3167 __ mov(eax, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
3168
3169 // Skip the arguments adaptor frame if it exists.
3170 Label check_frame_marker;
3171 __ cmp(Operand(eax, StandardFrameConstants::kContextOffset),
3172 Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
3173 __ j(not_equal, &check_frame_marker);
3174 __ mov(eax, Operand(eax, StandardFrameConstants::kCallerFPOffset));
3175
3176 // Check the marker in the calling frame.
3177 __ bind(&check_frame_marker);
3178 __ cmp(Operand(eax, StandardFrameConstants::kMarkerOffset),
3179 Immediate(Smi::FromInt(StackFrame::CONSTRUCT)));
3180 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3181 Split(equal, if_true, if_false, fall_through);
3182
3183 context()->Plug(if_true, if_false);
3184 }
3185
3186
3187 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { 3156 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) {
3188 ZoneList<Expression*>* args = expr->arguments(); 3157 ZoneList<Expression*>* args = expr->arguments();
3189 DCHECK(args->length() == 2); 3158 DCHECK(args->length() == 2);
3190 3159
3191 // Load the two objects into registers and perform the comparison. 3160 // Load the two objects into registers and perform the comparison.
3192 VisitForStackValue(args->at(0)); 3161 VisitForStackValue(args->at(0));
3193 VisitForAccumulatorValue(args->at(1)); 3162 VisitForAccumulatorValue(args->at(1));
3194 3163
3195 Label materialize_true, materialize_false; 3164 Label materialize_true, materialize_false;
3196 Label* if_true = NULL; 3165 Label* if_true = NULL;
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
4864 Assembler::target_address_at(call_target_address, 4833 Assembler::target_address_at(call_target_address,
4865 unoptimized_code)); 4834 unoptimized_code));
4866 return OSR_AFTER_STACK_CHECK; 4835 return OSR_AFTER_STACK_CHECK;
4867 } 4836 }
4868 4837
4869 4838
4870 } // namespace internal 4839 } // namespace internal
4871 } // namespace v8 4840 } // namespace v8
4872 4841
4873 #endif // V8_TARGET_ARCH_X87 4842 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698