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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 1383573002: VM: More compact code for pushing constant arguments on ia32/x64. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index 62d8bef02cce1a8e1cb43ff90512e15ebc583680..63b6731238f5856574f540c3c726b33a2ff65bf9 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -151,14 +151,16 @@ LocationSummary* ConstantInstr::MakeLocationSummary(Zone* zone,
const intptr_t kNumInputs = 0;
return LocationSummary::Make(zone,
kNumInputs,
- Location::RequiresRegister(),
+ Assembler::IsSafe(value())
+ ? Location::Constant(this)
+ : Location::RequiresRegister(),
LocationSummary::kNoCall);
}
void ConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
// The register allocator drops constant definitions that have no uses.
- if (!locs()->out(0).IsInvalid()) {
+ if (locs()->out(0).IsRegister()) {
Register result = locs()->out(0).reg();
__ LoadObjectSafely(result, value());
}
srdjan 2015/09/30 17:00:20 Maybe: else { ASSERT(locs()->out(0).IsInvalid()
Florian Schneider 2015/10/01 09:16:31 Done.
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698