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

Side by Side Diff: src/crankshaft/hydrogen.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/crankshaft/hydrogen.h ('k') | src/crankshaft/hydrogen-instructions.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #include "src/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast/ast-numbering.h" 10 #include "src/ast/ast-numbering.h"
(...skipping 12336 matching lines...) Expand 10 before | Expand all | Expand 10 after
12347 if_fast_packed.Or(); 12347 if_fast_packed.Or();
12348 if_fast_packed.If<HCompareNumericAndBranch>( 12348 if_fast_packed.If<HCompareNumericAndBranch>(
12349 elements_kind, Add<HConstant>(FAST_DOUBLE_ELEMENTS), Token::EQ); 12349 elements_kind, Add<HConstant>(FAST_DOUBLE_ELEMENTS), Token::EQ);
12350 if_fast_packed.JoinContinuation(&continuation); 12350 if_fast_packed.JoinContinuation(&continuation);
12351 } 12351 }
12352 if_not_smi.JoinContinuation(&continuation); 12352 if_not_smi.JoinContinuation(&continuation);
12353 return ast_context()->ReturnContinuation(&continuation, call->id()); 12353 return ast_context()->ReturnContinuation(&continuation, call->id());
12354 } 12354 }
12355 12355
12356 12356
12357 // Support for construct call checks.
12358 void HOptimizedGraphBuilder::GenerateIsConstructCall(CallRuntime* call) {
12359 DCHECK(call->arguments()->length() == 0);
12360 if (function_state()->outer() != NULL) {
12361 // We are generating graph for inlined function.
12362 HValue* value = function_state()->inlining_kind() == CONSTRUCT_CALL_RETURN
12363 ? graph()->GetConstantTrue()
12364 : graph()->GetConstantFalse();
12365 return ast_context()->ReturnValue(value);
12366 } else {
12367 return ast_context()->ReturnControl(New<HIsConstructCallAndBranch>(),
12368 call->id());
12369 }
12370 }
12371
12372
12373 // Support for arguments.length and arguments[?]. 12357 // Support for arguments.length and arguments[?].
12374 void HOptimizedGraphBuilder::GenerateArgumentsLength(CallRuntime* call) { 12358 void HOptimizedGraphBuilder::GenerateArgumentsLength(CallRuntime* call) {
12375 DCHECK(call->arguments()->length() == 0); 12359 DCHECK(call->arguments()->length() == 0);
12376 HInstruction* result = NULL; 12360 HInstruction* result = NULL;
12377 if (function_state()->outer() == NULL) { 12361 if (function_state()->outer() == NULL) {
12378 HInstruction* elements = Add<HArgumentsElements>(false); 12362 HInstruction* elements = Add<HArgumentsElements>(false);
12379 result = New<HArgumentsLength>(elements); 12363 result = New<HArgumentsLength>(elements);
12380 } else { 12364 } else {
12381 // Number of arguments without receiver. 12365 // Number of arguments without receiver.
12382 int argument_count = environment()-> 12366 int argument_count = environment()->
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
13627 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13611 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13628 } 13612 }
13629 13613
13630 #ifdef DEBUG 13614 #ifdef DEBUG
13631 graph_->Verify(false); // No full verify. 13615 graph_->Verify(false); // No full verify.
13632 #endif 13616 #endif
13633 } 13617 }
13634 13618
13635 } // namespace internal 13619 } // namespace internal
13636 } // namespace v8 13620 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/crankshaft/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698