Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
86ecbfa5
Commit
86ecbfa5
authored
Apr 22, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removing debug logs and adding -O2 to the makefile.
parent
c0a68f4a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
11 deletions
+14
-11
Makefile
Makefile
+2
-1
context.cpp
context.cpp
+1
-1
document_parser.cpp
document_parser.cpp
+2
-0
sass_interface.cpp
sass_interface.cpp
+9
-9
No files found.
Makefile
View file @
86ecbfa5
...
@@ -24,7 +24,7 @@ libsass: libsass_objs
...
@@ -24,7 +24,7 @@ libsass: libsass_objs
prelexer.o
prelexer.o
libsass_objs
:
sass_interface.cpp $(CPP_FILES)
libsass_objs
:
sass_interface.cpp $(CPP_FILES)
g++
-c
-combine
sass_interface.cpp
$(CPP_FILES)
g++
-
O2
-
c
-combine
sass_interface.cpp
$(CPP_FILES)
clean
:
clean
:
rm
-rf
*
.o
*
.a
rm
-rf
*
.o
*
.a
\ No newline at end of file
context.cpp
View file @
86ecbfa5
...
@@ -56,7 +56,7 @@ namespace Sass {
...
@@ -56,7 +56,7 @@ namespace Sass {
for
(
i
=
0
;
i
<
source_refs
.
size
();
++
i
)
{
for
(
i
=
0
;
i
<
source_refs
.
size
();
++
i
)
{
delete
[]
source_refs
[
i
];
delete
[]
source_refs
[
i
];
}
}
cerr
<<
"Deallocated "
<<
i
<<
" source string(s)."
<<
endl
;
//
cerr << "Deallocated " << i << " source string(s)." << endl;
}
}
inline
void
Context
::
register_function
(
Function_Descriptor
d
,
Implementation
ip
)
inline
void
Context
::
register_function
(
Function_Descriptor
d
,
Implementation
ip
)
...
...
document_parser.cpp
View file @
86ecbfa5
...
@@ -64,6 +64,7 @@ namespace Sass {
...
@@ -64,6 +64,7 @@ namespace Sass {
}
}
if
(
!
lex
<
string_constant
>
())
syntax_error
(
"@import directive requires a url or quoted path"
);
if
(
!
lex
<
string_constant
>
())
syntax_error
(
"@import directive requires a url or quoted path"
);
// TO DO: BETTER PATH HANDLING
// TO DO: BETTER PATH HANDLING
// cerr << "Importing " << lexed.to_string() << endl;
string
import_path
(
lexed
.
unquote
());
string
import_path
(
lexed
.
unquote
());
const
char
*
curr_path_start
=
path
.
c_str
();
const
char
*
curr_path_start
=
path
.
c_str
();
const
char
*
curr_path_end
=
folders
(
curr_path_start
);
const
char
*
curr_path_end
=
folders
(
curr_path_start
);
...
@@ -71,6 +72,7 @@ namespace Sass {
...
@@ -71,6 +72,7 @@ namespace Sass {
try
{
try
{
Document
importee
(
current_path
+
import_path
,
context
);
Document
importee
(
current_path
+
import_path
,
context
);
importee
.
parse_scss
();
importee
.
parse_scss
();
// cerr << "Finished parsing import " << lexed.to_string() << endl;
return
importee
.
root
;
return
importee
.
root
;
}
}
catch
(
string
&
path
)
{
catch
(
string
&
path
)
{
...
...
sass_interface.cpp
View file @
86ecbfa5
...
@@ -37,21 +37,21 @@ extern "C" {
...
@@ -37,21 +37,21 @@ extern "C" {
{
{
using
namespace
Sass
;
using
namespace
Sass
;
doc
.
parse_scss
();
doc
.
parse_scss
();
cerr
<<
"PARSED"
<<
endl
;
//
cerr << "PARSED" << endl;
eval
(
doc
.
root
,
doc
.
context
.
global_env
,
doc
.
context
.
function_env
,
doc
.
context
.
registry
);
eval
(
doc
.
root
,
doc
.
context
.
global_env
,
doc
.
context
.
function_env
,
doc
.
context
.
registry
);
cerr
<<
"EVALUATED"
<<
endl
;
//
cerr << "EVALUATED" << endl;
string
output
(
doc
.
emit_css
(
static_cast
<
Document
::
CSS_Style
>
(
style
)));
string
output
(
doc
.
emit_css
(
static_cast
<
Document
::
CSS_Style
>
(
style
)));
cerr
<<
"EMITTED"
<<
endl
;
//
cerr << "EMITTED" << endl;
cerr
<<
"Allocations:
\t
"
<<
Node
::
allocations
<<
endl
;
//
cerr << "Allocations:\t" << Node::allocations << endl;
cerr
<<
"Destructions:
\t
"
<<
Node
::
destructed
<<
endl
;
//
cerr << "Destructions:\t" << Node::destructed << endl;
cerr
<<
"Registry size:
\t
"
<<
doc
.
context
.
registry
.
size
()
<<
endl
;
//
cerr << "Registry size:\t" << doc.context.registry.size() << endl;
int
i
;
int
i
;
for
(
i
=
0
;
i
<
doc
.
context
.
registry
.
size
();
++
i
)
{
for
(
i
=
0
;
i
<
doc
.
context
.
registry
.
size
();
++
i
)
{
delete
doc
.
context
.
registry
[
i
];
delete
doc
.
context
.
registry
[
i
];
}
}
cerr
<<
"Deallocations:
\t
"
<<
i
<<
endl
;
//
cerr << "Deallocations:\t" << i << endl;
char
*
c_output
=
(
char
*
)
malloc
(
output
.
size
()
+
1
);
char
*
c_output
=
(
char
*
)
malloc
(
output
.
size
()
+
1
);
strcpy
(
c_output
,
output
.
c_str
());
strcpy
(
c_output
,
output
.
c_str
());
...
@@ -98,8 +98,8 @@ extern "C" {
...
@@ -98,8 +98,8 @@ extern "C" {
try
{
try
{
Context
cpp_ctx
(
c_ctx
->
options
.
include_paths
);
Context
cpp_ctx
(
c_ctx
->
options
.
include_paths
);
Document
doc
(
c_ctx
->
input_path
,
0
,
cpp_ctx
);
Document
doc
(
c_ctx
->
input_path
,
0
,
cpp_ctx
);
cerr
<<
"MADE A DOC AND CONTEXT OBJ"
<<
endl
;
//
cerr << "MADE A DOC AND CONTEXT OBJ" << endl;
cerr
<<
"REGISTRY: "
<<
doc
.
context
.
registry
.
size
()
<<
endl
;
//
cerr << "REGISTRY: " << doc.context.registry.size() << endl;
c_ctx
->
output_string
=
process_document
(
doc
,
c_ctx
->
options
.
output_style
);
c_ctx
->
output_string
=
process_document
(
doc
,
c_ctx
->
options
.
output_style
);
c_ctx
->
error_message
=
0
;
c_ctx
->
error_message
=
0
;
c_ctx
->
error_status
=
0
;
c_ctx
->
error_status
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment