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

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

Issue 1568353002: Don't test directly against Scanner::kNoSourcePos instead use >= 0. (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_arm64.cc ('k') | runtime/vm/flow_graph_compiler_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 (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 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1362 } 1362 }
1363 1363
1364 if (needs_number_check) { 1364 if (needs_number_check) {
1365 __ pushl(reg); 1365 __ pushl(reg);
1366 __ PushObject(obj); 1366 __ PushObject(obj);
1367 if (is_optimizing()) { 1367 if (is_optimizing()) {
1368 __ Call(*StubCode::OptimizedIdenticalWithNumberCheck_entry()); 1368 __ Call(*StubCode::OptimizedIdenticalWithNumberCheck_entry());
1369 } else { 1369 } else {
1370 __ Call(*StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); 1370 __ Call(*StubCode::UnoptimizedIdenticalWithNumberCheck_entry());
1371 } 1371 }
1372 if (token_pos != Scanner::kNoSourcePos) { 1372 if (token_pos >= 0) {
1373 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, 1373 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
1374 Thread::kNoDeoptId, 1374 Thread::kNoDeoptId,
1375 token_pos); 1375 token_pos);
1376 } 1376 }
1377 // Stub returns result in flags (result of a cmpl, we need ZF computed). 1377 // Stub returns result in flags (result of a cmpl, we need ZF computed).
1378 __ popl(reg); // Discard constant. 1378 __ popl(reg); // Discard constant.
1379 __ popl(reg); // Restore 'reg'. 1379 __ popl(reg); // Restore 'reg'.
1380 } else { 1380 } else {
1381 __ CompareObject(reg, obj); 1381 __ CompareObject(reg, obj);
1382 } 1382 }
1383 return EQUAL; 1383 return EQUAL;
1384 } 1384 }
1385 1385
1386 1386
1387 Condition FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, 1387 Condition FlowGraphCompiler::EmitEqualityRegRegCompare(Register left,
1388 Register right, 1388 Register right,
1389 bool needs_number_check, 1389 bool needs_number_check,
1390 intptr_t token_pos) { 1390 intptr_t token_pos) {
1391 if (needs_number_check) { 1391 if (needs_number_check) {
1392 __ pushl(left); 1392 __ pushl(left);
1393 __ pushl(right); 1393 __ pushl(right);
1394 if (is_optimizing()) { 1394 if (is_optimizing()) {
1395 __ Call(*StubCode::OptimizedIdenticalWithNumberCheck_entry()); 1395 __ Call(*StubCode::OptimizedIdenticalWithNumberCheck_entry());
1396 } else { 1396 } else {
1397 __ Call(*StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); 1397 __ Call(*StubCode::UnoptimizedIdenticalWithNumberCheck_entry());
1398 } 1398 }
1399 if (token_pos != Scanner::kNoSourcePos) { 1399 if (token_pos >= 0) {
1400 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, 1400 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
1401 Thread::kNoDeoptId, 1401 Thread::kNoDeoptId,
1402 token_pos); 1402 token_pos);
1403 } 1403 }
1404 // Stub returns result in flags (result of a cmpl, we need ZF computed). 1404 // Stub returns result in flags (result of a cmpl, we need ZF computed).
1405 __ popl(right); 1405 __ popl(right);
1406 __ popl(left); 1406 __ popl(left);
1407 } else { 1407 } else {
1408 __ cmpl(left, right); 1408 __ cmpl(left, right);
1409 } 1409 }
(...skipping 429 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
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698