Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index c0b1bb90d5d4cbedcf61b8326f6f902af6d2534a..734a1ba4347cf0b8c2ae46d20a800ca4eb5b4303 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -7,6 +7,7 @@ |
#include "src/compiler.h" |
#include "src/compiler/interpreter-assembler.h" |
#include "src/factory.h" |
+#include "src/interpreter/bytecode-emitter.h" |
#include "src/interpreter/bytecodes.h" |
#include "src/zone.h" |
@@ -46,7 +47,11 @@ void Interpreter::Initialize(Isolate* isolate, bool create_heap_objects) { |
// static |
bool Interpreter::MakeBytecode(CompilationInfo* info) { |
- // TODO(rmcilroy): Generate bytecodes... |
+ Handle<SharedFunctionInfo> shared_info = |
+ Compiler::GetSharedFunctionInfo(info->function(), info->script(), info); |
+ BytecodeEmitter emitter(info->isolate(), info->zone()); |
+ Handle<BytecodeArray> bytecodes = emitter.Emit(info->function()); |
+ shared_info->set_bytecode_array(*bytecodes); |
info->SetCode(info->isolate()->builtins()->InterpreterEntryTrampoline()); |
info->EnsureFeedbackVector(); |
return true; |