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

Unified Diff: runtime/vm/runtime_entry_x64.cc

Issue 1315893004: Load runtime entries from the Thread instead of the ObjectPool. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
Index: runtime/vm/runtime_entry_x64.cc
diff --git a/runtime/vm/runtime_entry_x64.cc b/runtime/vm/runtime_entry_x64.cc
index a6ff6359720afc29de6328385d3c5950eeb2e76a..c3afdd8dbdd733ea3b6ff0660a2c1dce583a33b1 100644
--- a/runtime/vm/runtime_entry_x64.cc
+++ b/runtime/vm/runtime_entry_x64.cc
@@ -15,6 +15,11 @@ namespace dart {
#define __ assembler->
+uword RuntimeEntry::GetEntryPoint() const {
+ return reinterpret_cast<uword>(function());
+}
+
+
// Generate code to call into the stub which will call the runtime
// function. Input for the stub is as follows:
// RSP : points to the arguments and return value array.
@@ -23,15 +28,13 @@ namespace dart {
void RuntimeEntry::Call(Assembler* assembler, intptr_t argument_count) const {
if (is_leaf()) {
ASSERT(argument_count == this->argument_count());
- ExternalLabel label(GetEntryPoint());
COMPILE_ASSERT(CallingConventions::kVolatileCpuRegisters & (1 << RAX));
- __ LoadExternalLabel(RAX, &label, kNotPatchable);
+ __ movq(RAX, Address(THR, Thread::OffsetFromThread(this)));
__ CallCFunction(RAX);
} else {
// Argument count is not checked here, but in the runtime entry for a more
// informative error message.
- ExternalLabel label(GetEntryPoint());
- __ LoadExternalLabel(RBX, &label, kNotPatchable);
+ __ movq(RBX, Address(THR, Thread::OffsetFromThread(this)));
__ movq(R10, Immediate(argument_count));
__ Call(*StubCode::CallToRuntime_entry());
}

Powered by Google App Engine
This is Rietveld 408576698