Upgrade to Pro — share decks privately, control downloads, hide ads and more …

V8のコードベース

 V8のコードベース

V8のC++コードベースについてなど

Transcript

  1. V8 Codebase

  2. Name @brn (ꫬꅿ⨳ⵃ) Occupation ؿٗٝزؒٝسؒٝآص،٥ط؎ذ؍ـؒٝآص، Company Cyberagent ،سذؙأةآؔ AI Messenger

    OSS Contributor of V8 About http://info.b6n.ch
  3. Basic C++ code 倜׋ז؝٦سכC++14ד鷄⸇ׁ׸גְ׷կ 〢ְ؝٦سחC++03ךせ婍כ֮׷׮ךךlambdaהַכ穠圓⢪׻׸ג ְ׷կ 遤侧כ882,616遤֮׷

  4. Build tools GNהְֲًةؽٕسخ٦ٕ׾ⵃ欽׃גְ׷կ 㹋ꥷךؽٕسכninja ؝ٝػ؎ٓכخ٦ٕثؑ٦ٝ׾تؐٝٗ٦سׅ׷״ֲחז׏גְג clang7.0.0׾تؐٝٗ٦س׃גⵃ欽ׅ׷״ֲחז׏גְ׷

  5. Lint ؝ىحز⵸חcpplintָ饥׏גծؿؓ٦وحز麩⿾ך؝٦سכ؝ىح زדֹזְ

  6. Format clang-formatד✲⵸חؿؓ٦وحز׃זְה؝ىحزדֹזְ

  7. Problems -  وָؙٗ㢳ְ٥זַזַ搀蘠 -  ؝٦سك٦أָ㣐ְֹךדIDE禸כ㔿ת׷✲ָ㢳ְ -  ؝٦سك٦أָ㣐ְֹךדؽٕسָ鹼ְ

  8. Complicated Macros وָؙٗ醱꧟ وؙٗדؙٓأ׾㹀纏׃׋׶… Problems

  9. #define IGNITION_HANDLER(Name, BaseAssembler) \! class Name##Assembler : public BaseAssembler {

    \! public: \! explicit Name##Assembler(compiler::CodeAssemblerState* state, \! Bytecode bytecode, OperandScale scale) \! : BaseAssembler(state, bytecode, scale) {} \! static void Generate(compiler::CodeAssemblerState* state, \! OperandScale scale); \! \! private: \! void GenerateImpl(); \! DISALLOW_COPY_AND_ASSIGN(Name##Assembler); \! }; \! void Name##Assembler::Generate(compiler::CodeAssemblerState* state, \! OperandScale scale) { \! Name##Assembler assembler(state, Bytecode::k##Name, scale); \! state->SetInitialDebugInformation(#Name, __FILE__, __LINE__); \! assembler.GenerateImpl(); \! } \! void Name##Assembler::GenerateImpl()!
  10. IGNITION_HANDLER(LdaZero, InterpreterAssembler) {! Node* zero_value = NumberConstant(0.0);! SetAccumulator(zero_value);! Dispatch();! }!

  11. Reusable Enum member وؙٗדenumךًٝغ׾ⱄⵃ欽ׅ׷؛٦أָ㢳ְ Problems

  12. #define BYTECODE_LIST(V) \! /* Extended width operands */ \! V(Wide,

    AccumulatorUse::kNone) \! V(ExtraWide, AccumulatorUse::kNone) \! \! /* Loading the accumulator */ \! V(LdaZero, AccumulatorUse::kWrite) \! V(LdaSmi, AccumulatorUse::kWrite, OperandType::kImm) \! V(LdaUndefined, AccumulatorUse::kWrite) \! V(LdaNull, AccumulatorUse::kWrite) \! V(LdaTheHole, AccumulatorUse::kWrite) \! V(LdaTrue, AccumulatorUse::kWrite) \! .! .! .!
  13. const OperandTypeInfo*! const Bytecodes::kOperandTypeInfos[] = {! #define ENTRY(Name, ...) BytecodeTraits<__VA_ARGS__>::kOperandTypeInfos,!

    BYTECODE_LIST(ENTRY)! #undef ENTRY! };!
  14. switch (bytecode) {! #define CASE(Name, ...) \! case Bytecode::k##Name: \!

    return #Name;! BYTECODE_LIST(CASE)! #undef CASE! }!
  15. IDE Frozen ⬁כEmacsזךדRtagsדְַֽאדׅ(^^) Problems

  16. Slow Build EC2׾㤍秈׃גrsyncד؝٦س㢌刿ָ֮׷׋ןח鷏⥋ׅ׷״ֲח ׃׋ ؽٕسכEC2ךUbuntuדװ׷ Problems

  17. Watch overlookהְֲ،فٔ׾⢪ֲה؝٦س㢌刿׾嗚濼׃גءٕؑ٥؝ وٝس׾㹋遤דֹ׷ v8/src׾湊鋔׃גrsyncׅ׷ Problems