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

Side by Side Diff: src/full-codegen/ia32/full-codegen-ia32.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/full-codegen.h ('k') | src/full-codegen/mips/full-codegen-mips.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_IA32 5 #if V8_TARGET_ARCH_IA32
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 3143 matching lines...) Expand 10 before | Expand all | Expand 10 after
3154 __ CmpInstanceType(map, FIRST_JS_PROXY_TYPE); 3154 __ CmpInstanceType(map, FIRST_JS_PROXY_TYPE);
3155 __ j(less, if_false); 3155 __ j(less, if_false);
3156 __ CmpInstanceType(map, LAST_JS_PROXY_TYPE); 3156 __ CmpInstanceType(map, LAST_JS_PROXY_TYPE);
3157 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3157 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3158 Split(less_equal, if_true, if_false, fall_through); 3158 Split(less_equal, if_true, if_false, fall_through);
3159 3159
3160 context()->Plug(if_true, if_false); 3160 context()->Plug(if_true, if_false);
3161 } 3161 }
3162 3162
3163 3163
3164 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) {
3165 DCHECK(expr->arguments()->length() == 0);
3166
3167 Label materialize_true, materialize_false;
3168 Label* if_true = NULL;
3169 Label* if_false = NULL;
3170 Label* fall_through = NULL;
3171 context()->PrepareTest(&materialize_true, &materialize_false,
3172 &if_true, &if_false, &fall_through);
3173
3174 // Get the frame pointer for the calling frame.
3175 __ mov(eax, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
3176
3177 // Skip the arguments adaptor frame if it exists.
3178 Label check_frame_marker;
3179 __ cmp(Operand(eax, StandardFrameConstants::kContextOffset),
3180 Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
3181 __ j(not_equal, &check_frame_marker);
3182 __ mov(eax, Operand(eax, StandardFrameConstants::kCallerFPOffset));
3183
3184 // Check the marker in the calling frame.
3185 __ bind(&check_frame_marker);
3186 __ cmp(Operand(eax, StandardFrameConstants::kMarkerOffset),
3187 Immediate(Smi::FromInt(StackFrame::CONSTRUCT)));
3188 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3189 Split(equal, if_true, if_false, fall_through);
3190
3191 context()->Plug(if_true, if_false);
3192 }
3193
3194
3195 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { 3164 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) {
3196 ZoneList<Expression*>* args = expr->arguments(); 3165 ZoneList<Expression*>* args = expr->arguments();
3197 DCHECK(args->length() == 2); 3166 DCHECK(args->length() == 2);
3198 3167
3199 // Load the two objects into registers and perform the comparison. 3168 // Load the two objects into registers and perform the comparison.
3200 VisitForStackValue(args->at(0)); 3169 VisitForStackValue(args->at(0));
3201 VisitForAccumulatorValue(args->at(1)); 3170 VisitForAccumulatorValue(args->at(1));
3202 3171
3203 Label materialize_true, materialize_false; 3172 Label materialize_true, materialize_false;
3204 Label* if_true = NULL; 3173 Label* if_true = NULL;
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
4872 Assembler::target_address_at(call_target_address, 4841 Assembler::target_address_at(call_target_address,
4873 unoptimized_code)); 4842 unoptimized_code));
4874 return OSR_AFTER_STACK_CHECK; 4843 return OSR_AFTER_STACK_CHECK;
4875 } 4844 }
4876 4845
4877 4846
4878 } // namespace internal 4847 } // namespace internal
4879 } // namespace v8 4848 } // namespace v8
4880 4849
4881 #endif // V8_TARGET_ARCH_IA32 4850 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.h ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698