Commit 86ecbfa5 by Aaron Leung

Removing debug logs and adding -O2 to the makefile.

parent c0a68f4a
......@@ -24,7 +24,7 @@ libsass: libsass_objs
prelexer.o
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:
rm -rf *.o *.a
\ No newline at end of file
......@@ -56,7 +56,7 @@ namespace Sass {
for (i = 0; i < source_refs.size(); ++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)
......
......@@ -64,6 +64,7 @@ namespace Sass {
}
if (!lex< string_constant >()) syntax_error("@import directive requires a url or quoted path");
// TO DO: BETTER PATH HANDLING
// cerr << "Importing " << lexed.to_string() << endl;
string import_path(lexed.unquote());
const char* curr_path_start = path.c_str();
const char* curr_path_end = folders(curr_path_start);
......@@ -71,6 +72,7 @@ namespace Sass {
try {
Document importee(current_path + import_path, context);
importee.parse_scss();
// cerr << "Finished parsing import " << lexed.to_string() << endl;
return importee.root;
}
catch (string& path) {
......
......@@ -37,21 +37,21 @@ extern "C" {
{
using namespace Sass;
doc.parse_scss();
cerr << "PARSED" << endl;
// cerr << "PARSED" << endl;
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)));
cerr << "EMITTED" << endl;
// cerr << "EMITTED" << endl;
cerr << "Allocations:\t" << Node::allocations << endl;
cerr << "Destructions:\t" << Node::destructed << endl;
cerr << "Registry size:\t" << doc.context.registry.size() << endl;
// cerr << "Allocations:\t" << Node::allocations << endl;
// cerr << "Destructions:\t" << Node::destructed << endl;
// cerr << "Registry size:\t" << doc.context.registry.size() << endl;
int i;
for (i = 0; i < doc.context.registry.size(); ++i) {
delete doc.context.registry[i];
}
cerr << "Deallocations:\t" << i << endl;
// cerr << "Deallocations:\t" << i << endl;
char* c_output = (char*) malloc(output.size() + 1);
strcpy(c_output, output.c_str());
......@@ -98,8 +98,8 @@ extern "C" {
try {
Context cpp_ctx(c_ctx->options.include_paths);
Document doc(c_ctx->input_path, 0, cpp_ctx);
cerr << "MADE A DOC AND CONTEXT OBJ" << endl;
cerr << "REGISTRY: " << doc.context.registry.size() << endl;
// cerr << "MADE A DOC AND CONTEXT OBJ" << endl;
// cerr << "REGISTRY: " << doc.context.registry.size() << endl;
c_ctx->output_string = process_document(doc, c_ctx->options.output_style);
c_ctx->error_message = 0;
c_ctx->error_status = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment