#include "src/v8.h"
+#include "src/code-factory.h"
#include "src/codegen.h"
#include "src/compiler.h"
#include "src/debug.h"
#include "src/scopeinfo.h"
#include "src/scopes.h"
#include "src/snapshot.h"
-#include "src/stub-cache.h"
namespace v8 {
namespace internal {
VariableDeclaration* decl) {
}
+
void BreakableStatementChecker::VisitFunctionDeclaration(
FunctionDeclaration* decl) {
}
+
void BreakableStatementChecker::VisitModuleDeclaration(
ModuleDeclaration* decl) {
}
+
void BreakableStatementChecker::VisitImportDeclaration(
ImportDeclaration* decl) {
}
+
void BreakableStatementChecker::VisitExportDeclaration(
ExportDeclaration* decl) {
}
}
+void BreakableStatementChecker::VisitClassLiteral(ClassLiteral* expr) {
+ if (expr->extends() != NULL) {
+ Visit(expr->extends());
+ }
+}
+
+
void BreakableStatementChecker::VisitNativeFunctionLiteral(
NativeFunctionLiteral* expr) {
}
}
+void BreakableStatementChecker::VisitSuperReference(SuperReference* expr) {}
+
+
#define __ ACCESS_MASM(masm())
bool FullCodeGenerator::MakeCode(CompilationInfo* info) {
void FullCodeGenerator::CallLoadIC(ContextualMode contextual_mode,
TypeFeedbackId id) {
- ExtraICState extra_state = LoadIC::ComputeExtraICState(contextual_mode);
- Handle<Code> ic = LoadIC::initialize_stub(isolate(), extra_state);
+ Handle<Code> ic = CodeFactory::LoadIC(isolate(), contextual_mode).code();
CallIC(ic, id);
}
void FullCodeGenerator::CallStoreIC(TypeFeedbackId id) {
- Handle<Code> ic = StoreIC::initialize_stub(isolate(), strict_mode());
+ Handle<Code> ic = CodeFactory::StoreIC(isolate(), strict_mode()).code();
CallIC(ic, id);
}
}
+void FullCodeGenerator::VisitSuperReference(SuperReference* super) {
+ __ CallRuntime(Runtime::kThrowUnsupportedSuperError, 0);
+}
+
+
void FullCodeGenerator::SetExpressionPosition(Expression* expr) {
if (!info_->is_debug()) {
CodeGenerator::RecordPositions(masm_, expr->position());
static_cast<int>(id) - static_cast<int>(Runtime::kFirstInlineFunction);
DCHECK(lookup_index >= 0);
DCHECK(static_cast<size_t>(lookup_index) <
- ARRAY_SIZE(kInlineFunctionGenerators));
+ arraysize(kInlineFunctionGenerators));
return kInlineFunctionGenerators[lookup_index];
}
__ DebugBreak();
// Ignore the return value.
+
+ PrepareForBailoutForId(stmt->DebugBreakId(), NO_REGISTERS);
}
}
+void FullCodeGenerator::VisitClassLiteral(ClassLiteral* expr) {
+ // TODO(arv): Implement
+ Comment cmnt(masm_, "[ ClassLiteral");
+ if (expr->extends() != NULL) {
+ VisitForEffect(expr->extends());
+ }
+ context()->Plug(isolate()->factory()->undefined_value());
+}
+
+
void FullCodeGenerator::VisitNativeFunctionLiteral(
NativeFunctionLiteral* expr) {
Comment cmnt(masm_, "[ NativeFunctionLiteral");
const int literals = fun->NumberOfLiterals();
Handle<Code> code = Handle<Code>(fun->shared()->code());
Handle<Code> construct_stub = Handle<Code>(fun->shared()->construct_stub());
- bool is_generator = false;
- bool is_arrow = false;
Handle<SharedFunctionInfo> shared =
isolate()->factory()->NewSharedFunctionInfo(
- name, literals, is_generator, is_arrow, code,
+ name, literals, FunctionKind::kNormalFunction, code,
Handle<ScopeInfo>(fun->shared()->scope_info()),
- Handle<FixedArray>(fun->shared()->feedback_vector()));
+ Handle<TypeFeedbackVector>(fun->shared()->feedback_vector()));
shared->set_construct_stub(*construct_stub);
// Copy the function data to the shared function info.