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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 2509843002: Assert !NativeCallInstr::link_lazily() on ia32 (Closed)
Patch Set: Created 4 years, 1 month 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_ia32.cc ('k') | no next file » | 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 c90b2c52d8fd2e0f4dbb60b6c3854b37104c1130..c3f905ded2b672a51a4838c9bd1bc7ffa6f95576 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -845,20 +845,17 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ movl(EDX, Immediate(argc_tag));
const StubEntry* stub_entry;
- if (link_lazily()) {
- stub_entry = StubCode::CallBootstrapCFunction_entry();
- __ movl(ECX, Immediate(NativeEntry::LinkNativeCallEntry()));
- compiler->GeneratePatchableCall(token_pos(), *stub_entry,
- RawPcDescriptors::kOther, locs());
- } else {
- stub_entry = (is_bootstrap_native())
- ? StubCode::CallBootstrapCFunction_entry()
- : StubCode::CallNativeCFunction_entry();
- const ExternalLabel label(reinterpret_cast<uword>(native_c_function()));
- __ movl(ECX, Immediate(label.address()));
- compiler->GenerateCall(token_pos(), *stub_entry, RawPcDescriptors::kOther,
- locs());
- }
+
+ // There is no lazy-linking support on ia32.
+ ASSERT(!link_lazily());
kustermann 2016/11/16 21:03:12 This property is guaranteed in flow_graph_compiler
Florian Schneider 2016/11/16 21:08:28 We have a test that runs with this flag on all pla
kustermann 2016/11/16 21:12:13 But the code emitted will simply not work, because
Florian Schneider 2016/11/16 21:25:02 Oh ok. Right. Then it's fine to add the assertion
+ stub_entry = (is_bootstrap_native())
+ ? StubCode::CallBootstrapCFunction_entry()
+ : StubCode::CallNativeCFunction_entry();
+ const ExternalLabel label(reinterpret_cast<uword>(native_c_function()));
+ __ movl(ECX, Immediate(label.address()));
+ compiler->GenerateCall(token_pos(), *stub_entry, RawPcDescriptors::kOther,
+ locs());
+
__ popl(result);
}
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698