Skip to content
Snippets Groups Projects

kind: Compile time

Merged Rohit Goswami requested to merge HaoZeke/lfortran:refactorKind into master
1 unresolved thread

Closes #325 (closed).

Edited by Rohit Goswami

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
802 802 case 1: // Single argument intrinsics
803 if (var_name=="kind") {
804 int64_t kind_num = 4; // Default
805 ASR::expr_t* kind_expr = args[0];
806 ASR::expr_t* symbolic_value = kind_expr; // == 0.d0 for kind(0.d0)
807 ASR::ttype_t* kind_type = LFortran::ASRUtils::expr_type(kind_expr);
808 // TODO: Check that the expression reduces to a valid constant expression (10.1.12)
809 switch( kind_expr->type ) {
810 case ASR::exprType::ConstantInteger: {
811 // When this is a constant value, directly assign it to the numeric
812 kind_num = ASR::down_cast<ASR::ConstantInteger_t>(kind_expr)->m_n;
813 if (kind_num <= 4) {
814 kind_num = 4;
815 } else {
816 kind_num = 8;
817 }
  • Rohit Goswami added 1 commit

    added 1 commit

    • cc259424 - kind: Start skeleton [skip ci]

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    • 7514712e - kind: Start skeleton [skip ci]

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    • 2a4ffd20 - kind: Start skeleton [skip ci]

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    • 719f8f3b - kind: Start skeleton [skip ci]

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    • da4f33b2 - kind: Start skeleton [skip ci]

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    • 89843767 - kind: Start skeleton [skip ci]

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    • 6bd228cd - kind: Test body visitor [skip ci]

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    • 1d84e3db - kind: Test body visitor [skip ci]

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    • 81492a0c - kind: Test body visitor [skip ci]

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    • 6df8f0e1 - kind: Test body visitor [skip ci]

    Compare with previous version

  • Rohit Goswami added 2 commits

    added 2 commits

    • a79d46a3 - kind: Start skeleton [skip ci]
    • 515d305e - tests: Add kind [skip ci]

    Compare with previous version

  • Rohit Goswami added 12 commits

    added 12 commits

    Compare with previous version

  • Ping me once this is ready for review.

  • Rohit Goswami added 1 commit

    added 1 commit

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    • fe0d3706 - kind: Clean and rework to mimic real [skip ci]

    Compare with previous version

  • Rohit Goswami added 9 commits

    added 9 commits

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    • 76945be4 - cmake: Run gfortran for kind [skip ci]

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    • 82826a7c - kind: Use extract_kind for variables

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    • b4130e99 - tests: Try all cases [skip ci]

    Compare with previous version

  • Rohit Goswami added 6 commits

    added 6 commits

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    • f1e0e4f7 - symboltable: Kill extraneous header

    Compare with previous version

  • Rohit Goswami added 1 commit

    added 1 commit

    Compare with previous version

  • Rohit Goswami added 8 commits

    added 8 commits

    • 7cb66587 - 1 commit from branch lfortran:master
    • 76e9fb27 - kind: Start skeleton [skip ci]
    • aad7b125 - kind: Clean and rework to mimic real [skip ci]
    • d004621e - cmake: Run gfortran for kind [skip ci]
    • d199008a - kind: Use extract_kind for variables
    • cde3110d - docs: Be modern
    • 225b2012 - tests: Try all cases [skip ci]
    • 194e195a - symboltable: Kill extraneous header

    Compare with previous version

  • Rohit Goswami marked this merge request as ready

    marked this merge request as ready

  • Rohit Goswami changed title from kind: Generalize and unify to kind: Compile time

    changed title from kind: Generalize and unify to kind: Compile time

  • Author Developer

    @certik this is ready now.

  • Rohit Goswami added 1 commit

    added 1 commit

    Compare with previous version

  • Rohit Goswami added 2 commits

    added 2 commits

    Compare with previous version

  • Ondřej Čertík approved this merge request

    approved this merge request

  • Rohit Goswami enabled automatic add to merge train when the pipeline for e3d9a53c succeeds

    enabled automatic add to merge train when the pipeline for e3d9a53c succeeds

  • Rohit Goswami started a merge train

    started a merge train

  • merged

  • Rohit Goswami mentioned in commit 7eda18ee

    mentioned in commit 7eda18ee

  • Please register or sign in to reply
    Loading