Chromium Code Reviews| Index: src/compiler/interpreter-assembler.cc |
| diff --git a/src/compiler/interpreter-assembler.cc b/src/compiler/interpreter-assembler.cc |
| index 6203245fb50b3f1e8f38b799cc27a796f57ce158..d8266974a28220eddcf6da997716068286bcb4b5 100644 |
| --- a/src/compiler/interpreter-assembler.cc |
| +++ b/src/compiler/interpreter-assembler.cc |
| @@ -14,6 +14,7 @@ |
| #include "src/compiler/raw-machine-assembler.h" |
| #include "src/compiler/schedule.h" |
| #include "src/frames.h" |
| +#include "src/interface-descriptors.h" |
| #include "src/interpreter/bytecodes.h" |
| #include "src/macro-assembler.h" |
| #include "src/zone.h" |
| @@ -223,6 +224,35 @@ Node* InterpreterAssembler::LoadContextSlot(int slot_index) { |
| } |
| +Node* InterpreterAssembler::LoadTypeFeedbackVector() { |
| + Node* function = raw_assembler_->Load( |
| + kMachAnyTagged, RegisterFileRawPointer(), |
| + IntPtrConstant(InterpreterFrameConstants::kFunctionFromRegisterPointer)); |
| + Node* shared_info = |
| + LoadObjectField(function, JSFunction::kSharedFunctionInfoOffset); |
| + Node* vector = |
| + LoadObjectField(shared_info, SharedFunctionInfo::kFeedbackVectorOffset); |
| + return vector; |
| +} |
| + |
| + |
| +Node* InterpreterAssembler::CallIC(CallInterfaceDescriptor descriptor, |
|
mvstanton
2015/09/01 14:28:29
If the number of arguments are going to be fixed I
rmcilroy
2015/09/01 15:53:36
My plan was to have overloads for the number of pa
mvstanton
2015/09/01 16:54:13
Okay I can live with that :).
|
| + Node* target, Node* arg1, Node* arg2, |
| + Node* arg3, Node* arg4) { |
| + CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( |
| + isolate(), zone(), descriptor, 0, CallDescriptor::kNoFlags); |
| + |
| + Node** args = zone()->NewArray<Node*>(5); |
| + args[0] = arg1; |
| + args[1] = arg2; |
| + args[2] = arg3; |
| + args[3] = arg4; |
| + args[4] = ContextTaggedPointer(); |
| + |
| + return raw_assembler_->CallN(call_descriptor, target, args); |
| +} |
| + |
| + |
| Node* InterpreterAssembler::CallJSBuiltin(int context_index, Node* receiver, |
| Node** js_args, int js_arg_count) { |
| Node* global_object = LoadContextSlot(Context::GLOBAL_OBJECT_INDEX); |