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

Side by Side Diff: runtime/vm/flow_graph_compiler_x64.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_mips.cc ('k') | runtime/vm/parser.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 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 } 1403 }
1404 1404
1405 if (needs_number_check) { 1405 if (needs_number_check) {
1406 __ pushq(reg); 1406 __ pushq(reg);
1407 __ PushObject(obj); 1407 __ PushObject(obj);
1408 if (is_optimizing()) { 1408 if (is_optimizing()) {
1409 __ CallPatchable(*StubCode::OptimizedIdenticalWithNumberCheck_entry()); 1409 __ CallPatchable(*StubCode::OptimizedIdenticalWithNumberCheck_entry());
1410 } else { 1410 } else {
1411 __ CallPatchable(*StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); 1411 __ CallPatchable(*StubCode::UnoptimizedIdenticalWithNumberCheck_entry());
1412 } 1412 }
1413 if (token_pos != Scanner::kNoSourcePos) { 1413 if (token_pos >= 0) {
1414 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, 1414 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
1415 Thread::kNoDeoptId, 1415 Thread::kNoDeoptId,
1416 token_pos); 1416 token_pos);
1417 } 1417 }
1418 // Stub returns result in flags (result of a cmpq, we need ZF computed). 1418 // Stub returns result in flags (result of a cmpq, we need ZF computed).
1419 __ popq(reg); // Discard constant. 1419 __ popq(reg); // Discard constant.
1420 __ popq(reg); // Restore 'reg'. 1420 __ popq(reg); // Restore 'reg'.
1421 } else { 1421 } else {
1422 __ CompareObject(reg, obj); 1422 __ CompareObject(reg, obj);
1423 } 1423 }
1424 return EQUAL; 1424 return EQUAL;
1425 } 1425 }
1426 1426
1427 1427
1428 Condition FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, 1428 Condition FlowGraphCompiler::EmitEqualityRegRegCompare(Register left,
1429 Register right, 1429 Register right,
1430 bool needs_number_check, 1430 bool needs_number_check,
1431 intptr_t token_pos) { 1431 intptr_t token_pos) {
1432 if (needs_number_check) { 1432 if (needs_number_check) {
1433 __ pushq(left); 1433 __ pushq(left);
1434 __ pushq(right); 1434 __ pushq(right);
1435 if (is_optimizing()) { 1435 if (is_optimizing()) {
1436 __ CallPatchable(*StubCode::OptimizedIdenticalWithNumberCheck_entry()); 1436 __ CallPatchable(*StubCode::OptimizedIdenticalWithNumberCheck_entry());
1437 } else { 1437 } else {
1438 __ CallPatchable(*StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); 1438 __ CallPatchable(*StubCode::UnoptimizedIdenticalWithNumberCheck_entry());
1439 } 1439 }
1440 if (token_pos != Scanner::kNoSourcePos) { 1440 if (token_pos >= 0) {
1441 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, 1441 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
1442 Thread::kNoDeoptId, 1442 Thread::kNoDeoptId,
1443 token_pos); 1443 token_pos);
1444 } 1444 }
1445 // Stub returns result in flags (result of a cmpq, we need ZF computed). 1445 // Stub returns result in flags (result of a cmpq, we need ZF computed).
1446 __ popq(right); 1446 __ popq(right);
1447 __ popq(left); 1447 __ popq(left);
1448 } else { 1448 } else {
1449 __ cmpl(left, right); 1449 __ cmpl(left, right);
1450 } 1450 }
(...skipping 360 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/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698