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

Side by Side Diff: runtime/vm/flow_graph_compiler_ia32.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
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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 // - EDX: instantiator type arguments or raw_null. 678 // - EDX: instantiator type arguments or raw_null.
679 // Returns: 679 // Returns:
680 // - object in EAX for successful assignable check (or throws TypeError). 680 // - object in EAX for successful assignable check (or throws TypeError).
681 // Performance notes: positive checks must be quick, negative checks can be slow 681 // Performance notes: positive checks must be quick, negative checks can be slow
682 // as they throw an exception. 682 // as they throw an exception.
683 void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos, 683 void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
684 intptr_t deopt_id, 684 intptr_t deopt_id,
685 const AbstractType& dst_type, 685 const AbstractType& dst_type,
686 const String& dst_name, 686 const String& dst_name,
687 LocationSummary* locs) { 687 LocationSummary* locs) {
688 ASSERT(token_pos >= 0); 688 ASSERT(Scanner::ValidSourcePosition(token_pos));
689 ASSERT(!dst_type.IsNull()); 689 ASSERT(!dst_type.IsNull());
690 ASSERT(dst_type.IsFinalized()); 690 ASSERT(dst_type.IsFinalized());
691 // Assignable check is skipped in FlowGraphBuilder, not here. 691 // Assignable check is skipped in FlowGraphBuilder, not here.
692 ASSERT(dst_type.IsMalformedOrMalbounded() || 692 ASSERT(dst_type.IsMalformedOrMalbounded() ||
693 (!dst_type.IsDynamicType() && !dst_type.IsObjectType())); 693 (!dst_type.IsDynamicType() && !dst_type.IsObjectType()));
694 __ pushl(EDX); // Store instantiator type arguments. 694 __ pushl(EDX); // Store instantiator type arguments.
695 // A null object is always assignable and is returned as result. 695 // A null object is always assignable and is returned as result.
696 const Immediate& raw_null = 696 const Immediate& raw_null =
697 Immediate(reinterpret_cast<intptr_t>(Object::null())); 697 Immediate(reinterpret_cast<intptr_t>(Object::null()));
698 Label is_assignable, runtime_call; 698 Label is_assignable, runtime_call;
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1839 __ movups(reg, Address(ESP, 0)); 1839 __ movups(reg, Address(ESP, 0));
1840 __ addl(ESP, Immediate(kFpuRegisterSize)); 1840 __ addl(ESP, Immediate(kFpuRegisterSize));
1841 } 1841 }
1842 1842
1843 1843
1844 #undef __ 1844 #undef __
1845 1845
1846 } // namespace dart 1846 } // namespace dart
1847 1847
1848 #endif // defined TARGET_ARCH_IA32 1848 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698