Index: src/ia32/macro-assembler-ia32.h |
diff --git a/src/ia32/macro-assembler-ia32.h b/src/ia32/macro-assembler-ia32.h |
index 47214ea03cddbca9077af10e1ecb72bf0111be15..e6a17417d832e41f65167a178e438ca954b40404 100644 |
--- a/src/ia32/macro-assembler-ia32.h |
+++ b/src/ia32/macro-assembler-ia32.h |
@@ -240,6 +240,14 @@ class MacroAssembler: public Assembler { |
void LoadHeapObject(Register result, Handle<HeapObject> object); |
void PushHeapObject(Handle<HeapObject> object); |
+ void LoadObject(Register result, Handle<Object> object) { |
+ if (object->IsHeapObject()) { |
+ LoadHeapObject(result, Handle<HeapObject>::cast(object)); |
+ } else { |
+ Set(result, Immediate(object)); |
+ } |
+ } |
+ |
// --------------------------------------------------------------------------- |
// JavaScript invokes |