// Copyright 2013 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/compiler/code-generator.h" #include "src/address-map.h" #include "src/compiler/code-generator-impl.h" #include "src/compiler/linkage.h" #include "src/compiler/pipeline.h" #include "src/frames-inl.h" namespace v8 { namespace internal { namespace compiler { class CodeGenerator::JumpTable final : public ZoneObject { public: JumpTable(JumpTable* next, Label** targets, size_t target_count) : next_(next), targets_(targets), target_count_(target_count) {} Label* label() { return &label_; } JumpTable* next() const { return next_; } Label** targets() const { return targets_; } size_t target_count() const { return target_count_; } private: Label label_; JumpTable* const next_; Label** const targets_; size_t const target_count_; }; CodeGenerator::CodeGenerator(Frame* frame, Linkage* linkage, InstructionSequence* code, CompilationInfo* info) : frame_access_state_(new (code->zone()) FrameAccessState(frame)), linkage_(linkage), code_(code), info_(info), labels_(zone()->NewArray