Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "src/interpreter/bytecode-emitter.h" | |
| 6 | |
| 7 namespace v8 { | |
| 8 namespace internal { | |
| 9 namespace interpreter { | |
| 10 | |
| 11 BytecodeEmitter::BytecodeEmitter(Isolate* isolate, Zone* zone) { | |
| 12 InitializeAstVisitor(isolate, zone); | |
| 13 } | |
| 14 | |
| 15 | |
| 16 BytecodeEmitter::~BytecodeEmitter() {} | |
| 17 | |
| 18 | |
| 19 Handle<BytecodeArray> BytecodeEmitter::Emit(FunctionLiteral* function) { | |
| 20 Visit(function); | |
| 21 DCHECK(bytecodes_.size() > 0); | |
| 22 return isolate_->factory()->NewBytecodeArray( | |
| 23 static_cast<int>(bytecodes_.size()), | |
| 24 reinterpret_cast<byte*>(&bytecodes_.front())); | |
| 25 } | |
| 26 | |
| 27 | |
| 28 void BytecodeEmitter::VisitBlock(Block* node) {} | |
|
rmcilroy
2015/07/15 13:33:38
Could you please add UNIMPLEMENTED(); to each of t
oth
2015/07/16 09:15:50
Done.
| |
| 29 | |
| 30 | |
| 31 void BytecodeEmitter::VisitVariableDeclaration(VariableDeclaration* node) {} | |
| 32 | |
| 33 | |
| 34 void BytecodeEmitter::VisitFunctionDeclaration(FunctionDeclaration* node) {} | |
| 35 | |
| 36 | |
| 37 void BytecodeEmitter::VisitImportDeclaration(ImportDeclaration* node) {} | |
| 38 | |
| 39 | |
| 40 void BytecodeEmitter::VisitExportDeclaration(ExportDeclaration* node) {} | |
| 41 | |
| 42 | |
| 43 void BytecodeEmitter::VisitExpressionStatement(ExpressionStatement* node) {} | |
| 44 | |
| 45 | |
| 46 void BytecodeEmitter::VisitEmptyStatement(EmptyStatement* node) {} | |
| 47 | |
| 48 | |
| 49 void BytecodeEmitter::VisitIfStatement(IfStatement* node) {} | |
| 50 | |
| 51 | |
| 52 void BytecodeEmitter::VisitContinueStatement(ContinueStatement* node) {} | |
| 53 | |
| 54 | |
| 55 void BytecodeEmitter::VisitBreakStatement(BreakStatement* node) {} | |
| 56 | |
| 57 | |
| 58 void BytecodeEmitter::VisitReturnStatement(ReturnStatement* node) {} | |
| 59 | |
| 60 | |
| 61 void BytecodeEmitter::VisitWithStatement(WithStatement* node) {} | |
| 62 | |
| 63 | |
| 64 void BytecodeEmitter::VisitSwitchStatement(SwitchStatement* node) {} | |
| 65 | |
| 66 | |
| 67 void BytecodeEmitter::VisitCaseClause(CaseClause* clause) {} | |
| 68 | |
| 69 | |
| 70 void BytecodeEmitter::VisitDoWhileStatement(DoWhileStatement* node) {} | |
| 71 | |
| 72 | |
| 73 void BytecodeEmitter::VisitWhileStatement(WhileStatement* node) {} | |
| 74 | |
| 75 | |
| 76 void BytecodeEmitter::VisitForStatement(ForStatement* node) {} | |
| 77 | |
| 78 | |
| 79 void BytecodeEmitter::VisitForInStatement(ForInStatement* node) {} | |
| 80 | |
| 81 | |
| 82 void BytecodeEmitter::VisitForOfStatement(ForOfStatement* node) {} | |
| 83 | |
| 84 | |
| 85 void BytecodeEmitter::VisitTryCatchStatement(TryCatchStatement* node) {} | |
| 86 | |
| 87 | |
| 88 void BytecodeEmitter::VisitTryFinallyStatement(TryFinallyStatement* node) {} | |
| 89 | |
| 90 | |
| 91 void BytecodeEmitter::VisitDebuggerStatement(DebuggerStatement* node) {} | |
| 92 | |
| 93 | |
| 94 void BytecodeEmitter::VisitFunctionLiteral(FunctionLiteral* node) {} | |
| 95 | |
| 96 | |
| 97 void BytecodeEmitter::VisitClassLiteral(ClassLiteral* node) {} | |
| 98 | |
| 99 | |
| 100 void BytecodeEmitter::VisitNativeFunctionLiteral(NativeFunctionLiteral* node) {} | |
| 101 | |
| 102 | |
| 103 void BytecodeEmitter::VisitConditional(Conditional* node) {} | |
| 104 | |
| 105 | |
| 106 void BytecodeEmitter::VisitLiteral(Literal* node) {} | |
| 107 | |
| 108 | |
| 109 void BytecodeEmitter::VisitRegExpLiteral(RegExpLiteral* node) {} | |
| 110 | |
| 111 | |
| 112 void BytecodeEmitter::VisitObjectLiteral(ObjectLiteral* node) {} | |
| 113 | |
| 114 | |
| 115 void BytecodeEmitter::VisitArrayLiteral(ArrayLiteral* node) {} | |
| 116 | |
| 117 | |
| 118 void BytecodeEmitter::VisitVariableProxy(VariableProxy* node) {} | |
| 119 | |
| 120 | |
| 121 void BytecodeEmitter::VisitAssignment(Assignment* node) {} | |
| 122 | |
| 123 | |
| 124 void BytecodeEmitter::VisitYield(Yield* node) {} | |
| 125 | |
| 126 | |
| 127 void BytecodeEmitter::VisitThrow(Throw* node) {} | |
| 128 | |
| 129 | |
| 130 void BytecodeEmitter::VisitProperty(Property* node) {} | |
| 131 | |
| 132 | |
| 133 void BytecodeEmitter::VisitCall(Call* node) {} | |
| 134 | |
| 135 | |
| 136 void BytecodeEmitter::VisitCallNew(CallNew* node) {} | |
| 137 | |
| 138 | |
| 139 void BytecodeEmitter::VisitCallRuntime(CallRuntime* node) {} | |
| 140 | |
| 141 | |
| 142 void BytecodeEmitter::VisitUnaryOperation(UnaryOperation* node) {} | |
| 143 | |
| 144 | |
| 145 void BytecodeEmitter::VisitCountOperation(CountOperation* node) {} | |
| 146 | |
| 147 | |
| 148 void BytecodeEmitter::VisitBinaryOperation(BinaryOperation* node) {} | |
| 149 | |
| 150 | |
| 151 void BytecodeEmitter::VisitCompareOperation(CompareOperation* node) {} | |
| 152 | |
| 153 | |
| 154 void BytecodeEmitter::VisitSpread(Spread* node) {} | |
| 155 | |
| 156 | |
| 157 void BytecodeEmitter::VisitThisFunction(ThisFunction* node) {} | |
| 158 | |
| 159 | |
| 160 void BytecodeEmitter::VisitSuperCallReference(SuperCallReference* node) {} | |
| 161 | |
| 162 | |
| 163 void BytecodeEmitter::VisitSuperPropertyReference( | |
| 164 SuperPropertyReference* node) {} | |
| 165 | |
| 166 | |
| 167 } // namespace interpreter | |
| 168 } // namespace internal | |
| 169 } // namespace v8 | |
| OLD | NEW |