Index: src/x64/code-stubs-x64.cc |
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
index 3958cf0324422dc60090ad818c5e44a94f225fbe..2fecc1e44c9180b88bb4039b3c5b5196123878af 100644 |
--- a/src/x64/code-stubs-x64.cc |
+++ b/src/x64/code-stubs-x64.cc |
@@ -136,6 +136,31 @@ void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( |
#define __ ACCESS_MASM(masm) |
+ |
+void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { |
+ // Update the static counter each time a new code stub is generated. |
+ Isolate* isolate = masm->isolate(); |
+ isolate->counters()->code_stubs()->Increment(); |
+ |
+ CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); |
+ int param_count = descriptor->register_param_count_; |
+ { |
+ // Call the runtime system in a fresh internal frame. |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ ASSERT(descriptor->register_param_count_ == 0 || |
+ rax.is(descriptor->register_params_[param_count - 1])); |
+ // Push arguments |
+ for (int i = 0; i < param_count; ++i) { |
+ __ push(descriptor->register_params_[i]); |
+ } |
+ ExternalReference miss = descriptor->miss_handler_; |
+ __ CallExternalReference(miss, descriptor->register_param_count_); |
+ } |
+ |
+ __ Ret(); |
+} |
+ |
+ |
void ToNumberStub::Generate(MacroAssembler* masm) { |
// The ToNumber stub takes one argument in eax. |
Label check_heap_number, call_builtin; |