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

Side by Side Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 1564493002: Make Scanner::kNoSourcePos be a true sentinel value (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/object.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 // - RDX: instantiator type arguments or raw_null. 670 // - RDX: instantiator type arguments or raw_null.
671 // Returns: 671 // Returns:
672 // - object in RAX for successful assignable check (or throws TypeError). 672 // - object in RAX for successful assignable check (or throws TypeError).
673 // Performance notes: positive checks must be quick, negative checks can be slow 673 // Performance notes: positive checks must be quick, negative checks can be slow
674 // as they throw an exception. 674 // as they throw an exception.
675 void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos, 675 void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
676 intptr_t deopt_id, 676 intptr_t deopt_id,
677 const AbstractType& dst_type, 677 const AbstractType& dst_type,
678 const String& dst_name, 678 const String& dst_name,
679 LocationSummary* locs) { 679 LocationSummary* locs) {
680 ASSERT(token_pos >= 0); 680 ASSERT(Scanner::ValidSourcePosition(token_pos));
681 ASSERT(!dst_type.IsNull()); 681 ASSERT(!dst_type.IsNull());
682 ASSERT(dst_type.IsFinalized()); 682 ASSERT(dst_type.IsFinalized());
683 // Assignable check is skipped in FlowGraphBuilder, not here. 683 // Assignable check is skipped in FlowGraphBuilder, not here.
684 ASSERT(dst_type.IsMalformedOrMalbounded() || 684 ASSERT(dst_type.IsMalformedOrMalbounded() ||
685 (!dst_type.IsDynamicType() && !dst_type.IsObjectType())); 685 (!dst_type.IsDynamicType() && !dst_type.IsObjectType()));
686 __ pushq(RDX); // Store instantiator type arguments. 686 __ pushq(RDX); // Store instantiator type arguments.
687 // A null object is always assignable and is returned as result. 687 // A null object is always assignable and is returned as result.
688 Label is_assignable, runtime_call; 688 Label is_assignable, runtime_call;
689 __ CompareObject(RAX, Object::null_object()); 689 __ CompareObject(RAX, Object::null_object());
690 __ j(EQUAL, &is_assignable); 690 __ j(EQUAL, &is_assignable);
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 __ movups(reg, Address(RSP, 0)); 1811 __ movups(reg, Address(RSP, 0));
1812 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); 1812 __ AddImmediate(RSP, Immediate(kFpuRegisterSize));
1813 } 1813 }
1814 1814
1815 1815
1816 #undef __ 1816 #undef __
1817 1817
1818 } // namespace dart 1818 } // namespace dart
1819 1819
1820 #endif // defined TARGET_ARCH_X64 1820 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698