Skip to content

Commit

Permalink
support Name::Space->method style
Browse files Browse the repository at this point in the history
  • Loading branch information
goccy committed Sep 3, 2013
1 parent ab66e55 commit ce5c52a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Compiler/CodeGenerator/LLVM/runtime_api.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; ModuleID = 'gen/runtime_api.c'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.6.0"
target triple = "x86_64-apple-macosx10.7.0"

%struct.__sFILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
%struct.__sbuf = type { i8*, i32 }
Expand Down
2 changes: 1 addition & 1 deletion lib/Compiler/CodeGenerator/LLVM/runtime_api_32.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; ModuleID = 'gen/runtime_api_32.c'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128"
target triple = "i386-apple-macosx10.6.0"
target triple = "i386-apple-macosx10.7.0"

%struct.__sFILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
%struct.__sbuf = type { i8*, i32 }
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/code_generator/llvm/generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ llvm::Value *LLVM::generateOperatorCode(IRBuilder<> *builder, BranchNode *node)
ret = generateHashRefAccessCode(builder, left_value, right);
cur_type = Enum::Runtime::Value;
} else if (node->right->tk->info.type == Method) {
if (node->left->tk->info.type == Class || node->left->tk->info.type == Key) {
if (node->left->tk->info.type == Class || node->left->tk->info.type == Key || node->left->tk->info.type == Namespace) {
const char *pkg_name = node->left->tk->data.c_str();
const char *mtd_name = node->right->tk->data.c_str();
llvm::Value *pkg = createString(builder, pkg_name);
Expand Down

0 comments on commit ce5c52a

Please sign in to comment.