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

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

Issue 2903993002: Remember deopt-id -> context-level mappings in var descriptors. (Closed)
Patch Set: update descriptor tests Created 3 years, 6 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.h ('k') | runtime/vm/flow_graph_compiler_arm64.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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
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 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 *StubCode::CallStaticFunction_entry(), 1345 *StubCode::CallStaticFunction_entry(),
1346 RawPcDescriptors::kOther, locs, function); 1346 RawPcDescriptors::kOther, locs, function);
1347 __ Drop(argument_count); 1347 __ Drop(argument_count);
1348 } 1348 }
1349 1349
1350 1350
1351 Condition FlowGraphCompiler::EmitEqualityRegConstCompare( 1351 Condition FlowGraphCompiler::EmitEqualityRegConstCompare(
1352 Register reg, 1352 Register reg,
1353 const Object& obj, 1353 const Object& obj,
1354 bool needs_number_check, 1354 bool needs_number_check,
1355 TokenPosition token_pos) { 1355 TokenPosition token_pos,
1356 intptr_t deopt_id) {
1356 if (needs_number_check) { 1357 if (needs_number_check) {
1357 ASSERT(!obj.IsMint() && !obj.IsDouble() && !obj.IsBigint()); 1358 ASSERT(!obj.IsMint() && !obj.IsDouble() && !obj.IsBigint());
1358 __ Push(reg); 1359 __ Push(reg);
1359 __ PushObject(obj); 1360 __ PushObject(obj);
1360 if (is_optimizing()) { 1361 if (is_optimizing()) {
1361 __ BranchLinkPatchable( 1362 __ BranchLinkPatchable(
1362 *StubCode::OptimizedIdenticalWithNumberCheck_entry()); 1363 *StubCode::OptimizedIdenticalWithNumberCheck_entry());
1363 } else { 1364 } else {
1364 __ BranchLinkPatchable( 1365 __ BranchLinkPatchable(
1365 *StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); 1366 *StubCode::UnoptimizedIdenticalWithNumberCheck_entry());
1366 } 1367 }
1367 if (token_pos.IsReal()) { 1368 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, deopt_id, token_pos);
1368 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, Thread::kNoDeoptId,
1369 token_pos);
1370 }
1371 // Stub returns result in flags (result of a cmp, we need Z computed). 1369 // Stub returns result in flags (result of a cmp, we need Z computed).
1372 __ Drop(1); // Discard constant. 1370 __ Drop(1); // Discard constant.
1373 __ Pop(reg); // Restore 'reg'. 1371 __ Pop(reg); // Restore 'reg'.
1374 } else { 1372 } else {
1375 __ CompareObject(reg, obj); 1373 __ CompareObject(reg, obj);
1376 } 1374 }
1377 return EQ; 1375 return EQ;
1378 } 1376 }
1379 1377
1380 1378
1381 Condition FlowGraphCompiler::EmitEqualityRegRegCompare( 1379 Condition FlowGraphCompiler::EmitEqualityRegRegCompare(Register left,
1382 Register left, 1380 Register right,
1383 Register right, 1381 bool needs_number_check,
1384 bool needs_number_check, 1382 TokenPosition token_pos,
1385 TokenPosition token_pos) { 1383 intptr_t deopt_id) {
1386 if (needs_number_check) { 1384 if (needs_number_check) {
1387 __ Push(left); 1385 __ Push(left);
1388 __ Push(right); 1386 __ Push(right);
1389 if (is_optimizing()) { 1387 if (is_optimizing()) {
1390 __ BranchLinkPatchable( 1388 __ BranchLinkPatchable(
1391 *StubCode::OptimizedIdenticalWithNumberCheck_entry()); 1389 *StubCode::OptimizedIdenticalWithNumberCheck_entry());
1392 } else { 1390 } else {
1393 __ BranchLinkPatchable( 1391 __ BranchLinkPatchable(
1394 *StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); 1392 *StubCode::UnoptimizedIdenticalWithNumberCheck_entry());
1395 } 1393 }
1396 if (token_pos.IsReal()) { 1394 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, deopt_id, token_pos);
1397 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, Thread::kNoDeoptId,
1398 token_pos);
1399 }
1400 // Stub returns result in flags (result of a cmp, we need Z computed). 1395 // Stub returns result in flags (result of a cmp, we need Z computed).
1401 __ Pop(right); 1396 __ Pop(right);
1402 __ Pop(left); 1397 __ Pop(left);
1403 } else { 1398 } else {
1404 __ cmp(left, Operand(right)); 1399 __ cmp(left, Operand(right));
1405 } 1400 }
1406 return EQ; 1401 return EQ;
1407 } 1402 }
1408 1403
1409 1404
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1827 DRegister dreg = EvenDRegisterOf(reg); 1822 DRegister dreg = EvenDRegisterOf(reg);
1828 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1823 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1829 } 1824 }
1830 1825
1831 1826
1832 #undef __ 1827 #undef __
1833 1828
1834 } // namespace dart 1829 } // namespace dart
1835 1830
1836 #endif // defined TARGET_ARCH_ARM 1831 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698