Code formatting changes.

Review URL: http://codereview.chromium.org/7346

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7cd44cea
...@@ -345,9 +345,10 @@ bool CodeGenerator::CheckForInlineRuntimeCall(CallRuntime* node) { ...@@ -345,9 +345,10 @@ bool CodeGenerator::CheckForInlineRuntimeCall(CallRuntime* node) {
} }
void CodeGenerator::GenerateFastCaseSwitchStatement( void CodeGenerator::GenerateFastCaseSwitchStatement(SwitchStatement* node,
SwitchStatement *node, int min_index, int range, int default_index) { int min_index,
int range,
int default_index) {
ZoneList<CaseClause*>* cases = node->cases(); ZoneList<CaseClause*>* cases = node->cases();
int length = cases->length(); int length = cases->length();
...@@ -357,8 +358,8 @@ void CodeGenerator::GenerateFastCaseSwitchStatement( ...@@ -357,8 +358,8 @@ void CodeGenerator::GenerateFastCaseSwitchStatement(
// Label per switch case // Label per switch case
SmartPointer<Label> case_labels(NewArray<Label>(length)); SmartPointer<Label> case_labels(NewArray<Label>(length));
Label* fail_label = (default_index >= 0 ? &(case_labels[default_index]) Label* fail_label = default_index >= 0 ? &(case_labels[default_index])
: node->break_target()); : node->break_target();
// Populate array of label pointers for each number in the range. // Populate array of label pointers for each number in the range.
// Initally put the failure label everywhere. // Initally put the failure label everywhere.
...@@ -382,14 +383,15 @@ void CodeGenerator::GenerateFastCaseSwitchStatement( ...@@ -382,14 +383,15 @@ void CodeGenerator::GenerateFastCaseSwitchStatement(
case_targets, case_labels); case_targets, case_labels);
} }
void CodeGenerator::GenerateFastCaseSwitchCases(
SwitchStatement* node, SmartPointer<Label> &case_labels) {
void CodeGenerator::GenerateFastCaseSwitchCases(
SwitchStatement* node,
SmartPointer<Label>& case_labels) {
ZoneList<CaseClause*>* cases = node->cases(); ZoneList<CaseClause*>* cases = node->cases();
int length = cases->length(); int length = cases->length();
for (int i = 0; i < length; i++) { for (int i = 0; i < length; i++) {
Comment cmnt(masm(), "[ case clause"); Comment cmnt(masm(), "[ Case clause");
masm()->bind(&(case_labels[i])); masm()->bind(&(case_labels[i]));
VisitStatements(cases->at(i)->statements()); VisitStatements(cases->at(i)->statements());
} }
......
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